From 29d59991a860af788b285a1b8e09058a7c8ff5e4 Mon Sep 17 00:00:00 2001 From: Vernon Keenan Date: Fri, 8 Jan 2021 09:00:13 -0800 Subject: [PATCH] Frist commit --- api/auth/v0.0.1/auth_client/auth_client.go | 116 +++ .../auth_client/user/get_users_parameters.go | 150 ++++ .../auth_client/user/get_users_responses.go | 268 +++++++ .../v0.0.1/auth_client/user/user_client.go | 79 ++ api/auth/v0.0.1/auth_models/address.go | 65 ++ api/auth/v0.0.1/auth_models/error.go | 53 ++ api/auth/v0.0.1/auth_models/response_meta.go | 77 ++ api/auth/v0.0.1/auth_models/tenant_user.go | 92 +++ api/auth/v0.0.1/auth_models/user.go | 306 ++++++++ api/auth/v0.0.1/auth_models/user_response.go | 109 +++ api/auth/v0.0.1/auth_models/user_role.go | 83 +++ .../crm_client/accounts/accounts_client.go | 235 ++++++ .../accounts/delete_account_parameters.go | 150 ++++ .../accounts/delete_account_responses.go | 298 ++++++++ .../get_accounts_observable_parameters.go | 247 +++++++ .../get_accounts_observable_responses.go | 301 ++++++++ .../accounts/get_accounts_parameters.go | 311 ++++++++ .../accounts/get_accounts_responses.go | 303 ++++++++ .../accounts/post_accounts_parameters.go | 142 ++++ .../accounts/post_accounts_responses.go | 303 ++++++++ .../accounts/put_account_parameters.go | 142 ++++ .../accounts/put_account_responses.go | 303 ++++++++ .../crm_client/companies/companies_client.go | 157 ++++ .../get_companies_observable_parameters.go | 150 ++++ .../get_companies_observable_responses.go | 301 ++++++++ .../companies/get_companies_parameters.go | 150 ++++ .../companies/get_companies_responses.go | 303 ++++++++ .../companies/post_companies_parameters.go | 142 ++++ .../companies/post_companies_responses.go | 303 ++++++++ .../crm_client/contacts/contacts_client.go | 235 ++++++ .../contacts/delete_contact_parameters.go | 150 ++++ .../contacts/delete_contact_responses.go | 298 ++++++++ .../get_contacts_observable_parameters.go | 247 +++++++ .../get_contacts_observable_responses.go | 301 ++++++++ .../contacts/get_contacts_parameters.go | 311 ++++++++ .../contacts/get_contacts_responses.go | 303 ++++++++ .../contacts/post_contacts_parameters.go | 142 ++++ .../contacts/post_contacts_responses.go | 303 ++++++++ .../contacts/put_contacts_parameters.go | 142 ++++ .../contacts/put_contacts_responses.go | 303 ++++++++ .../account_options_observable_parameters.go | 116 +++ .../account_options_observable_responses.go | 92 +++ .../cors/account_options_parameters.go | 116 +++ .../cors/account_options_responses.go | 92 +++ .../company_observable_options_parameters.go | 116 +++ .../company_observable_options_responses.go | 92 +++ .../cors/company_options_parameters.go | 116 +++ .../cors/company_options_responses.go | 92 +++ .../contact_options_observable_parameters.go | 116 +++ .../contact_options_observable_responses.go | 92 +++ .../cors/contact_options_parameters.go | 116 +++ .../cors/contact_options_responses.go | 92 +++ api/crm/v0.0.1/crm_client/cors/cors_client.go | 328 +++++++++ .../lead_options_observable_parameters.go | 116 +++ .../cors/lead_options_observable_responses.go | 92 +++ .../cors/lead_options_parameters.go | 116 +++ .../crm_client/cors/lead_options_responses.go | 92 +++ api/crm/v0.0.1/crm_client/crm_client.go | 136 ++++ .../leads/delete_lead_parameters.go | 150 ++++ .../crm_client/leads/delete_lead_responses.go | 298 ++++++++ .../leads/get_leads_observable_parameters.go | 214 ++++++ .../leads/get_leads_observable_responses.go | 301 ++++++++ .../crm_client/leads/get_leads_parameters.go | 279 +++++++ .../crm_client/leads/get_leads_responses.go | 303 ++++++++ .../v0.0.1/crm_client/leads/leads_client.go | 235 ++++++ .../crm_client/leads/post_leads_parameters.go | 142 ++++ .../crm_client/leads/post_leads_responses.go | 303 ++++++++ .../crm_client/leads/put_leads_parameters.go | 142 ++++ .../crm_client/leads/put_leads_responses.go | 303 ++++++++ api/crm/v0.0.1/crm_models/account.go | 402 ++++++++++ api/crm/v0.0.1/crm_models/account_basic.go | 188 +++++ .../crm_models/account_basic_response.go | 109 +++ api/crm/v0.0.1/crm_models/account_request.go | 84 +++ api/crm/v0.0.1/crm_models/account_response.go | 109 +++ api/crm/v0.0.1/crm_models/address.go | 65 ++ api/crm/v0.0.1/crm_models/company.go | 202 +++++ api/crm/v0.0.1/crm_models/company_request.go | 84 +++ api/crm/v0.0.1/crm_models/company_response.go | 109 +++ api/crm/v0.0.1/crm_models/contact.go | 229 ++++++ api/crm/v0.0.1/crm_models/contact_request.go | 84 +++ api/crm/v0.0.1/crm_models/contact_response.go | 109 +++ api/crm/v0.0.1/crm_models/delete_response.go | 109 +++ api/crm/v0.0.1/crm_models/error.go | 53 ++ api/crm/v0.0.1/crm_models/invalid_error.go | 104 +++ api/crm/v0.0.1/crm_models/lead.go | 156 ++++ api/crm/v0.0.1/crm_models/lead_request.go | 84 +++ api/crm/v0.0.1/crm_models/lead_response.go | 109 +++ api/crm/v0.0.1/crm_models/message.go | 53 ++ api/crm/v0.0.1/crm_models/pagination.go | 56 ++ api/crm/v0.0.1/crm_models/request_meta.go | 68 ++ api/crm/v0.0.1/crm_models/response_meta.go | 108 +++ .../regs_client/authority/authority_client.go | 157 ++++ .../authority/get_authorities_parameters.go | 215 ++++++ .../authority/get_authorities_responses.go | 303 ++++++++ .../authority/post_authorities_parameters.go | 142 ++++ .../authority/post_authorities_responses.go | 303 ++++++++ .../authority/put_authorities_parameters.go | 142 ++++ .../authority/put_authorities_responses.go | 303 ++++++++ .../regs_client/backend/backend_client.go | 196 +++++ .../backend/delete_backend_parameters.go | 150 ++++ .../backend/delete_backend_responses.go | 298 ++++++++ .../backend/get_backends_parameters.go | 343 +++++++++ .../backend/get_backends_responses.go | 303 ++++++++ .../backend/post_backends_parameters.go | 142 ++++ .../backend/post_backends_responses.go | 303 ++++++++ .../backend/put_backends_parameters.go | 142 ++++ .../backend/put_backends_responses.go | 303 ++++++++ .../cors/authority_options_parameters.go | 116 +++ .../cors/authority_options_responses.go | 92 +++ .../cors/backend_options_parameters.go | 116 +++ .../cors/backend_options_responses.go | 92 +++ api/devops/regs_client/cors/cors_client.go | 436 +++++++++++ .../cors/filing_options_parameters.go | 116 +++ .../cors/filing_options_responses.go | 92 +++ .../cors/filing_type_options_parameters.go | 116 +++ .../cors/filing_type_options_responses.go | 92 +++ .../cors/license_options_parameters.go | 116 +++ .../cors/license_options_responses.go | 92 +++ .../cors/license_type_options_parameters.go | 116 +++ .../cors/license_type_options_responses.go | 92 +++ .../cors/notebook_options_parameters.go | 116 +++ .../cors/notebook_options_responses.go | 92 +++ .../cors/rating_engine_options_parameters.go | 116 +++ .../cors/rating_engine_options_responses.go | 92 +++ .../cors/submission_options_parameters.go | 116 +++ .../cors/submission_options_responses.go | 92 +++ .../tax_type_account_options_parameters.go | 116 +++ .../tax_type_account_options_responses.go | 92 +++ .../cors/transaction_options_parameters.go | 116 +++ .../cors/transaction_options_responses.go | 92 +++ .../regs_client/filing/filing_client.go | 157 ++++ .../filing/get_filings_parameters.go | 279 +++++++ .../filing/get_filings_responses.go | 303 ++++++++ .../filing/post_filings_parameters.go | 142 ++++ .../filing/post_filings_responses.go | 303 ++++++++ .../filing/put_filings_parameters.go | 142 ++++ .../filing/put_filings_responses.go | 303 ++++++++ .../filing_type/filing_type_client.go | 157 ++++ .../get_filing_types_parameters.go | 215 ++++++ .../filing_type/get_filing_types_responses.go | 303 ++++++++ .../post_filing_types_parameters.go | 142 ++++ .../post_filing_types_responses.go | 303 ++++++++ .../put_filing_types_parameters.go | 142 ++++ .../filing_type/put_filing_types_responses.go | 259 +++++++ .../license/get_licenses_parameters.go | 311 ++++++++ .../license/get_licenses_responses.go | 303 ++++++++ .../regs_client/license/license_client.go | 157 ++++ .../license/post_licenses_parameters.go | 142 ++++ .../license/post_licenses_responses.go | 303 ++++++++ .../license/put_licenses_parameters.go | 142 ++++ .../license/put_licenses_responses.go | 303 ++++++++ .../get_license_types_parameters.go | 279 +++++++ .../get_license_types_responses.go | 303 ++++++++ .../license_type/license_type_client.go | 118 +++ .../post_license_types_parameters.go | 142 ++++ .../post_license_types_responses.go | 303 ++++++++ .../notebook/get_notebooks_parameters.go | 215 ++++++ .../notebook/get_notebooks_responses.go | 303 ++++++++ .../regs_client/notebook/notebook_client.go | 157 ++++ .../notebook/post_notebooks_parameters.go | 142 ++++ .../notebook/post_notebooks_responses.go | 303 ++++++++ .../notebook/put_notebooks_parameters.go | 142 ++++ .../notebook/put_notebooks_responses.go | 303 ++++++++ .../delete_rating_engine_parameters.go | 150 ++++ .../delete_rating_engine_responses.go | 298 ++++++++ .../get_rating_engines_parameters.go | 375 ++++++++++ .../get_rating_engines_responses.go | 303 ++++++++ .../post_rating_engines_parameters.go | 142 ++++ .../post_rating_engines_responses.go | 303 ++++++++ .../put_rating_engines_parameters.go | 142 ++++ .../put_rating_engines_responses.go | 303 ++++++++ .../rating_engine/rating_engine_client.go | 196 +++++ api/devops/regs_client/regs_client.go | 171 +++++ .../submission/get_submissions_parameters.go | 279 +++++++ .../submission/get_submissions_responses.go | 303 ++++++++ .../submission/post_submissions_parameters.go | 142 ++++ .../submission/post_submissions_responses.go | 303 ++++++++ .../submission/put_submissions_parameters.go | 142 ++++ .../submission/put_submissions_responses.go | 303 ++++++++ .../submission/submission_client.go | 157 ++++ .../delete_type_accounts_parameters.go | 150 ++++ .../delete_type_accounts_responses.go | 298 ++++++++ .../get_tax_type_accounts_parameters.go | 279 +++++++ .../get_tax_type_accounts_responses.go | 303 ++++++++ .../post_tax_type_accounts_parameters.go | 142 ++++ .../post_tax_type_accounts_responses.go | 303 ++++++++ .../put_tax_type_accounts_parameters.go | 142 ++++ .../put_tax_type_accounts_responses.go | 303 ++++++++ .../tax_type_account_client.go | 196 +++++ .../get_transactions_parameters.go | 215 ++++++ .../transaction/get_transactions_responses.go | 303 ++++++++ .../post_transactions_parameters.go | 142 ++++ .../post_transactions_responses.go | 303 ++++++++ .../put_transactions_parameters.go | 142 ++++ .../transaction/put_transactions_responses.go | 303 ++++++++ .../transaction/transaction_client.go | 157 ++++ api/devops/regs_models/authority.go | 134 ++++ api/devops/regs_models/authority_request.go | 84 +++ api/devops/regs_models/authority_response.go | 109 +++ api/devops/regs_models/backend.go | 155 ++++ api/devops/regs_models/backend_request.go | 84 +++ api/devops/regs_models/backend_response.go | 109 +++ api/devops/regs_models/delete_response.go | 109 +++ api/devops/regs_models/error.go | 53 ++ api/devops/regs_models/filing.go | 170 +++++ api/devops/regs_models/filing_request.go | 84 +++ api/devops/regs_models/filing_response.go | 109 +++ .../regs_models/filing_schedule_item.go | 50 ++ api/devops/regs_models/filing_type.go | 185 +++++ .../regs_models/filing_type_instance.go | 62 ++ api/devops/regs_models/filing_type_request.go | 84 +++ .../regs_models/filing_type_response.go | 109 +++ .../regs_models/geo_license_type_instance.go | 59 ++ api/devops/regs_models/invalid_error.go | 104 +++ api/devops/regs_models/license.go | 104 +++ api/devops/regs_models/license_request.go | 84 +++ api/devops/regs_models/license_response.go | 109 +++ api/devops/regs_models/license_type.go | 141 ++++ .../regs_models/license_type_request.go | 84 +++ .../regs_models/license_type_response.go | 109 +++ api/devops/regs_models/message.go | 53 ++ api/devops/regs_models/notebook.go | 132 ++++ api/devops/regs_models/notebook_item.go | 59 ++ api/devops/regs_models/notebook_request.go | 84 +++ api/devops/regs_models/notebook_response.go | 109 +++ api/devops/regs_models/pagination.go | 56 ++ api/devops/regs_models/rating_engine.go | 108 +++ api/devops/regs_models/rating_engine_item.go | 74 ++ .../regs_models/rating_engine_request.go | 84 +++ .../regs_models/rating_engine_response.go | 109 +++ api/devops/regs_models/request_meta.go | 68 ++ api/devops/regs_models/response_meta.go | 108 +++ api/devops/regs_models/submission.go | 122 ++++ api/devops/regs_models/submission_request.go | 84 +++ api/devops/regs_models/submission_response.go | 109 +++ api/devops/regs_models/tax_type_account.go | 143 ++++ .../regs_models/tax_type_account_request.go | 84 +++ .../regs_models/tax_type_account_response.go | 109 +++ api/devops/regs_models/transaction.go | 74 ++ api/devops/regs_models/transaction_request.go | 84 +++ .../regs_models/transaction_response.go | 109 +++ .../devops_client/cluster/cluster_client.go | 235 ++++++ .../cluster/get_cluster_parameters.go | 139 ++++ .../cluster/get_cluster_responses.go | 313 ++++++++ .../get_clusters_observable_parameters.go | 116 +++ .../get_clusters_observable_responses.go | 311 ++++++++ .../cluster/get_clusters_parameters.go | 247 +++++++ .../cluster/get_clusters_responses.go | 313 ++++++++ .../cluster/post_clusters_parameters.go | 142 ++++ .../cluster/post_clusters_responses.go | 313 ++++++++ .../cluster/put_clusters_parameters.go | 142 ++++ .../cluster/put_clusters_responses.go | 313 ++++++++ .../cors/cluster_options_parameters.go | 116 +++ .../cors/cluster_options_responses.go | 92 +++ .../cors/clusters_options_parameters.go | 116 +++ .../cors/clusters_options_responses.go | 92 +++ .../v0.0.1/devops_client/cors/cors_client.go | 616 ++++++++++++++++ .../cors/database_options_parameters.go | 116 +++ .../cors/database_options_responses.go | 92 +++ .../cors/databases_options_parameters.go | 116 +++ .../cors/databases_options_responses.go | 92 +++ .../cors/ingest_options_parameters.go | 116 +++ .../cors/ingest_options_responses.go | 92 +++ .../cors/ingests_options_parameters.go | 116 +++ .../cors/ingests_options_responses.go | 92 +++ .../cors/job_options_parameters.go | 116 +++ .../cors/job_options_responses.go | 92 +++ .../cors/jobs_options_parameters.go | 116 +++ .../cors/jobs_options_responses.go | 92 +++ .../cors/service_options_parameters.go | 116 +++ .../cors/service_options_responses.go | 92 +++ .../cors/services_options_parameters.go | 116 +++ .../cors/services_options_responses.go | 92 +++ .../cors/template_options_parameters.go | 116 +++ .../cors/template_options_responses.go | 92 +++ .../cors/templates_options_parameters.go | 116 +++ .../cors/templates_options_responses.go | 92 +++ .../cors/tenant_options_parameters.go | 116 +++ .../cors/tenant_options_responses.go | 92 +++ .../cors/tenants_options_parameters.go | 116 +++ .../cors/tenants_options_responses.go | 92 +++ .../cors/user_options_parameters.go | 116 +++ .../cors/user_options_responses.go | 92 +++ .../cors/users_options_parameters.go | 116 +++ .../cors/users_options_responses.go | 92 +++ .../devops_client/database/database_client.go | 235 ++++++ .../database/get_database_parameters.go | 139 ++++ .../database/get_database_responses.go | 313 ++++++++ .../get_databases_observable_parameters.go | 116 +++ .../get_databases_observable_responses.go | 311 ++++++++ .../database/get_databases_parameters.go | 247 +++++++ .../database/get_databases_responses.go | 308 ++++++++ .../database/post_databases_parameters.go | 142 ++++ .../database/post_databases_responses.go | 308 ++++++++ .../database/put_databases_parameters.go | 142 ++++ .../database/put_databases_responses.go | 308 ++++++++ .../v0.0.1/devops_client/devops_client.go | 156 ++++ .../ingest/get_ingest_parameters.go | 139 ++++ .../ingest/get_ingest_responses.go | 313 ++++++++ .../get_ingests_observable_parameters.go | 116 +++ .../get_ingests_observable_responses.go | 311 ++++++++ .../ingest/get_ingests_parameters.go | 279 +++++++ .../ingest/get_ingests_responses.go | 313 ++++++++ .../devops_client/ingest/ingest_client.go | 235 ++++++ .../ingest/post_ingests_parameters.go | 142 ++++ .../ingest/post_ingests_responses.go | 313 ++++++++ .../ingest/put_ingests_parameters.go | 142 ++++ .../ingest/put_ingests_responses.go | 313 ++++++++ .../devops_client/job/get_job_parameters.go | 139 ++++ .../devops_client/job/get_job_responses.go | 313 ++++++++ .../job/get_jobs_observable_parameters.go | 116 +++ .../job/get_jobs_observable_responses.go | 311 ++++++++ .../devops_client/job/get_jobs_parameters.go | 311 ++++++++ .../devops_client/job/get_jobs_responses.go | 313 ++++++++ .../v0.0.1/devops_client/job/job_client.go | 235 ++++++ .../devops_client/job/post_jobs_parameters.go | 142 ++++ .../devops_client/job/post_jobs_responses.go | 313 ++++++++ .../devops_client/job/put_jobs_parameters.go | 142 ++++ .../devops_client/job/put_jobs_responses.go | 313 ++++++++ .../service/get_service_parameters.go | 139 ++++ .../service/get_service_responses.go | 313 ++++++++ .../get_services_observable_parameters.go | 116 +++ .../get_services_observable_responses.go | 311 ++++++++ .../service/get_services_parameters.go | 215 ++++++ .../service/get_services_responses.go | 313 ++++++++ .../service/post_services_parameters.go | 142 ++++ .../service/post_services_responses.go | 313 ++++++++ .../service/put_services_parameters.go | 142 ++++ .../service/put_services_responses.go | 313 ++++++++ .../devops_client/service/service_client.go | 235 ++++++ .../template/get_template_parameters.go | 139 ++++ .../template/get_template_responses.go | 313 ++++++++ .../get_templates_observable_parameters.go | 116 +++ .../get_templates_observable_responses.go | 311 ++++++++ .../template/get_templates_parameters.go | 311 ++++++++ .../template/get_templates_responses.go | 313 ++++++++ .../template/post_templates_parameters.go | 142 ++++ .../template/post_templates_responses.go | 313 ++++++++ .../devops_client/template/template_client.go | 196 +++++ .../tenant/get_tenant_parameters.go | 139 ++++ .../tenant/get_tenant_responses.go | 313 ++++++++ .../get_tenants_observable_parameters.go | 116 +++ .../get_tenants_observable_responses.go | 311 ++++++++ .../tenant/get_tenants_parameters.go | 279 +++++++ .../tenant/get_tenants_responses.go | 308 ++++++++ .../tenant/post_tenants_parameters.go | 142 ++++ .../tenant/post_tenants_responses.go | 308 ++++++++ .../tenant/put_tenants_parameters.go | 142 ++++ .../tenant/put_tenants_responses.go | 308 ++++++++ .../devops_client/tenant/tenant_client.go | 235 ++++++ .../devops_client/user/get_user_parameters.go | 139 ++++ .../devops_client/user/get_user_responses.go | 313 ++++++++ .../user/get_users_observable_parameters.go | 116 +++ .../user/get_users_observable_responses.go | 311 ++++++++ .../user/get_users_parameters.go | 375 ++++++++++ .../devops_client/user/get_users_responses.go | 313 ++++++++ .../user/post_users_parameters.go | 142 ++++ .../user/post_users_responses.go | 313 ++++++++ .../user/put_users_parameters.go | 142 ++++ .../devops_client/user/put_users_responses.go | 313 ++++++++ .../v0.0.1/devops_client/user/user_client.go | 235 ++++++ api/devops/v0.0.1/devops_models/address.go | 65 ++ api/devops/v0.0.1/devops_models/cluster.go | 95 +++ .../v0.0.1/devops_models/cluster_request.go | 84 +++ .../v0.0.1/devops_models/cluster_response.go | 109 +++ api/devops/v0.0.1/devops_models/database.go | 83 +++ .../v0.0.1/devops_models/database_request.go | 84 +++ .../v0.0.1/devops_models/database_response.go | 109 +++ .../v0.0.1/devops_models/delete_response.go | 109 +++ api/devops/v0.0.1/devops_models/error.go | 53 ++ api/devops/v0.0.1/devops_models/ingest.go | 443 +++++++++++ .../v0.0.1/devops_models/ingest_request.go | 84 +++ .../v0.0.1/devops_models/ingest_response.go | 109 +++ api/devops/v0.0.1/devops_models/job.go | 484 ++++++++++++ .../v0.0.1/devops_models/job_request.go | 84 +++ .../v0.0.1/devops_models/job_response.go | 109 +++ api/devops/v0.0.1/devops_models/message.go | 53 ++ api/devops/v0.0.1/devops_models/pagination.go | 56 ++ .../v0.0.1/devops_models/request_meta.go | 68 ++ .../v0.0.1/devops_models/response_meta.go | 108 +++ api/devops/v0.0.1/devops_models/role.go | 71 ++ .../v0.0.1/devops_models/role_request.go | 84 +++ .../v0.0.1/devops_models/role_response.go | 109 +++ api/devops/v0.0.1/devops_models/service.go | 113 +++ .../v0.0.1/devops_models/service_request.go | 84 +++ .../v0.0.1/devops_models/service_response.go | 109 +++ api/devops/v0.0.1/devops_models/template.go | 93 +++ .../v0.0.1/devops_models/template_request.go | 84 +++ .../v0.0.1/devops_models/template_response.go | 109 +++ api/devops/v0.0.1/devops_models/tenant.go | 181 +++++ .../v0.0.1/devops_models/tenant_request.go | 84 +++ .../v0.0.1/devops_models/tenant_response.go | 109 +++ .../v0.0.1/devops_models/tenant_user.go | 92 +++ api/devops/v0.0.1/devops_models/user.go | 306 ++++++++ .../v0.0.1/devops_models/user_request.go | 84 +++ .../v0.0.1/devops_models/user_response.go | 109 +++ api/devops/v0.0.1/devops_models/user_role.go | 83 +++ .../coordinate/coordinate_client.go | 235 ++++++ .../delete_coordinate_parameters.go | 150 ++++ .../coordinate/delete_coordinate_responses.go | 303 ++++++++ .../get_coordinate_basic_parameters.go | 278 +++++++ .../get_coordinate_basic_responses.go | 303 ++++++++ .../get_coordinate_observable_parameters.go | 278 +++++++ .../get_coordinate_observable_responses.go | 301 ++++++++ .../coordinate/get_coordinates_parameters.go | 278 +++++++ .../coordinate/get_coordinates_responses.go | 303 ++++++++ .../coordinate/post_coordinates_parameters.go | 142 ++++ .../coordinate/post_coordinates_responses.go | 303 ++++++++ api/geo/v0.0.1/geo_client/cors/cors_client.go | 688 ++++++++++++++++++ ...ordinates_observable_options_parameters.go | 116 +++ ...oordinates_observable_options_responses.go | 92 +++ .../get_coordinates_options_parameters.go | 116 +++ .../cors/get_coordinates_options_responses.go | 92 +++ ..._counties_observable_options_parameters.go | 116 +++ ...t_counties_observable_options_responses.go | 92 +++ .../cors/get_counties_options_parameters.go | 116 +++ .../cors/get_counties_options_responses.go | 92 +++ ...countries_observable_options_parameters.go | 116 +++ ..._countries_observable_options_responses.go | 92 +++ .../cors/get_countries_options_parameters.go | 116 +++ .../cors/get_countries_options_responses.go | 92 +++ ...t_domains_observable_options_parameters.go | 116 +++ ...et_domains_observable_options_responses.go | 92 +++ .../cors/get_domains_options_parameters.go | 116 +++ .../cors/get_domains_options_responses.go | 92 +++ ...et_places_observable_options_parameters.go | 116 +++ ...get_places_observable_options_responses.go | 92 +++ .../cors/get_places_options_parameters.go | 116 +++ .../cors/get_places_options_responses.go | 92 +++ ...et_states_observable_options_parameters.go | 116 +++ ...get_states_observable_options_responses.go | 92 +++ .../cors/get_states_options_parameters.go | 116 +++ .../cors/get_states_options_responses.go | 92 +++ ..._tax_rate_observable_options_parameters.go | 116 +++ ...t_tax_rate_observable_options_responses.go | 92 +++ .../cors/get_tax_rates_options_parameters.go | 116 +++ .../cors/get_tax_rates_options_responses.go | 92 +++ ..._tax_type_observable_options_parameters.go | 116 +++ ...t_tax_type_observable_options_responses.go | 92 +++ .../cors/get_tax_types_options_parameters.go | 116 +++ .../cors/get_tax_types_options_responses.go | 92 +++ ...xus_codes_observable_options_parameters.go | 116 +++ ...exus_codes_observable_options_responses.go | 92 +++ .../get_taxnexus_codes_options_parameters.go | 116 +++ .../get_taxnexus_codes_options_responses.go | 92 +++ .../geo_client/country/country_client.go | 157 ++++ .../get_countries_observable_parameters.go | 182 +++++ .../get_countries_observable_responses.go | 301 ++++++++ .../country/get_countries_parameters.go | 247 +++++++ .../country/get_countries_responses.go | 303 ++++++++ .../country/post_countries_parameters.go | 139 ++++ .../country/post_countries_responses.go | 259 +++++++ .../v0.0.1/geo_client/county/county_client.go | 157 ++++ .../get_counties_observable_parameters.go | 246 +++++++ .../get_counties_observable_responses.go | 301 ++++++++ .../county/get_counties_parameters.go | 311 ++++++++ .../county/get_counties_responses.go | 303 ++++++++ .../county/post_counties_parameters.go | 139 ++++ .../county/post_counties_responses.go | 259 +++++++ .../v0.0.1/geo_client/domain/domain_client.go | 157 ++++ .../get_domain_observable_parameters.go | 116 +++ .../domain/get_domain_observable_responses.go | 301 ++++++++ .../domain/get_domains_parameters.go | 116 +++ .../domain/get_domains_responses.go | 303 ++++++++ .../domain/post_domains_parameters.go | 139 ++++ .../domain/post_domains_responses.go | 303 ++++++++ api/geo/v0.0.1/geo_client/geo_client.go | 161 ++++ .../place/get_place_observable_parameters.go | 214 ++++++ .../place/get_place_observable_responses.go | 301 ++++++++ .../geo_client/place/get_places_parameters.go | 279 +++++++ .../geo_client/place/get_places_responses.go | 303 ++++++++ .../v0.0.1/geo_client/place/place_client.go | 157 ++++ .../place/post_places_parameters.go | 142 ++++ .../geo_client/place/post_places_responses.go | 303 ++++++++ .../state/get_state_observable_parameters.go | 214 ++++++ .../state/get_state_observable_responses.go | 301 ++++++++ .../geo_client/state/get_states_parameters.go | 279 +++++++ .../geo_client/state/get_states_responses.go | 303 ++++++++ .../state/post_states_parameters.go | 142 ++++ .../geo_client/state/post_states_responses.go | 303 ++++++++ .../v0.0.1/geo_client/state/state_client.go | 157 ++++ .../get_tax_rate_observable_parameters.go | 207 ++++++ .../get_tax_rate_observable_responses.go | 301 ++++++++ .../tax_rate/get_tax_rates_parameters.go | 207 ++++++ .../tax_rate/get_tax_rates_responses.go | 303 ++++++++ .../geo_client/tax_rate/tax_rate_client.go | 118 +++ .../get_tax_types_observable_parameters.go | 116 +++ .../get_tax_types_observable_responses.go | 301 ++++++++ .../tax_type/get_tax_types_parameters.go | 471 ++++++++++++ .../tax_type/get_tax_types_responses.go | 303 ++++++++ .../tax_type/post_tax_types_parameters.go | 142 ++++ .../tax_type/post_tax_types_responses.go | 303 ++++++++ .../geo_client/tax_type/tax_type_client.go | 157 ++++ ...get_taxnexus_code_observable_parameters.go | 214 ++++++ .../get_taxnexus_code_observable_responses.go | 301 ++++++++ .../get_taxnexus_codes_parameters.go | 215 ++++++ .../get_taxnexus_codes_responses.go | 303 ++++++++ .../post_taxnexus_codes_parameters.go | 142 ++++ .../post_taxnexus_codes_responses.go | 303 ++++++++ .../taxnexus_code/taxnexus_code_client.go | 157 ++++ api/geo/v0.0.1/geo_models/address.go | 65 ++ api/geo/v0.0.1/geo_models/coordinate.go | 183 +++++ api/geo/v0.0.1/geo_models/coordinate_basic.go | 114 +++ .../geo_models/coordinate_basic_response.go | 109 +++ .../v0.0.1/geo_models/coordinate_request.go | 84 +++ .../geo_models/coordinate_request_item.go | 50 ++ .../v0.0.1/geo_models/coordinate_response.go | 109 +++ api/geo/v0.0.1/geo_models/country.go | 159 ++++ api/geo/v0.0.1/geo_models/country_request.go | 84 +++ api/geo/v0.0.1/geo_models/country_response.go | 109 +++ api/geo/v0.0.1/geo_models/county.go | 220 ++++++ api/geo/v0.0.1/geo_models/county_request.go | 84 +++ api/geo/v0.0.1/geo_models/county_response.go | 109 +++ api/geo/v0.0.1/geo_models/delete_response.go | 109 +++ api/geo/v0.0.1/geo_models/domain.go | 56 ++ api/geo/v0.0.1/geo_models/domain_request.go | 84 +++ api/geo/v0.0.1/geo_models/domain_response.go | 109 +++ api/geo/v0.0.1/geo_models/error.go | 53 ++ api/geo/v0.0.1/geo_models/invalid_error.go | 104 +++ api/geo/v0.0.1/geo_models/message.go | 53 ++ api/geo/v0.0.1/geo_models/pagination.go | 56 ++ api/geo/v0.0.1/geo_models/place.go | 226 ++++++ api/geo/v0.0.1/geo_models/place_request.go | 84 +++ api/geo/v0.0.1/geo_models/place_response.go | 109 +++ api/geo/v0.0.1/geo_models/request_meta.go | 68 ++ api/geo/v0.0.1/geo_models/response_meta.go | 108 +++ api/geo/v0.0.1/geo_models/state.go | 189 +++++ api/geo/v0.0.1/geo_models/state_request.go | 84 +++ api/geo/v0.0.1/geo_models/state_response.go | 109 +++ api/geo/v0.0.1/geo_models/tax_instance.go | 74 ++ api/geo/v0.0.1/geo_models/tax_rate.go | 86 +++ .../v0.0.1/geo_models/tax_rate_response.go | 109 +++ api/geo/v0.0.1/geo_models/tax_type.go | 173 +++++ api/geo/v0.0.1/geo_models/tax_type_id.go | 47 ++ api/geo/v0.0.1/geo_models/tax_type_request.go | 84 +++ .../v0.0.1/geo_models/tax_type_response.go | 109 +++ api/geo/v0.0.1/geo_models/taxnexus_code.go | 110 +++ .../geo_models/taxnexus_code_request.go | 84 +++ .../geo_models/taxnexus_code_response.go | 109 +++ .../accounting_rule/accounting_rule_client.go | 118 +++ .../get_accounting_rules_parameters.go | 240 ++++++ .../get_accounting_rules_responses.go | 268 +++++++ .../post_accounting_rules_parameters.go | 142 ++++ .../post_accounting_rules_responses.go | 268 +++++++ .../accounting_ruleset_client.go | 118 +++ .../get_accounting_rulesets_parameters.go | 208 ++++++ .../get_accounting_rulesets_responses.go | 268 +++++++ .../post_accounting_rulesets_parameters.go | 142 ++++ .../post_accounting_rulesets_responses.go | 268 +++++++ .../v0.0.1/ledger_client/coa/coa_client.go | 114 +++ .../ledger_client/coa/get_coas_parameters.go | 246 +++++++ .../ledger_client/coa/get_coas_responses.go | 268 +++++++ .../ledger_client/coa/post_coas_parameters.go | 142 ++++ .../ledger_client/coa/post_coas_responses.go | 268 +++++++ .../gl_account/get_gl_accounts_parameters.go | 247 +++++++ .../gl_account/get_gl_accounts_responses.go | 268 +++++++ .../gl_account/gl_account_client.go | 118 +++ .../gl_account/post_gl_accounts_parameters.go | 142 ++++ .../gl_account/post_gl_accounts_responses.go | 268 +++++++ .../gl_balance/get_gl_balances_parameters.go | 246 +++++++ .../gl_balance/get_gl_balances_responses.go | 268 +++++++ .../gl_balance/gl_balance_client.go | 118 +++ .../gl_balance/post_gl_balances_parameters.go | 142 ++++ .../gl_balance/post_gl_balances_responses.go | 268 +++++++ .../get_journal_entries_parameters.go | 311 ++++++++ .../get_journal_entries_responses.go | 268 +++++++ .../journal_entry/journal_entry_client.go | 118 +++ .../post_journal_entries_parameters.go | 142 ++++ .../post_journal_entries_responses.go | 268 +++++++ .../get_journal_items_parameters.go | 240 ++++++ .../get_journal_items_responses.go | 268 +++++++ .../journal_item/journal_item_client.go | 79 ++ .../v0.0.1/ledger_client/ledger_client.go | 151 ++++ .../period/get_periods_parameters.go | 279 +++++++ .../period/get_periods_responses.go | 268 +++++++ .../ledger_client/period/period_client.go | 118 +++ .../period/post_periods_parameters.go | 142 ++++ .../period/post_periods_responses.go | 268 +++++++ .../v0.0.1/ledger_models/accounting_rule.go | 104 +++ .../ledger_models/accounting_rule_request.go | 84 +++ .../ledger_models/accounting_rule_response.go | 109 +++ .../ledger_models/accounting_ruleset.go | 111 +++ .../ledger_models/accounting_ruleset_item.go | 53 ++ .../accounting_ruleset_request.go | 84 +++ .../accounting_ruleset_response.go | 109 +++ api/ledger/v0.0.1/ledger_models/coa.go | 120 +++ api/ledger/v0.0.1/ledger_models/coa_item.go | 83 +++ .../v0.0.1/ledger_models/coa_request.go | 84 +++ .../v0.0.1/ledger_models/coa_response.go | 109 +++ .../v0.0.1/ledger_models/delete_response.go | 109 +++ api/ledger/v0.0.1/ledger_models/error.go | 53 ++ api/ledger/v0.0.1/ledger_models/gl_account.go | 147 ++++ .../ledger_models/gl_account_request.go | 84 +++ .../ledger_models/gl_account_response.go | 109 +++ api/ledger/v0.0.1/ledger_models/gl_balance.go | 101 +++ .../ledger_models/gl_balance_request.go | 84 +++ .../ledger_models/gl_balance_response.go | 109 +++ .../v0.0.1/ledger_models/invalid_error.go | 104 +++ .../v0.0.1/ledger_models/journal_entry.go | 141 ++++ .../ledger_models/journal_entry_request.go | 84 +++ .../ledger_models/journal_entry_response.go | 109 +++ .../v0.0.1/ledger_models/journal_item.go | 107 +++ .../ledger_models/journal_item_response.go | 109 +++ .../ledger_models/journal_item_summary.go | 68 ++ .../journal_item_summary_response.go | 109 +++ api/ledger/v0.0.1/ledger_models/message.go | 53 ++ api/ledger/v0.0.1/ledger_models/pagination.go | 56 ++ api/ledger/v0.0.1/ledger_models/period.go | 98 +++ .../v0.0.1/ledger_models/period_request.go | 84 +++ .../v0.0.1/ledger_models/period_response.go | 109 +++ .../v0.0.1/ledger_models/put_response.go | 109 +++ .../v0.0.1/ledger_models/request_meta.go | 68 ++ .../v0.0.1/ledger_models/response_meta.go | 108 +++ .../cash_receipt/cash_receipt_client.go | 196 +++++ .../delete_cash_receipt_parameters.go | 150 ++++ .../delete_cash_receipt_responses.go | 298 ++++++++ .../get_cash_receipts_parameters.go | 215 ++++++ .../get_cash_receipts_responses.go | 303 ++++++++ .../post_cash_receipts_parameters.go | 142 ++++ .../post_cash_receipts_responses.go | 303 ++++++++ .../put_cash_receipts_parameters.go | 142 ++++ .../put_cash_receipts_responses.go | 303 ++++++++ .../v0.0.1/ops_client/charge/charge_client.go | 196 +++++ .../charge/delete_charge_parameters.go | 150 ++++ .../charge/delete_charge_responses.go | 298 ++++++++ .../charge/get_charges_parameters.go | 215 ++++++ .../charge/get_charges_responses.go | 303 ++++++++ .../charge/post_charges_parameters.go | 142 ++++ .../charge/post_charges_responses.go | 303 ++++++++ .../charge/put_charges_parameters.go | 142 ++++ .../charge/put_charges_responses.go | 298 ++++++++ .../cors/cash_receipt_options_parameters.go | 116 +++ .../cors/cash_receipt_options_responses.go | 92 +++ .../cors/charge_options_parameters.go | 116 +++ .../cors/charge_options_responses.go | 92 +++ api/ops/v0.0.1/ops_client/cors/cors_client.go | 544 ++++++++++++++ .../ops_client/cors/eft_options_parameters.go | 116 +++ .../ops_client/cors/eft_options_responses.go | 92 +++ .../cors/invoice_options_parameters.go | 116 +++ .../cors/invoice_options_responses.go | 92 +++ .../cors/orders_options_parameters.go | 116 +++ .../cors/orders_options_responses.go | 92 +++ .../cors/payment_method_options_parameters.go | 116 +++ .../cors/payment_method_options_responses.go | 92 +++ .../ops_client/cors/po_options_parameters.go | 116 +++ .../ops_client/cors/po_options_responses.go | 92 +++ .../product_options_observable_parameters.go | 116 +++ .../product_options_observable_responses.go | 92 +++ .../cors/product_options_parameters.go | 116 +++ .../cors/product_options_responses.go | 92 +++ .../cors/quote_options_parameters.go | 116 +++ .../cors/quote_options_responses.go | 92 +++ .../cors/tax_invoice_options_parameters.go | 116 +++ .../cors/tax_invoice_options_responses.go | 92 +++ .../cors/tax_order_options_parameters.go | 116 +++ .../cors/tax_order_options_responses.go | 92 +++ .../cors/tax_po_options_parameters.go | 116 +++ .../cors/tax_po_options_responses.go | 92 +++ .../cors/tax_quote_options_parameters.go | 116 +++ .../cors/tax_quote_options_responses.go | 92 +++ api/ops/v0.0.1/ops_client/eft/eft_client.go | 157 ++++ .../ops_client/eft/get_efts_parameters.go | 215 ++++++ .../ops_client/eft/get_efts_responses.go | 303 ++++++++ .../ops_client/eft/post_efts_parameters.go | 142 ++++ .../ops_client/eft/post_efts_responses.go | 303 ++++++++ .../ops_client/eft/put_efts_parameters.go | 142 ++++ .../ops_client/eft/put_efts_responses.go | 298 ++++++++ .../invoice/delete_invoice_parameters.go | 150 ++++ .../invoice/delete_invoice_responses.go | 298 ++++++++ .../invoice/get_invoices_parameters.go | 215 ++++++ .../invoice/get_invoices_responses.go | 303 ++++++++ .../ops_client/invoice/invoice_client.go | 196 +++++ .../invoice/post_invoices_parameters.go | 142 ++++ .../invoice/post_invoices_responses.go | 303 ++++++++ .../invoice/put_invoices_parameters.go | 142 ++++ .../invoice/put_invoices_responses.go | 298 ++++++++ api/ops/v0.0.1/ops_client/ops_client.go | 166 +++++ .../order/delete_order_parameters.go | 150 ++++ .../order/delete_order_responses.go | 298 ++++++++ .../ops_client/order/get_orders_parameters.go | 215 ++++++ .../ops_client/order/get_orders_responses.go | 303 ++++++++ .../v0.0.1/ops_client/order/order_client.go | 196 +++++ .../order/post_orders_parameters.go | 142 ++++ .../ops_client/order/post_orders_responses.go | 303 ++++++++ .../ops_client/order/put_orders_parameters.go | 142 ++++ .../ops_client/order/put_orders_responses.go | 298 ++++++++ .../delete_payment_method_parameters.go | 150 ++++ .../delete_payment_method_responses.go | 298 ++++++++ .../get_payment_methods_parameters.go | 215 ++++++ .../get_payment_methods_responses.go | 303 ++++++++ .../payment_method/payment_method_client.go | 196 +++++ .../post_payment_methods_parameters.go | 142 ++++ .../post_payment_methods_responses.go | 303 ++++++++ .../put_payment_methods_parameters.go | 142 ++++ .../put_payment_methods_responses.go | 298 ++++++++ .../product/delete_product_parameters.go | 150 ++++ .../product/delete_product_responses.go | 303 ++++++++ .../get_products_observable_parameters.go | 247 +++++++ .../get_products_observable_responses.go | 301 ++++++++ .../product/get_products_parameters.go | 311 ++++++++ .../product/get_products_responses.go | 303 ++++++++ .../product/post_products_parameters.go | 142 ++++ .../product/post_products_responses.go | 303 ++++++++ .../ops_client/product/product_client.go | 235 ++++++ .../product/put_products_parameters.go | 142 ++++ .../product/put_products_responses.go | 298 ++++++++ .../delete_purchase_order_parameters.go | 150 ++++ .../delete_purchase_order_responses.go | 298 ++++++++ .../get_purchase_orders_parameters.go | 215 ++++++ .../get_purchase_orders_responses.go | 303 ++++++++ .../post_purchase_orders_parameters.go | 142 ++++ .../post_purchase_orders_responses.go | 303 ++++++++ .../purchase_order/purchase_order_client.go | 196 +++++ .../put_purchase_orders_parameters.go | 142 ++++ .../put_purchase_orders_responses.go | 298 ++++++++ .../quote/delete_quote_parameters.go | 150 ++++ .../quote/delete_quote_responses.go | 298 ++++++++ .../ops_client/quote/get_quotes_parameters.go | 215 ++++++ .../ops_client/quote/get_quotes_responses.go | 303 ++++++++ .../quote/post_quotes_parameters.go | 142 ++++ .../ops_client/quote/post_quotes_responses.go | 303 ++++++++ .../ops_client/quote/put_quotes_parameters.go | 142 ++++ .../ops_client/quote/put_quotes_responses.go | 303 ++++++++ .../v0.0.1/ops_client/quote/quote_client.go | 196 +++++ .../tax/post_taxes_invoices_parameters.go | 142 ++++ .../tax/post_taxes_invoices_responses.go | 303 ++++++++ .../tax/post_taxes_orders_parameters.go | 142 ++++ .../tax/post_taxes_orders_responses.go | 303 ++++++++ .../tax/post_taxes_pos_parameters.go | 142 ++++ .../tax/post_taxes_pos_responses.go | 303 ++++++++ .../tax/post_taxes_quotes_parameters.go | 142 ++++ .../tax/post_taxes_quotes_responses.go | 303 ++++++++ api/ops/v0.0.1/ops_client/tax/tax_client.go | 196 +++++ api/ops/v0.0.1/ops_models/address.go | 65 ++ api/ops/v0.0.1/ops_models/cash_receipt.go | 161 ++++ .../v0.0.1/ops_models/cash_receipt_request.go | 84 +++ .../ops_models/cash_receipt_response.go | 109 +++ api/ops/v0.0.1/ops_models/charge.go | 107 +++ api/ops/v0.0.1/ops_models/charge_request.go | 84 +++ api/ops/v0.0.1/ops_models/charge_response.go | 109 +++ api/ops/v0.0.1/ops_models/contract.go | 98 +++ api/ops/v0.0.1/ops_models/credit_card.go | 86 +++ api/ops/v0.0.1/ops_models/delete_response.go | 109 +++ api/ops/v0.0.1/ops_models/eft.go | 156 ++++ api/ops/v0.0.1/ops_models/eft_item.go | 71 ++ api/ops/v0.0.1/ops_models/eft_request.go | 84 +++ api/ops/v0.0.1/ops_models/eft_response.go | 109 +++ api/ops/v0.0.1/ops_models/error.go | 53 ++ api/ops/v0.0.1/ops_models/invalid_error.go | 104 +++ api/ops/v0.0.1/ops_models/invoice.go | 474 ++++++++++++ api/ops/v0.0.1/ops_models/invoice_basic.go | 244 +++++++ api/ops/v0.0.1/ops_models/invoice_item.go | 131 ++++ api/ops/v0.0.1/ops_models/invoice_request.go | 84 +++ api/ops/v0.0.1/ops_models/invoice_response.go | 109 +++ api/ops/v0.0.1/ops_models/item_basic.go | 83 +++ api/ops/v0.0.1/ops_models/message.go | 50 ++ api/ops/v0.0.1/ops_models/order.go | 432 +++++++++++ api/ops/v0.0.1/ops_models/order_item.go | 170 +++++ api/ops/v0.0.1/ops_models/order_request.go | 84 +++ api/ops/v0.0.1/ops_models/order_response.go | 109 +++ api/ops/v0.0.1/ops_models/pagination.go | 56 ++ api/ops/v0.0.1/ops_models/payment_method.go | 125 ++++ .../ops_models/payment_method_request.go | 84 +++ .../ops_models/payment_method_response.go | 109 +++ api/ops/v0.0.1/ops_models/pricebook.go | 74 ++ api/ops/v0.0.1/ops_models/pricebook_entry.go | 83 +++ api/ops/v0.0.1/ops_models/product.go | 161 ++++ api/ops/v0.0.1/ops_models/product_request.go | 84 +++ api/ops/v0.0.1/ops_models/product_response.go | 109 +++ api/ops/v0.0.1/ops_models/purchase_order.go | 390 ++++++++++ .../v0.0.1/ops_models/purchase_order_item.go | 134 ++++ .../ops_models/purchase_order_request.go | 84 +++ .../ops_models/purchase_order_response.go | 109 +++ api/ops/v0.0.1/ops_models/put_response.go | 109 +++ api/ops/v0.0.1/ops_models/quote.go | 458 ++++++++++++ api/ops/v0.0.1/ops_models/quote_basic.go | 390 ++++++++++ api/ops/v0.0.1/ops_models/quote_item.go | 125 ++++ api/ops/v0.0.1/ops_models/quote_request.go | 84 +++ api/ops/v0.0.1/ops_models/quote_response.go | 109 +++ api/ops/v0.0.1/ops_models/response_meta.go | 108 +++ api/ops/v0.0.1/ops_models/subscription.go | 149 ++++ .../v0.0.1/ops_models/subscription_request.go | 84 +++ .../ops_models/subscription_response.go | 109 +++ api/ops/v0.0.1/ops_models/tax_transaction.go | 182 +++++ .../ops_models/tax_transaction_response.go | 109 +++ api/ops/v0.0.1/ops_models/total.go | 144 ++++ api/ops/v0.0.1/ops_models/total_item.go | 99 +++ api/ops/v0.0.1/ops_models/total_tax_item.go | 56 ++ api/stash/v0.0.1/stash_client/stash_client.go | 116 +++ .../stash_pdf/post_pdfs_parameters.go | 142 ++++ .../stash_pdf/post_pdfs_responses.go | 268 +++++++ .../stash_pdf/stash_pdf_client.go | 79 ++ api/stash/v0.0.1/stash_models/document.go | 62 ++ .../v0.0.1/stash_models/document_response.go | 109 +++ api/stash/v0.0.1/stash_models/error.go | 53 ++ api/stash/v0.0.1/stash_models/new_p_d_f.go | 71 ++ .../v0.0.1/stash_models/p_d_f_request.go | 109 +++ api/stash/v0.0.1/stash_models/request_meta.go | 68 ++ .../v0.0.1/stash_models/response_meta.go | 77 ++ .../workflow_client/app_log/app_log_client.go | 79 ++ .../app_log/post_app_logs_parameters.go | 142 ++++ .../app_log/post_app_logs_responses.go | 298 ++++++++ .../cors/app_log_options_parameters.go | 116 +++ .../cors/app_log_options_responses.go | 92 +++ .../workflow_client/cors/cors_client.go | 148 ++++ .../cors/email_message_options_parameters.go | 116 +++ .../cors/email_message_options_responses.go | 92 +++ ...tgoing_email_message_options_parameters.go | 116 +++ ...utgoing_email_message_options_responses.go | 92 +++ .../email_message/email_message_client.go | 79 ++ .../get_email_messages_parameters.go | 150 ++++ .../get_email_messages_responses.go | 298 ++++++++ .../outgoing_email_message_client.go | 79 ++ ...post_outgoing_email_messages_parameters.go | 142 ++++ .../post_outgoing_email_messages_responses.go | 298 ++++++++ .../v0.0.1/workflow_client/workflow_client.go | 131 ++++ .../v0.0.1/workflow_models/app_log.go | 77 ++ .../v0.0.1/workflow_models/app_log_request.go | 109 +++ .../workflow_models/app_log_response.go | 109 +++ .../v0.0.1/workflow_models/document.go | 226 ++++++ .../v0.0.1/workflow_models/email_message.go | 170 +++++ .../workflow_models/email_message_request.go | 109 +++ .../email_messages_response.go | 109 +++ api/workflow/v0.0.1/workflow_models/error.go | 53 ++ .../v0.0.1/workflow_models/headers.go | 50 ++ .../workflow_models/outgoing_email_message.go | 120 +++ .../outgoing_email_message_request.go | 109 +++ .../v0.0.1/workflow_models/request_meta.go | 68 ++ .../v0.0.1/workflow_models/response_meta.go | 77 ++ go.mod | 11 + go.sum | 279 +++++++ 831 files changed, 143488 insertions(+) create mode 100644 api/auth/v0.0.1/auth_client/auth_client.go create mode 100644 api/auth/v0.0.1/auth_client/user/get_users_parameters.go create mode 100644 api/auth/v0.0.1/auth_client/user/get_users_responses.go create mode 100644 api/auth/v0.0.1/auth_client/user/user_client.go create mode 100644 api/auth/v0.0.1/auth_models/address.go create mode 100644 api/auth/v0.0.1/auth_models/error.go create mode 100644 api/auth/v0.0.1/auth_models/response_meta.go create mode 100644 api/auth/v0.0.1/auth_models/tenant_user.go create mode 100644 api/auth/v0.0.1/auth_models/user.go create mode 100644 api/auth/v0.0.1/auth_models/user_response.go create mode 100644 api/auth/v0.0.1/auth_models/user_role.go create mode 100644 api/crm/v0.0.1/crm_client/accounts/accounts_client.go create mode 100644 api/crm/v0.0.1/crm_client/accounts/delete_account_parameters.go create mode 100644 api/crm/v0.0.1/crm_client/accounts/delete_account_responses.go create mode 100644 api/crm/v0.0.1/crm_client/accounts/get_accounts_observable_parameters.go create mode 100644 api/crm/v0.0.1/crm_client/accounts/get_accounts_observable_responses.go create mode 100644 api/crm/v0.0.1/crm_client/accounts/get_accounts_parameters.go create mode 100644 api/crm/v0.0.1/crm_client/accounts/get_accounts_responses.go create mode 100644 api/crm/v0.0.1/crm_client/accounts/post_accounts_parameters.go create mode 100644 api/crm/v0.0.1/crm_client/accounts/post_accounts_responses.go create mode 100644 api/crm/v0.0.1/crm_client/accounts/put_account_parameters.go create mode 100644 api/crm/v0.0.1/crm_client/accounts/put_account_responses.go create mode 100644 api/crm/v0.0.1/crm_client/companies/companies_client.go create mode 100644 api/crm/v0.0.1/crm_client/companies/get_companies_observable_parameters.go create mode 100644 api/crm/v0.0.1/crm_client/companies/get_companies_observable_responses.go create mode 100644 api/crm/v0.0.1/crm_client/companies/get_companies_parameters.go create mode 100644 api/crm/v0.0.1/crm_client/companies/get_companies_responses.go create mode 100644 api/crm/v0.0.1/crm_client/companies/post_companies_parameters.go create mode 100644 api/crm/v0.0.1/crm_client/companies/post_companies_responses.go create mode 100644 api/crm/v0.0.1/crm_client/contacts/contacts_client.go create mode 100644 api/crm/v0.0.1/crm_client/contacts/delete_contact_parameters.go create mode 100644 api/crm/v0.0.1/crm_client/contacts/delete_contact_responses.go create mode 100644 api/crm/v0.0.1/crm_client/contacts/get_contacts_observable_parameters.go create mode 100644 api/crm/v0.0.1/crm_client/contacts/get_contacts_observable_responses.go create mode 100644 api/crm/v0.0.1/crm_client/contacts/get_contacts_parameters.go create mode 100644 api/crm/v0.0.1/crm_client/contacts/get_contacts_responses.go create mode 100644 api/crm/v0.0.1/crm_client/contacts/post_contacts_parameters.go create mode 100644 api/crm/v0.0.1/crm_client/contacts/post_contacts_responses.go create mode 100644 api/crm/v0.0.1/crm_client/contacts/put_contacts_parameters.go create mode 100644 api/crm/v0.0.1/crm_client/contacts/put_contacts_responses.go create mode 100644 api/crm/v0.0.1/crm_client/cors/account_options_observable_parameters.go create mode 100644 api/crm/v0.0.1/crm_client/cors/account_options_observable_responses.go create mode 100644 api/crm/v0.0.1/crm_client/cors/account_options_parameters.go create mode 100644 api/crm/v0.0.1/crm_client/cors/account_options_responses.go create mode 100644 api/crm/v0.0.1/crm_client/cors/company_observable_options_parameters.go create mode 100644 api/crm/v0.0.1/crm_client/cors/company_observable_options_responses.go create mode 100644 api/crm/v0.0.1/crm_client/cors/company_options_parameters.go create mode 100644 api/crm/v0.0.1/crm_client/cors/company_options_responses.go create mode 100644 api/crm/v0.0.1/crm_client/cors/contact_options_observable_parameters.go create mode 100644 api/crm/v0.0.1/crm_client/cors/contact_options_observable_responses.go create mode 100644 api/crm/v0.0.1/crm_client/cors/contact_options_parameters.go create mode 100644 api/crm/v0.0.1/crm_client/cors/contact_options_responses.go create mode 100644 api/crm/v0.0.1/crm_client/cors/cors_client.go create mode 100644 api/crm/v0.0.1/crm_client/cors/lead_options_observable_parameters.go create mode 100644 api/crm/v0.0.1/crm_client/cors/lead_options_observable_responses.go create mode 100644 api/crm/v0.0.1/crm_client/cors/lead_options_parameters.go create mode 100644 api/crm/v0.0.1/crm_client/cors/lead_options_responses.go create mode 100644 api/crm/v0.0.1/crm_client/crm_client.go create mode 100644 api/crm/v0.0.1/crm_client/leads/delete_lead_parameters.go create mode 100644 api/crm/v0.0.1/crm_client/leads/delete_lead_responses.go create mode 100644 api/crm/v0.0.1/crm_client/leads/get_leads_observable_parameters.go create mode 100644 api/crm/v0.0.1/crm_client/leads/get_leads_observable_responses.go create mode 100644 api/crm/v0.0.1/crm_client/leads/get_leads_parameters.go create mode 100644 api/crm/v0.0.1/crm_client/leads/get_leads_responses.go create mode 100644 api/crm/v0.0.1/crm_client/leads/leads_client.go create mode 100644 api/crm/v0.0.1/crm_client/leads/post_leads_parameters.go create mode 100644 api/crm/v0.0.1/crm_client/leads/post_leads_responses.go create mode 100644 api/crm/v0.0.1/crm_client/leads/put_leads_parameters.go create mode 100644 api/crm/v0.0.1/crm_client/leads/put_leads_responses.go create mode 100644 api/crm/v0.0.1/crm_models/account.go create mode 100644 api/crm/v0.0.1/crm_models/account_basic.go create mode 100644 api/crm/v0.0.1/crm_models/account_basic_response.go create mode 100644 api/crm/v0.0.1/crm_models/account_request.go create mode 100644 api/crm/v0.0.1/crm_models/account_response.go create mode 100644 api/crm/v0.0.1/crm_models/address.go create mode 100644 api/crm/v0.0.1/crm_models/company.go create mode 100644 api/crm/v0.0.1/crm_models/company_request.go create mode 100644 api/crm/v0.0.1/crm_models/company_response.go create mode 100644 api/crm/v0.0.1/crm_models/contact.go create mode 100644 api/crm/v0.0.1/crm_models/contact_request.go create mode 100644 api/crm/v0.0.1/crm_models/contact_response.go create mode 100644 api/crm/v0.0.1/crm_models/delete_response.go create mode 100644 api/crm/v0.0.1/crm_models/error.go create mode 100644 api/crm/v0.0.1/crm_models/invalid_error.go create mode 100644 api/crm/v0.0.1/crm_models/lead.go create mode 100644 api/crm/v0.0.1/crm_models/lead_request.go create mode 100644 api/crm/v0.0.1/crm_models/lead_response.go create mode 100644 api/crm/v0.0.1/crm_models/message.go create mode 100644 api/crm/v0.0.1/crm_models/pagination.go create mode 100644 api/crm/v0.0.1/crm_models/request_meta.go create mode 100644 api/crm/v0.0.1/crm_models/response_meta.go create mode 100644 api/devops/regs_client/authority/authority_client.go create mode 100644 api/devops/regs_client/authority/get_authorities_parameters.go create mode 100644 api/devops/regs_client/authority/get_authorities_responses.go create mode 100644 api/devops/regs_client/authority/post_authorities_parameters.go create mode 100644 api/devops/regs_client/authority/post_authorities_responses.go create mode 100644 api/devops/regs_client/authority/put_authorities_parameters.go create mode 100644 api/devops/regs_client/authority/put_authorities_responses.go create mode 100644 api/devops/regs_client/backend/backend_client.go create mode 100644 api/devops/regs_client/backend/delete_backend_parameters.go create mode 100644 api/devops/regs_client/backend/delete_backend_responses.go create mode 100644 api/devops/regs_client/backend/get_backends_parameters.go create mode 100644 api/devops/regs_client/backend/get_backends_responses.go create mode 100644 api/devops/regs_client/backend/post_backends_parameters.go create mode 100644 api/devops/regs_client/backend/post_backends_responses.go create mode 100644 api/devops/regs_client/backend/put_backends_parameters.go create mode 100644 api/devops/regs_client/backend/put_backends_responses.go create mode 100644 api/devops/regs_client/cors/authority_options_parameters.go create mode 100644 api/devops/regs_client/cors/authority_options_responses.go create mode 100644 api/devops/regs_client/cors/backend_options_parameters.go create mode 100644 api/devops/regs_client/cors/backend_options_responses.go create mode 100644 api/devops/regs_client/cors/cors_client.go create mode 100644 api/devops/regs_client/cors/filing_options_parameters.go create mode 100644 api/devops/regs_client/cors/filing_options_responses.go create mode 100644 api/devops/regs_client/cors/filing_type_options_parameters.go create mode 100644 api/devops/regs_client/cors/filing_type_options_responses.go create mode 100644 api/devops/regs_client/cors/license_options_parameters.go create mode 100644 api/devops/regs_client/cors/license_options_responses.go create mode 100644 api/devops/regs_client/cors/license_type_options_parameters.go create mode 100644 api/devops/regs_client/cors/license_type_options_responses.go create mode 100644 api/devops/regs_client/cors/notebook_options_parameters.go create mode 100644 api/devops/regs_client/cors/notebook_options_responses.go create mode 100644 api/devops/regs_client/cors/rating_engine_options_parameters.go create mode 100644 api/devops/regs_client/cors/rating_engine_options_responses.go create mode 100644 api/devops/regs_client/cors/submission_options_parameters.go create mode 100644 api/devops/regs_client/cors/submission_options_responses.go create mode 100644 api/devops/regs_client/cors/tax_type_account_options_parameters.go create mode 100644 api/devops/regs_client/cors/tax_type_account_options_responses.go create mode 100644 api/devops/regs_client/cors/transaction_options_parameters.go create mode 100644 api/devops/regs_client/cors/transaction_options_responses.go create mode 100644 api/devops/regs_client/filing/filing_client.go create mode 100644 api/devops/regs_client/filing/get_filings_parameters.go create mode 100644 api/devops/regs_client/filing/get_filings_responses.go create mode 100644 api/devops/regs_client/filing/post_filings_parameters.go create mode 100644 api/devops/regs_client/filing/post_filings_responses.go create mode 100644 api/devops/regs_client/filing/put_filings_parameters.go create mode 100644 api/devops/regs_client/filing/put_filings_responses.go create mode 100644 api/devops/regs_client/filing_type/filing_type_client.go create mode 100644 api/devops/regs_client/filing_type/get_filing_types_parameters.go create mode 100644 api/devops/regs_client/filing_type/get_filing_types_responses.go create mode 100644 api/devops/regs_client/filing_type/post_filing_types_parameters.go create mode 100644 api/devops/regs_client/filing_type/post_filing_types_responses.go create mode 100644 api/devops/regs_client/filing_type/put_filing_types_parameters.go create mode 100644 api/devops/regs_client/filing_type/put_filing_types_responses.go create mode 100644 api/devops/regs_client/license/get_licenses_parameters.go create mode 100644 api/devops/regs_client/license/get_licenses_responses.go create mode 100644 api/devops/regs_client/license/license_client.go create mode 100644 api/devops/regs_client/license/post_licenses_parameters.go create mode 100644 api/devops/regs_client/license/post_licenses_responses.go create mode 100644 api/devops/regs_client/license/put_licenses_parameters.go create mode 100644 api/devops/regs_client/license/put_licenses_responses.go create mode 100644 api/devops/regs_client/license_type/get_license_types_parameters.go create mode 100644 api/devops/regs_client/license_type/get_license_types_responses.go create mode 100644 api/devops/regs_client/license_type/license_type_client.go create mode 100644 api/devops/regs_client/license_type/post_license_types_parameters.go create mode 100644 api/devops/regs_client/license_type/post_license_types_responses.go create mode 100644 api/devops/regs_client/notebook/get_notebooks_parameters.go create mode 100644 api/devops/regs_client/notebook/get_notebooks_responses.go create mode 100644 api/devops/regs_client/notebook/notebook_client.go create mode 100644 api/devops/regs_client/notebook/post_notebooks_parameters.go create mode 100644 api/devops/regs_client/notebook/post_notebooks_responses.go create mode 100644 api/devops/regs_client/notebook/put_notebooks_parameters.go create mode 100644 api/devops/regs_client/notebook/put_notebooks_responses.go create mode 100644 api/devops/regs_client/rating_engine/delete_rating_engine_parameters.go create mode 100644 api/devops/regs_client/rating_engine/delete_rating_engine_responses.go create mode 100644 api/devops/regs_client/rating_engine/get_rating_engines_parameters.go create mode 100644 api/devops/regs_client/rating_engine/get_rating_engines_responses.go create mode 100644 api/devops/regs_client/rating_engine/post_rating_engines_parameters.go create mode 100644 api/devops/regs_client/rating_engine/post_rating_engines_responses.go create mode 100644 api/devops/regs_client/rating_engine/put_rating_engines_parameters.go create mode 100644 api/devops/regs_client/rating_engine/put_rating_engines_responses.go create mode 100644 api/devops/regs_client/rating_engine/rating_engine_client.go create mode 100644 api/devops/regs_client/regs_client.go create mode 100644 api/devops/regs_client/submission/get_submissions_parameters.go create mode 100644 api/devops/regs_client/submission/get_submissions_responses.go create mode 100644 api/devops/regs_client/submission/post_submissions_parameters.go create mode 100644 api/devops/regs_client/submission/post_submissions_responses.go create mode 100644 api/devops/regs_client/submission/put_submissions_parameters.go create mode 100644 api/devops/regs_client/submission/put_submissions_responses.go create mode 100644 api/devops/regs_client/submission/submission_client.go create mode 100644 api/devops/regs_client/tax_type_account/delete_type_accounts_parameters.go create mode 100644 api/devops/regs_client/tax_type_account/delete_type_accounts_responses.go create mode 100644 api/devops/regs_client/tax_type_account/get_tax_type_accounts_parameters.go create mode 100644 api/devops/regs_client/tax_type_account/get_tax_type_accounts_responses.go create mode 100644 api/devops/regs_client/tax_type_account/post_tax_type_accounts_parameters.go create mode 100644 api/devops/regs_client/tax_type_account/post_tax_type_accounts_responses.go create mode 100644 api/devops/regs_client/tax_type_account/put_tax_type_accounts_parameters.go create mode 100644 api/devops/regs_client/tax_type_account/put_tax_type_accounts_responses.go create mode 100644 api/devops/regs_client/tax_type_account/tax_type_account_client.go create mode 100644 api/devops/regs_client/transaction/get_transactions_parameters.go create mode 100644 api/devops/regs_client/transaction/get_transactions_responses.go create mode 100644 api/devops/regs_client/transaction/post_transactions_parameters.go create mode 100644 api/devops/regs_client/transaction/post_transactions_responses.go create mode 100644 api/devops/regs_client/transaction/put_transactions_parameters.go create mode 100644 api/devops/regs_client/transaction/put_transactions_responses.go create mode 100644 api/devops/regs_client/transaction/transaction_client.go create mode 100644 api/devops/regs_models/authority.go create mode 100644 api/devops/regs_models/authority_request.go create mode 100644 api/devops/regs_models/authority_response.go create mode 100644 api/devops/regs_models/backend.go create mode 100644 api/devops/regs_models/backend_request.go create mode 100644 api/devops/regs_models/backend_response.go create mode 100644 api/devops/regs_models/delete_response.go create mode 100644 api/devops/regs_models/error.go create mode 100644 api/devops/regs_models/filing.go create mode 100644 api/devops/regs_models/filing_request.go create mode 100644 api/devops/regs_models/filing_response.go create mode 100644 api/devops/regs_models/filing_schedule_item.go create mode 100644 api/devops/regs_models/filing_type.go create mode 100644 api/devops/regs_models/filing_type_instance.go create mode 100644 api/devops/regs_models/filing_type_request.go create mode 100644 api/devops/regs_models/filing_type_response.go create mode 100644 api/devops/regs_models/geo_license_type_instance.go create mode 100644 api/devops/regs_models/invalid_error.go create mode 100644 api/devops/regs_models/license.go create mode 100644 api/devops/regs_models/license_request.go create mode 100644 api/devops/regs_models/license_response.go create mode 100644 api/devops/regs_models/license_type.go create mode 100644 api/devops/regs_models/license_type_request.go create mode 100644 api/devops/regs_models/license_type_response.go create mode 100644 api/devops/regs_models/message.go create mode 100644 api/devops/regs_models/notebook.go create mode 100644 api/devops/regs_models/notebook_item.go create mode 100644 api/devops/regs_models/notebook_request.go create mode 100644 api/devops/regs_models/notebook_response.go create mode 100644 api/devops/regs_models/pagination.go create mode 100644 api/devops/regs_models/rating_engine.go create mode 100644 api/devops/regs_models/rating_engine_item.go create mode 100644 api/devops/regs_models/rating_engine_request.go create mode 100644 api/devops/regs_models/rating_engine_response.go create mode 100644 api/devops/regs_models/request_meta.go create mode 100644 api/devops/regs_models/response_meta.go create mode 100644 api/devops/regs_models/submission.go create mode 100644 api/devops/regs_models/submission_request.go create mode 100644 api/devops/regs_models/submission_response.go create mode 100644 api/devops/regs_models/tax_type_account.go create mode 100644 api/devops/regs_models/tax_type_account_request.go create mode 100644 api/devops/regs_models/tax_type_account_response.go create mode 100644 api/devops/regs_models/transaction.go create mode 100644 api/devops/regs_models/transaction_request.go create mode 100644 api/devops/regs_models/transaction_response.go create mode 100644 api/devops/v0.0.1/devops_client/cluster/cluster_client.go create mode 100644 api/devops/v0.0.1/devops_client/cluster/get_cluster_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/cluster/get_cluster_responses.go create mode 100644 api/devops/v0.0.1/devops_client/cluster/get_clusters_observable_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/cluster/get_clusters_observable_responses.go create mode 100644 api/devops/v0.0.1/devops_client/cluster/get_clusters_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/cluster/get_clusters_responses.go create mode 100644 api/devops/v0.0.1/devops_client/cluster/post_clusters_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/cluster/post_clusters_responses.go create mode 100644 api/devops/v0.0.1/devops_client/cluster/put_clusters_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/cluster/put_clusters_responses.go create mode 100644 api/devops/v0.0.1/devops_client/cors/cluster_options_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/cors/cluster_options_responses.go create mode 100644 api/devops/v0.0.1/devops_client/cors/clusters_options_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/cors/clusters_options_responses.go create mode 100644 api/devops/v0.0.1/devops_client/cors/cors_client.go create mode 100644 api/devops/v0.0.1/devops_client/cors/database_options_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/cors/database_options_responses.go create mode 100644 api/devops/v0.0.1/devops_client/cors/databases_options_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/cors/databases_options_responses.go create mode 100644 api/devops/v0.0.1/devops_client/cors/ingest_options_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/cors/ingest_options_responses.go create mode 100644 api/devops/v0.0.1/devops_client/cors/ingests_options_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/cors/ingests_options_responses.go create mode 100644 api/devops/v0.0.1/devops_client/cors/job_options_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/cors/job_options_responses.go create mode 100644 api/devops/v0.0.1/devops_client/cors/jobs_options_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/cors/jobs_options_responses.go create mode 100644 api/devops/v0.0.1/devops_client/cors/service_options_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/cors/service_options_responses.go create mode 100644 api/devops/v0.0.1/devops_client/cors/services_options_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/cors/services_options_responses.go create mode 100644 api/devops/v0.0.1/devops_client/cors/template_options_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/cors/template_options_responses.go create mode 100644 api/devops/v0.0.1/devops_client/cors/templates_options_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/cors/templates_options_responses.go create mode 100644 api/devops/v0.0.1/devops_client/cors/tenant_options_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/cors/tenant_options_responses.go create mode 100644 api/devops/v0.0.1/devops_client/cors/tenants_options_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/cors/tenants_options_responses.go create mode 100644 api/devops/v0.0.1/devops_client/cors/user_options_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/cors/user_options_responses.go create mode 100644 api/devops/v0.0.1/devops_client/cors/users_options_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/cors/users_options_responses.go create mode 100644 api/devops/v0.0.1/devops_client/database/database_client.go create mode 100644 api/devops/v0.0.1/devops_client/database/get_database_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/database/get_database_responses.go create mode 100644 api/devops/v0.0.1/devops_client/database/get_databases_observable_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/database/get_databases_observable_responses.go create mode 100644 api/devops/v0.0.1/devops_client/database/get_databases_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/database/get_databases_responses.go create mode 100644 api/devops/v0.0.1/devops_client/database/post_databases_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/database/post_databases_responses.go create mode 100644 api/devops/v0.0.1/devops_client/database/put_databases_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/database/put_databases_responses.go create mode 100644 api/devops/v0.0.1/devops_client/devops_client.go create mode 100644 api/devops/v0.0.1/devops_client/ingest/get_ingest_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/ingest/get_ingest_responses.go create mode 100644 api/devops/v0.0.1/devops_client/ingest/get_ingests_observable_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/ingest/get_ingests_observable_responses.go create mode 100644 api/devops/v0.0.1/devops_client/ingest/get_ingests_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/ingest/get_ingests_responses.go create mode 100644 api/devops/v0.0.1/devops_client/ingest/ingest_client.go create mode 100644 api/devops/v0.0.1/devops_client/ingest/post_ingests_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/ingest/post_ingests_responses.go create mode 100644 api/devops/v0.0.1/devops_client/ingest/put_ingests_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/ingest/put_ingests_responses.go create mode 100644 api/devops/v0.0.1/devops_client/job/get_job_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/job/get_job_responses.go create mode 100644 api/devops/v0.0.1/devops_client/job/get_jobs_observable_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/job/get_jobs_observable_responses.go create mode 100644 api/devops/v0.0.1/devops_client/job/get_jobs_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/job/get_jobs_responses.go create mode 100644 api/devops/v0.0.1/devops_client/job/job_client.go create mode 100644 api/devops/v0.0.1/devops_client/job/post_jobs_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/job/post_jobs_responses.go create mode 100644 api/devops/v0.0.1/devops_client/job/put_jobs_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/job/put_jobs_responses.go create mode 100644 api/devops/v0.0.1/devops_client/service/get_service_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/service/get_service_responses.go create mode 100644 api/devops/v0.0.1/devops_client/service/get_services_observable_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/service/get_services_observable_responses.go create mode 100644 api/devops/v0.0.1/devops_client/service/get_services_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/service/get_services_responses.go create mode 100644 api/devops/v0.0.1/devops_client/service/post_services_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/service/post_services_responses.go create mode 100644 api/devops/v0.0.1/devops_client/service/put_services_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/service/put_services_responses.go create mode 100644 api/devops/v0.0.1/devops_client/service/service_client.go create mode 100644 api/devops/v0.0.1/devops_client/template/get_template_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/template/get_template_responses.go create mode 100644 api/devops/v0.0.1/devops_client/template/get_templates_observable_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/template/get_templates_observable_responses.go create mode 100644 api/devops/v0.0.1/devops_client/template/get_templates_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/template/get_templates_responses.go create mode 100644 api/devops/v0.0.1/devops_client/template/post_templates_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/template/post_templates_responses.go create mode 100644 api/devops/v0.0.1/devops_client/template/template_client.go create mode 100644 api/devops/v0.0.1/devops_client/tenant/get_tenant_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/tenant/get_tenant_responses.go create mode 100644 api/devops/v0.0.1/devops_client/tenant/get_tenants_observable_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/tenant/get_tenants_observable_responses.go create mode 100644 api/devops/v0.0.1/devops_client/tenant/get_tenants_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/tenant/get_tenants_responses.go create mode 100644 api/devops/v0.0.1/devops_client/tenant/post_tenants_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/tenant/post_tenants_responses.go create mode 100644 api/devops/v0.0.1/devops_client/tenant/put_tenants_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/tenant/put_tenants_responses.go create mode 100644 api/devops/v0.0.1/devops_client/tenant/tenant_client.go create mode 100644 api/devops/v0.0.1/devops_client/user/get_user_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/user/get_user_responses.go create mode 100644 api/devops/v0.0.1/devops_client/user/get_users_observable_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/user/get_users_observable_responses.go create mode 100644 api/devops/v0.0.1/devops_client/user/get_users_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/user/get_users_responses.go create mode 100644 api/devops/v0.0.1/devops_client/user/post_users_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/user/post_users_responses.go create mode 100644 api/devops/v0.0.1/devops_client/user/put_users_parameters.go create mode 100644 api/devops/v0.0.1/devops_client/user/put_users_responses.go create mode 100644 api/devops/v0.0.1/devops_client/user/user_client.go create mode 100644 api/devops/v0.0.1/devops_models/address.go create mode 100644 api/devops/v0.0.1/devops_models/cluster.go create mode 100644 api/devops/v0.0.1/devops_models/cluster_request.go create mode 100644 api/devops/v0.0.1/devops_models/cluster_response.go create mode 100644 api/devops/v0.0.1/devops_models/database.go create mode 100644 api/devops/v0.0.1/devops_models/database_request.go create mode 100644 api/devops/v0.0.1/devops_models/database_response.go create mode 100644 api/devops/v0.0.1/devops_models/delete_response.go create mode 100644 api/devops/v0.0.1/devops_models/error.go create mode 100644 api/devops/v0.0.1/devops_models/ingest.go create mode 100644 api/devops/v0.0.1/devops_models/ingest_request.go create mode 100644 api/devops/v0.0.1/devops_models/ingest_response.go create mode 100644 api/devops/v0.0.1/devops_models/job.go create mode 100644 api/devops/v0.0.1/devops_models/job_request.go create mode 100644 api/devops/v0.0.1/devops_models/job_response.go create mode 100644 api/devops/v0.0.1/devops_models/message.go create mode 100644 api/devops/v0.0.1/devops_models/pagination.go create mode 100644 api/devops/v0.0.1/devops_models/request_meta.go create mode 100644 api/devops/v0.0.1/devops_models/response_meta.go create mode 100644 api/devops/v0.0.1/devops_models/role.go create mode 100644 api/devops/v0.0.1/devops_models/role_request.go create mode 100644 api/devops/v0.0.1/devops_models/role_response.go create mode 100644 api/devops/v0.0.1/devops_models/service.go create mode 100644 api/devops/v0.0.1/devops_models/service_request.go create mode 100644 api/devops/v0.0.1/devops_models/service_response.go create mode 100644 api/devops/v0.0.1/devops_models/template.go create mode 100644 api/devops/v0.0.1/devops_models/template_request.go create mode 100644 api/devops/v0.0.1/devops_models/template_response.go create mode 100644 api/devops/v0.0.1/devops_models/tenant.go create mode 100644 api/devops/v0.0.1/devops_models/tenant_request.go create mode 100644 api/devops/v0.0.1/devops_models/tenant_response.go create mode 100644 api/devops/v0.0.1/devops_models/tenant_user.go create mode 100644 api/devops/v0.0.1/devops_models/user.go create mode 100644 api/devops/v0.0.1/devops_models/user_request.go create mode 100644 api/devops/v0.0.1/devops_models/user_response.go create mode 100644 api/devops/v0.0.1/devops_models/user_role.go create mode 100644 api/geo/v0.0.1/geo_client/coordinate/coordinate_client.go create mode 100644 api/geo/v0.0.1/geo_client/coordinate/delete_coordinate_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/coordinate/delete_coordinate_responses.go create mode 100644 api/geo/v0.0.1/geo_client/coordinate/get_coordinate_basic_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/coordinate/get_coordinate_basic_responses.go create mode 100644 api/geo/v0.0.1/geo_client/coordinate/get_coordinate_observable_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/coordinate/get_coordinate_observable_responses.go create mode 100644 api/geo/v0.0.1/geo_client/coordinate/get_coordinates_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/coordinate/get_coordinates_responses.go create mode 100644 api/geo/v0.0.1/geo_client/coordinate/post_coordinates_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/coordinate/post_coordinates_responses.go create mode 100644 api/geo/v0.0.1/geo_client/cors/cors_client.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_coordinates_observable_options_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_coordinates_observable_options_responses.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_coordinates_options_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_coordinates_options_responses.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_counties_observable_options_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_counties_observable_options_responses.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_counties_options_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_counties_options_responses.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_countries_observable_options_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_countries_observable_options_responses.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_countries_options_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_countries_options_responses.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_domains_observable_options_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_domains_observable_options_responses.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_domains_options_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_domains_options_responses.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_places_observable_options_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_places_observable_options_responses.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_places_options_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_places_options_responses.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_states_observable_options_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_states_observable_options_responses.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_states_options_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_states_options_responses.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_tax_rate_observable_options_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_tax_rate_observable_options_responses.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_tax_rates_options_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_tax_rates_options_responses.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_tax_type_observable_options_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_tax_type_observable_options_responses.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_tax_types_options_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_tax_types_options_responses.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_taxnexus_codes_observable_options_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_taxnexus_codes_observable_options_responses.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_taxnexus_codes_options_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/cors/get_taxnexus_codes_options_responses.go create mode 100644 api/geo/v0.0.1/geo_client/country/country_client.go create mode 100644 api/geo/v0.0.1/geo_client/country/get_countries_observable_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/country/get_countries_observable_responses.go create mode 100644 api/geo/v0.0.1/geo_client/country/get_countries_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/country/get_countries_responses.go create mode 100644 api/geo/v0.0.1/geo_client/country/post_countries_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/country/post_countries_responses.go create mode 100644 api/geo/v0.0.1/geo_client/county/county_client.go create mode 100644 api/geo/v0.0.1/geo_client/county/get_counties_observable_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/county/get_counties_observable_responses.go create mode 100644 api/geo/v0.0.1/geo_client/county/get_counties_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/county/get_counties_responses.go create mode 100644 api/geo/v0.0.1/geo_client/county/post_counties_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/county/post_counties_responses.go create mode 100644 api/geo/v0.0.1/geo_client/domain/domain_client.go create mode 100644 api/geo/v0.0.1/geo_client/domain/get_domain_observable_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/domain/get_domain_observable_responses.go create mode 100644 api/geo/v0.0.1/geo_client/domain/get_domains_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/domain/get_domains_responses.go create mode 100644 api/geo/v0.0.1/geo_client/domain/post_domains_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/domain/post_domains_responses.go create mode 100644 api/geo/v0.0.1/geo_client/geo_client.go create mode 100644 api/geo/v0.0.1/geo_client/place/get_place_observable_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/place/get_place_observable_responses.go create mode 100644 api/geo/v0.0.1/geo_client/place/get_places_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/place/get_places_responses.go create mode 100644 api/geo/v0.0.1/geo_client/place/place_client.go create mode 100644 api/geo/v0.0.1/geo_client/place/post_places_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/place/post_places_responses.go create mode 100644 api/geo/v0.0.1/geo_client/state/get_state_observable_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/state/get_state_observable_responses.go create mode 100644 api/geo/v0.0.1/geo_client/state/get_states_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/state/get_states_responses.go create mode 100644 api/geo/v0.0.1/geo_client/state/post_states_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/state/post_states_responses.go create mode 100644 api/geo/v0.0.1/geo_client/state/state_client.go create mode 100644 api/geo/v0.0.1/geo_client/tax_rate/get_tax_rate_observable_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/tax_rate/get_tax_rate_observable_responses.go create mode 100644 api/geo/v0.0.1/geo_client/tax_rate/get_tax_rates_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/tax_rate/get_tax_rates_responses.go create mode 100644 api/geo/v0.0.1/geo_client/tax_rate/tax_rate_client.go create mode 100644 api/geo/v0.0.1/geo_client/tax_type/get_tax_types_observable_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/tax_type/get_tax_types_observable_responses.go create mode 100644 api/geo/v0.0.1/geo_client/tax_type/get_tax_types_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/tax_type/get_tax_types_responses.go create mode 100644 api/geo/v0.0.1/geo_client/tax_type/post_tax_types_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/tax_type/post_tax_types_responses.go create mode 100644 api/geo/v0.0.1/geo_client/tax_type/tax_type_client.go create mode 100644 api/geo/v0.0.1/geo_client/taxnexus_code/get_taxnexus_code_observable_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/taxnexus_code/get_taxnexus_code_observable_responses.go create mode 100644 api/geo/v0.0.1/geo_client/taxnexus_code/get_taxnexus_codes_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/taxnexus_code/get_taxnexus_codes_responses.go create mode 100644 api/geo/v0.0.1/geo_client/taxnexus_code/post_taxnexus_codes_parameters.go create mode 100644 api/geo/v0.0.1/geo_client/taxnexus_code/post_taxnexus_codes_responses.go create mode 100644 api/geo/v0.0.1/geo_client/taxnexus_code/taxnexus_code_client.go create mode 100644 api/geo/v0.0.1/geo_models/address.go create mode 100644 api/geo/v0.0.1/geo_models/coordinate.go create mode 100644 api/geo/v0.0.1/geo_models/coordinate_basic.go create mode 100644 api/geo/v0.0.1/geo_models/coordinate_basic_response.go create mode 100644 api/geo/v0.0.1/geo_models/coordinate_request.go create mode 100644 api/geo/v0.0.1/geo_models/coordinate_request_item.go create mode 100644 api/geo/v0.0.1/geo_models/coordinate_response.go create mode 100644 api/geo/v0.0.1/geo_models/country.go create mode 100644 api/geo/v0.0.1/geo_models/country_request.go create mode 100644 api/geo/v0.0.1/geo_models/country_response.go create mode 100644 api/geo/v0.0.1/geo_models/county.go create mode 100644 api/geo/v0.0.1/geo_models/county_request.go create mode 100644 api/geo/v0.0.1/geo_models/county_response.go create mode 100644 api/geo/v0.0.1/geo_models/delete_response.go create mode 100644 api/geo/v0.0.1/geo_models/domain.go create mode 100644 api/geo/v0.0.1/geo_models/domain_request.go create mode 100644 api/geo/v0.0.1/geo_models/domain_response.go create mode 100644 api/geo/v0.0.1/geo_models/error.go create mode 100644 api/geo/v0.0.1/geo_models/invalid_error.go create mode 100644 api/geo/v0.0.1/geo_models/message.go create mode 100644 api/geo/v0.0.1/geo_models/pagination.go create mode 100644 api/geo/v0.0.1/geo_models/place.go create mode 100644 api/geo/v0.0.1/geo_models/place_request.go create mode 100644 api/geo/v0.0.1/geo_models/place_response.go create mode 100644 api/geo/v0.0.1/geo_models/request_meta.go create mode 100644 api/geo/v0.0.1/geo_models/response_meta.go create mode 100644 api/geo/v0.0.1/geo_models/state.go create mode 100644 api/geo/v0.0.1/geo_models/state_request.go create mode 100644 api/geo/v0.0.1/geo_models/state_response.go create mode 100644 api/geo/v0.0.1/geo_models/tax_instance.go create mode 100644 api/geo/v0.0.1/geo_models/tax_rate.go create mode 100644 api/geo/v0.0.1/geo_models/tax_rate_response.go create mode 100644 api/geo/v0.0.1/geo_models/tax_type.go create mode 100644 api/geo/v0.0.1/geo_models/tax_type_id.go create mode 100644 api/geo/v0.0.1/geo_models/tax_type_request.go create mode 100644 api/geo/v0.0.1/geo_models/tax_type_response.go create mode 100644 api/geo/v0.0.1/geo_models/taxnexus_code.go create mode 100644 api/geo/v0.0.1/geo_models/taxnexus_code_request.go create mode 100644 api/geo/v0.0.1/geo_models/taxnexus_code_response.go create mode 100644 api/ledger/v0.0.1/ledger_client/accounting_rule/accounting_rule_client.go create mode 100644 api/ledger/v0.0.1/ledger_client/accounting_rule/get_accounting_rules_parameters.go create mode 100644 api/ledger/v0.0.1/ledger_client/accounting_rule/get_accounting_rules_responses.go create mode 100644 api/ledger/v0.0.1/ledger_client/accounting_rule/post_accounting_rules_parameters.go create mode 100644 api/ledger/v0.0.1/ledger_client/accounting_rule/post_accounting_rules_responses.go create mode 100644 api/ledger/v0.0.1/ledger_client/accounting_ruleset/accounting_ruleset_client.go create mode 100644 api/ledger/v0.0.1/ledger_client/accounting_ruleset/get_accounting_rulesets_parameters.go create mode 100644 api/ledger/v0.0.1/ledger_client/accounting_ruleset/get_accounting_rulesets_responses.go create mode 100644 api/ledger/v0.0.1/ledger_client/accounting_ruleset/post_accounting_rulesets_parameters.go create mode 100644 api/ledger/v0.0.1/ledger_client/accounting_ruleset/post_accounting_rulesets_responses.go create mode 100644 api/ledger/v0.0.1/ledger_client/coa/coa_client.go create mode 100644 api/ledger/v0.0.1/ledger_client/coa/get_coas_parameters.go create mode 100644 api/ledger/v0.0.1/ledger_client/coa/get_coas_responses.go create mode 100644 api/ledger/v0.0.1/ledger_client/coa/post_coas_parameters.go create mode 100644 api/ledger/v0.0.1/ledger_client/coa/post_coas_responses.go create mode 100644 api/ledger/v0.0.1/ledger_client/gl_account/get_gl_accounts_parameters.go create mode 100644 api/ledger/v0.0.1/ledger_client/gl_account/get_gl_accounts_responses.go create mode 100644 api/ledger/v0.0.1/ledger_client/gl_account/gl_account_client.go create mode 100644 api/ledger/v0.0.1/ledger_client/gl_account/post_gl_accounts_parameters.go create mode 100644 api/ledger/v0.0.1/ledger_client/gl_account/post_gl_accounts_responses.go create mode 100644 api/ledger/v0.0.1/ledger_client/gl_balance/get_gl_balances_parameters.go create mode 100644 api/ledger/v0.0.1/ledger_client/gl_balance/get_gl_balances_responses.go create mode 100644 api/ledger/v0.0.1/ledger_client/gl_balance/gl_balance_client.go create mode 100644 api/ledger/v0.0.1/ledger_client/gl_balance/post_gl_balances_parameters.go create mode 100644 api/ledger/v0.0.1/ledger_client/gl_balance/post_gl_balances_responses.go create mode 100644 api/ledger/v0.0.1/ledger_client/journal_entry/get_journal_entries_parameters.go create mode 100644 api/ledger/v0.0.1/ledger_client/journal_entry/get_journal_entries_responses.go create mode 100644 api/ledger/v0.0.1/ledger_client/journal_entry/journal_entry_client.go create mode 100644 api/ledger/v0.0.1/ledger_client/journal_entry/post_journal_entries_parameters.go create mode 100644 api/ledger/v0.0.1/ledger_client/journal_entry/post_journal_entries_responses.go create mode 100644 api/ledger/v0.0.1/ledger_client/journal_item/get_journal_items_parameters.go create mode 100644 api/ledger/v0.0.1/ledger_client/journal_item/get_journal_items_responses.go create mode 100644 api/ledger/v0.0.1/ledger_client/journal_item/journal_item_client.go create mode 100644 api/ledger/v0.0.1/ledger_client/ledger_client.go create mode 100644 api/ledger/v0.0.1/ledger_client/period/get_periods_parameters.go create mode 100644 api/ledger/v0.0.1/ledger_client/period/get_periods_responses.go create mode 100644 api/ledger/v0.0.1/ledger_client/period/period_client.go create mode 100644 api/ledger/v0.0.1/ledger_client/period/post_periods_parameters.go create mode 100644 api/ledger/v0.0.1/ledger_client/period/post_periods_responses.go create mode 100644 api/ledger/v0.0.1/ledger_models/accounting_rule.go create mode 100644 api/ledger/v0.0.1/ledger_models/accounting_rule_request.go create mode 100644 api/ledger/v0.0.1/ledger_models/accounting_rule_response.go create mode 100644 api/ledger/v0.0.1/ledger_models/accounting_ruleset.go create mode 100644 api/ledger/v0.0.1/ledger_models/accounting_ruleset_item.go create mode 100644 api/ledger/v0.0.1/ledger_models/accounting_ruleset_request.go create mode 100644 api/ledger/v0.0.1/ledger_models/accounting_ruleset_response.go create mode 100644 api/ledger/v0.0.1/ledger_models/coa.go create mode 100644 api/ledger/v0.0.1/ledger_models/coa_item.go create mode 100644 api/ledger/v0.0.1/ledger_models/coa_request.go create mode 100644 api/ledger/v0.0.1/ledger_models/coa_response.go create mode 100644 api/ledger/v0.0.1/ledger_models/delete_response.go create mode 100644 api/ledger/v0.0.1/ledger_models/error.go create mode 100644 api/ledger/v0.0.1/ledger_models/gl_account.go create mode 100644 api/ledger/v0.0.1/ledger_models/gl_account_request.go create mode 100644 api/ledger/v0.0.1/ledger_models/gl_account_response.go create mode 100644 api/ledger/v0.0.1/ledger_models/gl_balance.go create mode 100644 api/ledger/v0.0.1/ledger_models/gl_balance_request.go create mode 100644 api/ledger/v0.0.1/ledger_models/gl_balance_response.go create mode 100644 api/ledger/v0.0.1/ledger_models/invalid_error.go create mode 100644 api/ledger/v0.0.1/ledger_models/journal_entry.go create mode 100644 api/ledger/v0.0.1/ledger_models/journal_entry_request.go create mode 100644 api/ledger/v0.0.1/ledger_models/journal_entry_response.go create mode 100644 api/ledger/v0.0.1/ledger_models/journal_item.go create mode 100644 api/ledger/v0.0.1/ledger_models/journal_item_response.go create mode 100644 api/ledger/v0.0.1/ledger_models/journal_item_summary.go create mode 100644 api/ledger/v0.0.1/ledger_models/journal_item_summary_response.go create mode 100644 api/ledger/v0.0.1/ledger_models/message.go create mode 100644 api/ledger/v0.0.1/ledger_models/pagination.go create mode 100644 api/ledger/v0.0.1/ledger_models/period.go create mode 100644 api/ledger/v0.0.1/ledger_models/period_request.go create mode 100644 api/ledger/v0.0.1/ledger_models/period_response.go create mode 100644 api/ledger/v0.0.1/ledger_models/put_response.go create mode 100644 api/ledger/v0.0.1/ledger_models/request_meta.go create mode 100644 api/ledger/v0.0.1/ledger_models/response_meta.go create mode 100644 api/ops/v0.0.1/ops_client/cash_receipt/cash_receipt_client.go create mode 100644 api/ops/v0.0.1/ops_client/cash_receipt/delete_cash_receipt_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/cash_receipt/delete_cash_receipt_responses.go create mode 100644 api/ops/v0.0.1/ops_client/cash_receipt/get_cash_receipts_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/cash_receipt/get_cash_receipts_responses.go create mode 100644 api/ops/v0.0.1/ops_client/cash_receipt/post_cash_receipts_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/cash_receipt/post_cash_receipts_responses.go create mode 100644 api/ops/v0.0.1/ops_client/cash_receipt/put_cash_receipts_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/cash_receipt/put_cash_receipts_responses.go create mode 100644 api/ops/v0.0.1/ops_client/charge/charge_client.go create mode 100644 api/ops/v0.0.1/ops_client/charge/delete_charge_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/charge/delete_charge_responses.go create mode 100644 api/ops/v0.0.1/ops_client/charge/get_charges_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/charge/get_charges_responses.go create mode 100644 api/ops/v0.0.1/ops_client/charge/post_charges_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/charge/post_charges_responses.go create mode 100644 api/ops/v0.0.1/ops_client/charge/put_charges_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/charge/put_charges_responses.go create mode 100644 api/ops/v0.0.1/ops_client/cors/cash_receipt_options_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/cors/cash_receipt_options_responses.go create mode 100644 api/ops/v0.0.1/ops_client/cors/charge_options_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/cors/charge_options_responses.go create mode 100644 api/ops/v0.0.1/ops_client/cors/cors_client.go create mode 100644 api/ops/v0.0.1/ops_client/cors/eft_options_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/cors/eft_options_responses.go create mode 100644 api/ops/v0.0.1/ops_client/cors/invoice_options_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/cors/invoice_options_responses.go create mode 100644 api/ops/v0.0.1/ops_client/cors/orders_options_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/cors/orders_options_responses.go create mode 100644 api/ops/v0.0.1/ops_client/cors/payment_method_options_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/cors/payment_method_options_responses.go create mode 100644 api/ops/v0.0.1/ops_client/cors/po_options_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/cors/po_options_responses.go create mode 100644 api/ops/v0.0.1/ops_client/cors/product_options_observable_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/cors/product_options_observable_responses.go create mode 100644 api/ops/v0.0.1/ops_client/cors/product_options_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/cors/product_options_responses.go create mode 100644 api/ops/v0.0.1/ops_client/cors/quote_options_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/cors/quote_options_responses.go create mode 100644 api/ops/v0.0.1/ops_client/cors/tax_invoice_options_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/cors/tax_invoice_options_responses.go create mode 100644 api/ops/v0.0.1/ops_client/cors/tax_order_options_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/cors/tax_order_options_responses.go create mode 100644 api/ops/v0.0.1/ops_client/cors/tax_po_options_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/cors/tax_po_options_responses.go create mode 100644 api/ops/v0.0.1/ops_client/cors/tax_quote_options_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/cors/tax_quote_options_responses.go create mode 100644 api/ops/v0.0.1/ops_client/eft/eft_client.go create mode 100644 api/ops/v0.0.1/ops_client/eft/get_efts_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/eft/get_efts_responses.go create mode 100644 api/ops/v0.0.1/ops_client/eft/post_efts_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/eft/post_efts_responses.go create mode 100644 api/ops/v0.0.1/ops_client/eft/put_efts_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/eft/put_efts_responses.go create mode 100644 api/ops/v0.0.1/ops_client/invoice/delete_invoice_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/invoice/delete_invoice_responses.go create mode 100644 api/ops/v0.0.1/ops_client/invoice/get_invoices_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/invoice/get_invoices_responses.go create mode 100644 api/ops/v0.0.1/ops_client/invoice/invoice_client.go create mode 100644 api/ops/v0.0.1/ops_client/invoice/post_invoices_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/invoice/post_invoices_responses.go create mode 100644 api/ops/v0.0.1/ops_client/invoice/put_invoices_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/invoice/put_invoices_responses.go create mode 100644 api/ops/v0.0.1/ops_client/ops_client.go create mode 100644 api/ops/v0.0.1/ops_client/order/delete_order_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/order/delete_order_responses.go create mode 100644 api/ops/v0.0.1/ops_client/order/get_orders_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/order/get_orders_responses.go create mode 100644 api/ops/v0.0.1/ops_client/order/order_client.go create mode 100644 api/ops/v0.0.1/ops_client/order/post_orders_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/order/post_orders_responses.go create mode 100644 api/ops/v0.0.1/ops_client/order/put_orders_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/order/put_orders_responses.go create mode 100644 api/ops/v0.0.1/ops_client/payment_method/delete_payment_method_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/payment_method/delete_payment_method_responses.go create mode 100644 api/ops/v0.0.1/ops_client/payment_method/get_payment_methods_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/payment_method/get_payment_methods_responses.go create mode 100644 api/ops/v0.0.1/ops_client/payment_method/payment_method_client.go create mode 100644 api/ops/v0.0.1/ops_client/payment_method/post_payment_methods_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/payment_method/post_payment_methods_responses.go create mode 100644 api/ops/v0.0.1/ops_client/payment_method/put_payment_methods_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/payment_method/put_payment_methods_responses.go create mode 100644 api/ops/v0.0.1/ops_client/product/delete_product_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/product/delete_product_responses.go create mode 100644 api/ops/v0.0.1/ops_client/product/get_products_observable_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/product/get_products_observable_responses.go create mode 100644 api/ops/v0.0.1/ops_client/product/get_products_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/product/get_products_responses.go create mode 100644 api/ops/v0.0.1/ops_client/product/post_products_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/product/post_products_responses.go create mode 100644 api/ops/v0.0.1/ops_client/product/product_client.go create mode 100644 api/ops/v0.0.1/ops_client/product/put_products_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/product/put_products_responses.go create mode 100644 api/ops/v0.0.1/ops_client/purchase_order/delete_purchase_order_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/purchase_order/delete_purchase_order_responses.go create mode 100644 api/ops/v0.0.1/ops_client/purchase_order/get_purchase_orders_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/purchase_order/get_purchase_orders_responses.go create mode 100644 api/ops/v0.0.1/ops_client/purchase_order/post_purchase_orders_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/purchase_order/post_purchase_orders_responses.go create mode 100644 api/ops/v0.0.1/ops_client/purchase_order/purchase_order_client.go create mode 100644 api/ops/v0.0.1/ops_client/purchase_order/put_purchase_orders_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/purchase_order/put_purchase_orders_responses.go create mode 100644 api/ops/v0.0.1/ops_client/quote/delete_quote_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/quote/delete_quote_responses.go create mode 100644 api/ops/v0.0.1/ops_client/quote/get_quotes_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/quote/get_quotes_responses.go create mode 100644 api/ops/v0.0.1/ops_client/quote/post_quotes_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/quote/post_quotes_responses.go create mode 100644 api/ops/v0.0.1/ops_client/quote/put_quotes_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/quote/put_quotes_responses.go create mode 100644 api/ops/v0.0.1/ops_client/quote/quote_client.go create mode 100644 api/ops/v0.0.1/ops_client/tax/post_taxes_invoices_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/tax/post_taxes_invoices_responses.go create mode 100644 api/ops/v0.0.1/ops_client/tax/post_taxes_orders_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/tax/post_taxes_orders_responses.go create mode 100644 api/ops/v0.0.1/ops_client/tax/post_taxes_pos_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/tax/post_taxes_pos_responses.go create mode 100644 api/ops/v0.0.1/ops_client/tax/post_taxes_quotes_parameters.go create mode 100644 api/ops/v0.0.1/ops_client/tax/post_taxes_quotes_responses.go create mode 100644 api/ops/v0.0.1/ops_client/tax/tax_client.go create mode 100644 api/ops/v0.0.1/ops_models/address.go create mode 100644 api/ops/v0.0.1/ops_models/cash_receipt.go create mode 100644 api/ops/v0.0.1/ops_models/cash_receipt_request.go create mode 100644 api/ops/v0.0.1/ops_models/cash_receipt_response.go create mode 100644 api/ops/v0.0.1/ops_models/charge.go create mode 100644 api/ops/v0.0.1/ops_models/charge_request.go create mode 100644 api/ops/v0.0.1/ops_models/charge_response.go create mode 100644 api/ops/v0.0.1/ops_models/contract.go create mode 100644 api/ops/v0.0.1/ops_models/credit_card.go create mode 100644 api/ops/v0.0.1/ops_models/delete_response.go create mode 100644 api/ops/v0.0.1/ops_models/eft.go create mode 100644 api/ops/v0.0.1/ops_models/eft_item.go create mode 100644 api/ops/v0.0.1/ops_models/eft_request.go create mode 100644 api/ops/v0.0.1/ops_models/eft_response.go create mode 100644 api/ops/v0.0.1/ops_models/error.go create mode 100644 api/ops/v0.0.1/ops_models/invalid_error.go create mode 100644 api/ops/v0.0.1/ops_models/invoice.go create mode 100644 api/ops/v0.0.1/ops_models/invoice_basic.go create mode 100644 api/ops/v0.0.1/ops_models/invoice_item.go create mode 100644 api/ops/v0.0.1/ops_models/invoice_request.go create mode 100644 api/ops/v0.0.1/ops_models/invoice_response.go create mode 100644 api/ops/v0.0.1/ops_models/item_basic.go create mode 100644 api/ops/v0.0.1/ops_models/message.go create mode 100644 api/ops/v0.0.1/ops_models/order.go create mode 100644 api/ops/v0.0.1/ops_models/order_item.go create mode 100644 api/ops/v0.0.1/ops_models/order_request.go create mode 100644 api/ops/v0.0.1/ops_models/order_response.go create mode 100644 api/ops/v0.0.1/ops_models/pagination.go create mode 100644 api/ops/v0.0.1/ops_models/payment_method.go create mode 100644 api/ops/v0.0.1/ops_models/payment_method_request.go create mode 100644 api/ops/v0.0.1/ops_models/payment_method_response.go create mode 100644 api/ops/v0.0.1/ops_models/pricebook.go create mode 100644 api/ops/v0.0.1/ops_models/pricebook_entry.go create mode 100644 api/ops/v0.0.1/ops_models/product.go create mode 100644 api/ops/v0.0.1/ops_models/product_request.go create mode 100644 api/ops/v0.0.1/ops_models/product_response.go create mode 100644 api/ops/v0.0.1/ops_models/purchase_order.go create mode 100644 api/ops/v0.0.1/ops_models/purchase_order_item.go create mode 100644 api/ops/v0.0.1/ops_models/purchase_order_request.go create mode 100644 api/ops/v0.0.1/ops_models/purchase_order_response.go create mode 100644 api/ops/v0.0.1/ops_models/put_response.go create mode 100644 api/ops/v0.0.1/ops_models/quote.go create mode 100644 api/ops/v0.0.1/ops_models/quote_basic.go create mode 100644 api/ops/v0.0.1/ops_models/quote_item.go create mode 100644 api/ops/v0.0.1/ops_models/quote_request.go create mode 100644 api/ops/v0.0.1/ops_models/quote_response.go create mode 100644 api/ops/v0.0.1/ops_models/response_meta.go create mode 100644 api/ops/v0.0.1/ops_models/subscription.go create mode 100644 api/ops/v0.0.1/ops_models/subscription_request.go create mode 100644 api/ops/v0.0.1/ops_models/subscription_response.go create mode 100644 api/ops/v0.0.1/ops_models/tax_transaction.go create mode 100644 api/ops/v0.0.1/ops_models/tax_transaction_response.go create mode 100644 api/ops/v0.0.1/ops_models/total.go create mode 100644 api/ops/v0.0.1/ops_models/total_item.go create mode 100644 api/ops/v0.0.1/ops_models/total_tax_item.go create mode 100644 api/stash/v0.0.1/stash_client/stash_client.go create mode 100644 api/stash/v0.0.1/stash_client/stash_pdf/post_pdfs_parameters.go create mode 100644 api/stash/v0.0.1/stash_client/stash_pdf/post_pdfs_responses.go create mode 100644 api/stash/v0.0.1/stash_client/stash_pdf/stash_pdf_client.go create mode 100644 api/stash/v0.0.1/stash_models/document.go create mode 100644 api/stash/v0.0.1/stash_models/document_response.go create mode 100644 api/stash/v0.0.1/stash_models/error.go create mode 100644 api/stash/v0.0.1/stash_models/new_p_d_f.go create mode 100644 api/stash/v0.0.1/stash_models/p_d_f_request.go create mode 100644 api/stash/v0.0.1/stash_models/request_meta.go create mode 100644 api/stash/v0.0.1/stash_models/response_meta.go create mode 100644 api/workflow/v0.0.1/workflow_client/app_log/app_log_client.go create mode 100644 api/workflow/v0.0.1/workflow_client/app_log/post_app_logs_parameters.go create mode 100644 api/workflow/v0.0.1/workflow_client/app_log/post_app_logs_responses.go create mode 100644 api/workflow/v0.0.1/workflow_client/cors/app_log_options_parameters.go create mode 100644 api/workflow/v0.0.1/workflow_client/cors/app_log_options_responses.go create mode 100644 api/workflow/v0.0.1/workflow_client/cors/cors_client.go create mode 100644 api/workflow/v0.0.1/workflow_client/cors/email_message_options_parameters.go create mode 100644 api/workflow/v0.0.1/workflow_client/cors/email_message_options_responses.go create mode 100644 api/workflow/v0.0.1/workflow_client/cors/outgoing_email_message_options_parameters.go create mode 100644 api/workflow/v0.0.1/workflow_client/cors/outgoing_email_message_options_responses.go create mode 100644 api/workflow/v0.0.1/workflow_client/email_message/email_message_client.go create mode 100644 api/workflow/v0.0.1/workflow_client/email_message/get_email_messages_parameters.go create mode 100644 api/workflow/v0.0.1/workflow_client/email_message/get_email_messages_responses.go create mode 100644 api/workflow/v0.0.1/workflow_client/outgoing_email_message/outgoing_email_message_client.go create mode 100644 api/workflow/v0.0.1/workflow_client/outgoing_email_message/post_outgoing_email_messages_parameters.go create mode 100644 api/workflow/v0.0.1/workflow_client/outgoing_email_message/post_outgoing_email_messages_responses.go create mode 100644 api/workflow/v0.0.1/workflow_client/workflow_client.go create mode 100644 api/workflow/v0.0.1/workflow_models/app_log.go create mode 100644 api/workflow/v0.0.1/workflow_models/app_log_request.go create mode 100644 api/workflow/v0.0.1/workflow_models/app_log_response.go create mode 100644 api/workflow/v0.0.1/workflow_models/document.go create mode 100644 api/workflow/v0.0.1/workflow_models/email_message.go create mode 100644 api/workflow/v0.0.1/workflow_models/email_message_request.go create mode 100644 api/workflow/v0.0.1/workflow_models/email_messages_response.go create mode 100644 api/workflow/v0.0.1/workflow_models/error.go create mode 100644 api/workflow/v0.0.1/workflow_models/headers.go create mode 100644 api/workflow/v0.0.1/workflow_models/outgoing_email_message.go create mode 100644 api/workflow/v0.0.1/workflow_models/outgoing_email_message_request.go create mode 100644 api/workflow/v0.0.1/workflow_models/request_meta.go create mode 100644 api/workflow/v0.0.1/workflow_models/response_meta.go create mode 100644 go.mod create mode 100644 go.sum diff --git a/api/auth/v0.0.1/auth_client/auth_client.go b/api/auth/v0.0.1/auth_client/auth_client.go new file mode 100644 index 0000000..325941d --- /dev/null +++ b/api/auth/v0.0.1/auth_client/auth_client.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package auth_client + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/auth/auth_client/user" +) + +// Default auth HTTP client. +var Default = NewHTTPClient(nil) + +const ( + // DefaultHost is the default Host + // found in Meta (info) section of spec file + DefaultHost string = "auth.fabric.tnxs.net:8080" + // DefaultBasePath is the default BasePath + // found in Meta (info) section of spec file + DefaultBasePath string = "/v1" +) + +// DefaultSchemes are the default schemes found in Meta (info) section of spec file +var DefaultSchemes = []string{"http"} + +// NewHTTPClient creates a new auth HTTP client. +func NewHTTPClient(formats strfmt.Registry) *Auth { + return NewHTTPClientWithConfig(formats, nil) +} + +// NewHTTPClientWithConfig creates a new auth HTTP client, +// using a customizable transport config. +func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *Auth { + // ensure nullable parameters have default + if cfg == nil { + cfg = DefaultTransportConfig() + } + + // create transport and client + transport := httptransport.New(cfg.Host, cfg.BasePath, cfg.Schemes) + return New(transport, formats) +} + +// New creates a new auth client +func New(transport runtime.ClientTransport, formats strfmt.Registry) *Auth { + // ensure nullable parameters have default + if formats == nil { + formats = strfmt.Default + } + + cli := new(Auth) + cli.Transport = transport + cli.User = user.New(transport, formats) + return cli +} + +// DefaultTransportConfig creates a TransportConfig with the +// default settings taken from the meta section of the spec file. +func DefaultTransportConfig() *TransportConfig { + return &TransportConfig{ + Host: DefaultHost, + BasePath: DefaultBasePath, + Schemes: DefaultSchemes, + } +} + +// TransportConfig contains the transport related info, +// found in the meta section of the spec file. +type TransportConfig struct { + Host string + BasePath string + Schemes []string +} + +// WithHost overrides the default host, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithHost(host string) *TransportConfig { + cfg.Host = host + return cfg +} + +// WithBasePath overrides the default basePath, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithBasePath(basePath string) *TransportConfig { + cfg.BasePath = basePath + return cfg +} + +// WithSchemes overrides the default schemes, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { + cfg.Schemes = schemes + return cfg +} + +// Auth is a client for auth +type Auth struct { + User user.ClientService + + Transport runtime.ClientTransport +} + +// SetTransport changes the transport on the client and all its subresources +func (c *Auth) SetTransport(transport runtime.ClientTransport) { + c.Transport = transport + c.User.SetTransport(transport) +} diff --git a/api/auth/v0.0.1/auth_client/user/get_users_parameters.go b/api/auth/v0.0.1/auth_client/user/get_users_parameters.go new file mode 100644 index 0000000..0af1810 --- /dev/null +++ b/api/auth/v0.0.1/auth_client/user/get_users_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package user + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetUsersParams creates a new GetUsersParams object +// with the default values initialized. +func NewGetUsersParams() *GetUsersParams { + var () + return &GetUsersParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetUsersParamsWithTimeout creates a new GetUsersParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetUsersParamsWithTimeout(timeout time.Duration) *GetUsersParams { + var () + return &GetUsersParams{ + + timeout: timeout, + } +} + +// NewGetUsersParamsWithContext creates a new GetUsersParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetUsersParamsWithContext(ctx context.Context) *GetUsersParams { + var () + return &GetUsersParams{ + + Context: ctx, + } +} + +// NewGetUsersParamsWithHTTPClient creates a new GetUsersParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetUsersParamsWithHTTPClient(client *http.Client) *GetUsersParams { + var () + return &GetUsersParams{ + HTTPClient: client, + } +} + +/*GetUsersParams contains all the parameters to send to the API endpoint +for the get users operation typically these are written to a http.Request +*/ +type GetUsersParams struct { + + /*Apikey + Service account or developer API key + + */ + Apikey *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get users params +func (o *GetUsersParams) WithTimeout(timeout time.Duration) *GetUsersParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get users params +func (o *GetUsersParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get users params +func (o *GetUsersParams) WithContext(ctx context.Context) *GetUsersParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get users params +func (o *GetUsersParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get users params +func (o *GetUsersParams) WithHTTPClient(client *http.Client) *GetUsersParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get users params +func (o *GetUsersParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithApikey adds the apikey to the get users params +func (o *GetUsersParams) WithApikey(apikey *string) *GetUsersParams { + o.SetApikey(apikey) + return o +} + +// SetApikey adds the apikey to the get users params +func (o *GetUsersParams) SetApikey(apikey *string) { + o.Apikey = apikey +} + +// WriteToRequest writes these params to a swagger request +func (o *GetUsersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Apikey != nil { + + // query param apikey + var qrApikey string + if o.Apikey != nil { + qrApikey = *o.Apikey + } + qApikey := qrApikey + if qApikey != "" { + if err := r.SetQueryParam("apikey", qApikey); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/auth/v0.0.1/auth_client/user/get_users_responses.go b/api/auth/v0.0.1/auth_client/user/get_users_responses.go new file mode 100644 index 0000000..2c05b4d --- /dev/null +++ b/api/auth/v0.0.1/auth_client/user/get_users_responses.go @@ -0,0 +1,268 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package user + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/auth/auth_models" +) + +// GetUsersReader is a Reader for the GetUsers structure. +type GetUsersReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetUsersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetUsersOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetUsersUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetUsersForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetUsersNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetUsersUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetUsersInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetUsersOK creates a GetUsersOK with default headers values +func NewGetUsersOK() *GetUsersOK { + return &GetUsersOK{} +} + +/*GetUsersOK handles this case with default header values. + +Taxnexus Response with User objects +*/ +type GetUsersOK struct { + Payload *auth_models.UserResponse +} + +func (o *GetUsersOK) Error() string { + return fmt.Sprintf("[GET /users][%d] getUsersOK %+v", 200, o.Payload) +} + +func (o *GetUsersOK) GetPayload() *auth_models.UserResponse { + return o.Payload +} + +func (o *GetUsersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(auth_models.UserResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetUsersUnauthorized creates a GetUsersUnauthorized with default headers values +func NewGetUsersUnauthorized() *GetUsersUnauthorized { + return &GetUsersUnauthorized{} +} + +/*GetUsersUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetUsersUnauthorized struct { + Payload *auth_models.Error +} + +func (o *GetUsersUnauthorized) Error() string { + return fmt.Sprintf("[GET /users][%d] getUsersUnauthorized %+v", 401, o.Payload) +} + +func (o *GetUsersUnauthorized) GetPayload() *auth_models.Error { + return o.Payload +} + +func (o *GetUsersUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(auth_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetUsersForbidden creates a GetUsersForbidden with default headers values +func NewGetUsersForbidden() *GetUsersForbidden { + return &GetUsersForbidden{} +} + +/*GetUsersForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetUsersForbidden struct { + Payload *auth_models.Error +} + +func (o *GetUsersForbidden) Error() string { + return fmt.Sprintf("[GET /users][%d] getUsersForbidden %+v", 403, o.Payload) +} + +func (o *GetUsersForbidden) GetPayload() *auth_models.Error { + return o.Payload +} + +func (o *GetUsersForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(auth_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetUsersNotFound creates a GetUsersNotFound with default headers values +func NewGetUsersNotFound() *GetUsersNotFound { + return &GetUsersNotFound{} +} + +/*GetUsersNotFound handles this case with default header values. + +Resource was not found +*/ +type GetUsersNotFound struct { + Payload *auth_models.Error +} + +func (o *GetUsersNotFound) Error() string { + return fmt.Sprintf("[GET /users][%d] getUsersNotFound %+v", 404, o.Payload) +} + +func (o *GetUsersNotFound) GetPayload() *auth_models.Error { + return o.Payload +} + +func (o *GetUsersNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(auth_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetUsersUnprocessableEntity creates a GetUsersUnprocessableEntity with default headers values +func NewGetUsersUnprocessableEntity() *GetUsersUnprocessableEntity { + return &GetUsersUnprocessableEntity{} +} + +/*GetUsersUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetUsersUnprocessableEntity struct { + Payload *auth_models.Error +} + +func (o *GetUsersUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /users][%d] getUsersUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetUsersUnprocessableEntity) GetPayload() *auth_models.Error { + return o.Payload +} + +func (o *GetUsersUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(auth_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetUsersInternalServerError creates a GetUsersInternalServerError with default headers values +func NewGetUsersInternalServerError() *GetUsersInternalServerError { + return &GetUsersInternalServerError{} +} + +/*GetUsersInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetUsersInternalServerError struct { + Payload *auth_models.Error +} + +func (o *GetUsersInternalServerError) Error() string { + return fmt.Sprintf("[GET /users][%d] getUsersInternalServerError %+v", 500, o.Payload) +} + +func (o *GetUsersInternalServerError) GetPayload() *auth_models.Error { + return o.Payload +} + +func (o *GetUsersInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(auth_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/auth/v0.0.1/auth_client/user/user_client.go b/api/auth/v0.0.1/auth_client/user/user_client.go new file mode 100644 index 0000000..735bf55 --- /dev/null +++ b/api/auth/v0.0.1/auth_client/user/user_client.go @@ -0,0 +1,79 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package user + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new user API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for user API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetUsers(params *GetUsersParams, authInfo runtime.ClientAuthInfoWriter) (*GetUsersOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetUsers checks API key + + Checks for a valid API key, and returns full user record +*/ +func (a *Client) GetUsers(params *GetUsersParams, authInfo runtime.ClientAuthInfoWriter) (*GetUsersOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetUsersParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getUsers", + Method: "GET", + PathPattern: "/users", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetUsersReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetUsersOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getUsers: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/auth/v0.0.1/auth_models/address.go b/api/auth/v0.0.1/auth_models/address.go new file mode 100644 index 0000000..b740ab8 --- /dev/null +++ b/api/auth/v0.0.1/auth_models/address.go @@ -0,0 +1,65 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package auth_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Address address +// +// swagger:model Address +type Address struct { + + // City + City string `json:"City,omitempty"` + + // Country full name + Country string `json:"Country,omitempty"` + + // Country Code + CountryCode string `json:"CountryCode,omitempty"` + + // Postal Code + PostalCode string `json:"PostalCode,omitempty"` + + // State full name + State string `json:"State,omitempty"` + + // State Code + StateCode string `json:"StateCode,omitempty"` + + // Street number and name + Street string `json:"Street,omitempty"` +} + +// Validate validates this address +func (m *Address) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Address) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Address) UnmarshalBinary(b []byte) error { + var res Address + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/auth/v0.0.1/auth_models/error.go b/api/auth/v0.0.1/auth_models/error.go new file mode 100644 index 0000000..413b019 --- /dev/null +++ b/api/auth/v0.0.1/auth_models/error.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package auth_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Error error +// +// swagger:model Error +type Error struct { + + // code + Code int32 `json:"Code,omitempty"` + + // fields + Fields string `json:"Fields,omitempty"` + + // message + Message string `json:"Message,omitempty"` +} + +// Validate validates this error +func (m *Error) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Error) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Error) UnmarshalBinary(b []byte) error { + var res Error + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/auth/v0.0.1/auth_models/response_meta.go b/api/auth/v0.0.1/auth_models/response_meta.go new file mode 100644 index 0000000..eeb7c1e --- /dev/null +++ b/api/auth/v0.0.1/auth_models/response_meta.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package auth_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ResponseMeta response meta +// +// swagger:model ResponseMeta +type ResponseMeta struct { + + // Microservice Contact Info + Contact string `json:"Contact,omitempty"` + + // Copyright Info + Copyright string `json:"Copyright,omitempty"` + + // License Information and Restrictions + License string `json:"License,omitempty"` + + // Operation ID + OperationID string `json:"OperationID,omitempty"` + + // Request IP Address + RequestIP string `json:"RequestIP,omitempty"` + + // Request Type + RequestType string `json:"RequestType,omitempty"` + + // Request URL + RequestURL string `json:"RequestURL,omitempty"` + + // Data Server Info + ServerInfo string `json:"ServerInfo,omitempty"` + + // Data Server Response Time (ms) + ServerResponseTime string `json:"ServerResponseTime,omitempty"` + + // Backend Server Timestamp + ServerTimestamp string `json:"ServerTimestamp,omitempty"` + + // Taxnexus Account Number used for recording transactions + TaxnexusAccount string `json:"TaxnexusAccount,omitempty"` +} + +// Validate validates this response meta +func (m *ResponseMeta) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ResponseMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ResponseMeta) UnmarshalBinary(b []byte) error { + var res ResponseMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/auth/v0.0.1/auth_models/tenant_user.go b/api/auth/v0.0.1/auth_models/tenant_user.go new file mode 100644 index 0000000..36c042d --- /dev/null +++ b/api/auth/v0.0.1/auth_models/tenant_user.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package auth_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// TenantUser Relationship object that connects users to a tenant +// +// swagger:model TenantUser +type TenantUser struct { + + // The makeTenantUser access level for this User + AccessLevel string `json:"AccessLevel,omitempty"` + + // Account ID + AccountID string `json:"AccountID,omitempty"` + + // Auth0 User ID + Auth0UserID string `json:"Auth0UserID,omitempty"` + + // Account Name + CompanyName string `json:"CompanyName,omitempty"` + + // Contact ID + ContactID string `json:"ContactID,omitempty"` + + // Taxnexus Account + TaxnexusAccount string `json:"TaxnexusAccount,omitempty"` + + // Tenant active? + TenantActive bool `json:"TenantActive,omitempty"` + + // The Tenant ID + TenantID string `json:"TenantID,omitempty"` + + // Tenant Name + TenantName string `json:"TenantName,omitempty"` + + // Tenant Status + TenantStatus string `json:"TenantStatus,omitempty"` + + // Tenant type + TenantType string `json:"TenantType,omitempty"` + + // Tenant Version + TenantVersion string `json:"TenantVersion,omitempty"` + + // User Email Address + UserEmail string `json:"UserEmail,omitempty"` + + // User Full Name + UserFullName string `json:"UserFullName,omitempty"` + + // The User ID + UserID string `json:"UserID,omitempty"` + + // Username + Username string `json:"Username,omitempty"` +} + +// Validate validates this tenant user +func (m *TenantUser) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *TenantUser) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TenantUser) UnmarshalBinary(b []byte) error { + var res TenantUser + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/auth/v0.0.1/auth_models/user.go b/api/auth/v0.0.1/auth_models/user.go new file mode 100644 index 0000000..5233a6c --- /dev/null +++ b/api/auth/v0.0.1/auth_models/user.go @@ -0,0 +1,306 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package auth_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// User user +// +// swagger:model User +type User struct { + + // API Key + APIKey string `json:"APIKey,omitempty"` + + // About Me + AboutMe string `json:"AboutMe,omitempty"` + + // Account ID + AccountID string `json:"AccountID,omitempty"` + + // address + Address *Address `json:"Address,omitempty"` + + // Alias + Alias string `json:"Alias,omitempty"` + + // Auth0 User Id + Auth0UserID string `json:"Auth0UserID,omitempty"` + + // Nickname + CommunityNickname string `json:"CommunityNickname,omitempty"` + + // Company Name + CompanyName string `json:"CompanyName,omitempty"` + + // Contact + ContactID string `json:"ContactID,omitempty"` + + // Created User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Date Created + CreatedDate string `json:"CreatedDate,omitempty"` + + // Delegated Approver + DelegatedApproverID string `json:"DelegatedApproverID,omitempty"` + + // Department + Department string `json:"Department,omitempty"` + + // Division + Division string `json:"Division,omitempty"` + + // Email address + Email string `json:"Email,omitempty"` + + // Employee Number + EmployeeNumber string `json:"EmployeeNumber,omitempty"` + + // Time day ends + EndOfDay string `json:"EndOfDay,omitempty"` + + // Environment + Environment string `json:"Environment,omitempty"` + + // Extension + Extension string `json:"Extension,omitempty"` + + // Fabric API Key + FabricAPIKey string `json:"FabricAPIKey,omitempty"` + + // Fax + Fax string `json:"Fax,omitempty"` + + // The first name + FirstName string `json:"FirstName,omitempty"` + + // Allow Forecasting + ForecastEnabled bool `json:"ForecastEnabled,omitempty"` + + // Full Photo URL + FullPhotoURL string `json:"FullPhotoURL,omitempty"` + + // Taxnexus ID + ID string `json:"ID,omitempty"` + + // Active + IsActive bool `json:"IsActive,omitempty"` + + // Is the user enabled for Communities? + IsPortalEnabled bool `json:"IsPortalEnabled,omitempty"` + + // Has Profile Photo + IsProphilePhotoActive bool `json:"IsProphilePhotoActive,omitempty"` + + // is system controlled + IsSystemControlled bool `json:"IsSystemControlled,omitempty"` + + // IP address of last login + LastIP string `json:"LastIP,omitempty"` + + // Last login time + LastLogin string `json:"LastLogin,omitempty"` + + // Last Modified User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // The Last Name + LastName string `json:"LastName,omitempty"` + + // Number of times user has logged in + LoginCount int64 `json:"LoginCount,omitempty"` + + // Manager + ManagerID string `json:"ManagerID,omitempty"` + + // Mobile + MobilePhone string `json:"MobilePhone,omitempty"` + + // Name + Name string `json:"Name,omitempty"` + + // Out of office message + OutOfOfficeMessage string `json:"OutOfOfficeMessage,omitempty"` + + // Phone + Phone string `json:"Phone,omitempty"` + + // Portal Role Level + PortalRole string `json:"PortalRole,omitempty"` + + // Profile + ProfileID string `json:"ProfileID,omitempty"` + + // Info Emails + ReceivesAdminEmails bool `json:"ReceivesAdminEmails,omitempty"` + + // Admin Info Emails + ReceivesAdminInfoEmails bool `json:"ReceivesAdminInfoEmails,omitempty"` + + // Email Sender Address + SenderEmail string `json:"SenderEmail,omitempty"` + + // Email Sender Name + SenderName string `json:"SenderName,omitempty"` + + // Email Signature + Signature string `json:"Signature,omitempty"` + + // Small Photo URL + SmallPhotoURL string `json:"SmallPhotoURL,omitempty"` + + // The time day starts + StartOfDay string `json:"StartOfDay,omitempty"` + + // Taxnexus Account + TaxnexusAccount string `json:"TaxnexusAccount,omitempty"` + + // Tenant ID associated with this user + TenantID string `json:"TenantID,omitempty"` + + // tenant users + TenantUsers []*TenantUser `json:"TenantUsers"` + + // Time Zone + TimeZone string `json:"TimeZone,omitempty"` + + // Title + Title string `json:"Title,omitempty"` + + // Role + UserRoleID string `json:"UserRoleID,omitempty"` + + // user roles + UserRoles []*UserRole `json:"UserRoles"` + + // User Type + UserType string `json:"UserType,omitempty"` + + // Username + Username string `json:"Username,omitempty"` +} + +// Validate validates this user +func (m *User) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTenantUsers(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUserRoles(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *User) validateAddress(formats strfmt.Registry) error { + + if swag.IsZero(m.Address) { // not required + return nil + } + + if m.Address != nil { + if err := m.Address.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Address") + } + return err + } + } + + return nil +} + +func (m *User) validateTenantUsers(formats strfmt.Registry) error { + + if swag.IsZero(m.TenantUsers) { // not required + return nil + } + + for i := 0; i < len(m.TenantUsers); i++ { + if swag.IsZero(m.TenantUsers[i]) { // not required + continue + } + + if m.TenantUsers[i] != nil { + if err := m.TenantUsers[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("TenantUsers" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *User) validateUserRoles(formats strfmt.Registry) error { + + if swag.IsZero(m.UserRoles) { // not required + return nil + } + + for i := 0; i < len(m.UserRoles); i++ { + if swag.IsZero(m.UserRoles[i]) { // not required + continue + } + + if m.UserRoles[i] != nil { + if err := m.UserRoles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("UserRoles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *User) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *User) UnmarshalBinary(b []byte) error { + var res User + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/auth/v0.0.1/auth_models/user_response.go b/api/auth/v0.0.1/auth_models/user_response.go new file mode 100644 index 0000000..7c5ab09 --- /dev/null +++ b/api/auth/v0.0.1/auth_models/user_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package auth_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// UserResponse An array Taxnexus user objects +// +// swagger:model UserResponse +type UserResponse struct { + + // data + Data []*User `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this user response +func (m *UserResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *UserResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *UserResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *UserResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *UserResponse) UnmarshalBinary(b []byte) error { + var res UserResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/auth/v0.0.1/auth_models/user_role.go b/api/auth/v0.0.1/auth_models/user_role.go new file mode 100644 index 0000000..9ea2706 --- /dev/null +++ b/api/auth/v0.0.1/auth_models/user_role.go @@ -0,0 +1,83 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package auth_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// UserRole Relationship object that connects user to a role +// +// swagger:model UserRole +type UserRole struct { + + // Account Id + AccountID string `json:"AccountID,omitempty"` + + // Linked role ID + Auth0RoleID string `json:"Auth0RoleID,omitempty"` + + // Auth0 User ID + Auth0UserID string `json:"Auth0UserID,omitempty"` + + // Company Name + CompanyName string `json:"CompanyName,omitempty"` + + // Contact ID + ContactID string `json:"ContactID,omitempty"` + + // Role description + RoleDescription string `json:"RoleDescription,omitempty"` + + // The Role ID + RoleID string `json:"RoleID,omitempty"` + + // Role Name + RoleName string `json:"RoleName,omitempty"` + + // Taxnexus Account Number + TaxnexusAccount string `json:"TaxnexusAccount,omitempty"` + + // User Email Address + UserEmail string `json:"UserEmail,omitempty"` + + // User Full Name + UserFullName string `json:"UserFullName,omitempty"` + + // The User ID + UserID string `json:"UserID,omitempty"` + + // Username + Username string `json:"Username,omitempty"` +} + +// Validate validates this user role +func (m *UserRole) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *UserRole) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *UserRole) UnmarshalBinary(b []byte) error { + var res UserRole + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/crm/v0.0.1/crm_client/accounts/accounts_client.go b/api/crm/v0.0.1/crm_client/accounts/accounts_client.go new file mode 100644 index 0000000..4bc39d4 --- /dev/null +++ b/api/crm/v0.0.1/crm_client/accounts/accounts_client.go @@ -0,0 +1,235 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package accounts + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new accounts API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for accounts API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + DeleteAccount(params *DeleteAccountParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteAccountOK, error) + + GetAccounts(params *GetAccountsParams, authInfo runtime.ClientAuthInfoWriter) (*GetAccountsOK, error) + + GetAccountsObservable(params *GetAccountsObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetAccountsObservableOK, error) + + PostAccounts(params *PostAccountsParams, authInfo runtime.ClientAuthInfoWriter) (*PostAccountsOK, error) + + PutAccount(params *PutAccountParams, authInfo runtime.ClientAuthInfoWriter) (*PutAccountOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + DeleteAccount deletes an account + + Delete Taxnexus Account record +*/ +func (a *Client) DeleteAccount(params *DeleteAccountParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteAccountOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDeleteAccountParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "deleteAccount", + Method: "DELETE", + PathPattern: "/accounts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &DeleteAccountReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*DeleteAccountOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for deleteAccount: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetAccounts gets a list of accounts + + Return a list of all available Accounts +*/ +func (a *Client) GetAccounts(params *GetAccountsParams, authInfo runtime.ClientAuthInfoWriter) (*GetAccountsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetAccountsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getAccounts", + Method: "GET", + PathPattern: "/accounts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetAccountsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetAccountsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getAccounts: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetAccountsObservable gets taxnexus accounts in an observable array + + A list of accounts in a simple JSON array +*/ +func (a *Client) GetAccountsObservable(params *GetAccountsObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetAccountsObservableOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetAccountsObservableParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getAccountsObservable", + Method: "GET", + PathPattern: "/accounts/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetAccountsObservableReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetAccountsObservableOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getAccountsObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostAccounts adds a new account to taxnexus + + Account record to be added +*/ +func (a *Client) PostAccounts(params *PostAccountsParams, authInfo runtime.ClientAuthInfoWriter) (*PostAccountsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostAccountsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postAccounts", + Method: "POST", + PathPattern: "/accounts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostAccountsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostAccountsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postAccounts: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PutAccount updates a single account + + Update a single account specified by accountId +*/ +func (a *Client) PutAccount(params *PutAccountParams, authInfo runtime.ClientAuthInfoWriter) (*PutAccountOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPutAccountParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "putAccount", + Method: "PUT", + PathPattern: "/accounts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PutAccountReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PutAccountOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for putAccount: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/crm/v0.0.1/crm_client/accounts/delete_account_parameters.go b/api/crm/v0.0.1/crm_client/accounts/delete_account_parameters.go new file mode 100644 index 0000000..7a0dfcb --- /dev/null +++ b/api/crm/v0.0.1/crm_client/accounts/delete_account_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package accounts + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewDeleteAccountParams creates a new DeleteAccountParams object +// with the default values initialized. +func NewDeleteAccountParams() *DeleteAccountParams { + var () + return &DeleteAccountParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewDeleteAccountParamsWithTimeout creates a new DeleteAccountParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewDeleteAccountParamsWithTimeout(timeout time.Duration) *DeleteAccountParams { + var () + return &DeleteAccountParams{ + + timeout: timeout, + } +} + +// NewDeleteAccountParamsWithContext creates a new DeleteAccountParams object +// with the default values initialized, and the ability to set a context for a request +func NewDeleteAccountParamsWithContext(ctx context.Context) *DeleteAccountParams { + var () + return &DeleteAccountParams{ + + Context: ctx, + } +} + +// NewDeleteAccountParamsWithHTTPClient creates a new DeleteAccountParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewDeleteAccountParamsWithHTTPClient(client *http.Client) *DeleteAccountParams { + var () + return &DeleteAccountParams{ + HTTPClient: client, + } +} + +/*DeleteAccountParams contains all the parameters to send to the API endpoint +for the delete account operation typically these are written to a http.Request +*/ +type DeleteAccountParams struct { + + /*AccountID + Taxnexus Record Id of an Account + + */ + AccountID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the delete account params +func (o *DeleteAccountParams) WithTimeout(timeout time.Duration) *DeleteAccountParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the delete account params +func (o *DeleteAccountParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the delete account params +func (o *DeleteAccountParams) WithContext(ctx context.Context) *DeleteAccountParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the delete account params +func (o *DeleteAccountParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the delete account params +func (o *DeleteAccountParams) WithHTTPClient(client *http.Client) *DeleteAccountParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the delete account params +func (o *DeleteAccountParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAccountID adds the accountID to the delete account params +func (o *DeleteAccountParams) WithAccountID(accountID *string) *DeleteAccountParams { + o.SetAccountID(accountID) + return o +} + +// SetAccountID adds the accountId to the delete account params +func (o *DeleteAccountParams) SetAccountID(accountID *string) { + o.AccountID = accountID +} + +// WriteToRequest writes these params to a swagger request +func (o *DeleteAccountParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AccountID != nil { + + // query param accountId + var qrAccountID string + if o.AccountID != nil { + qrAccountID = *o.AccountID + } + qAccountID := qrAccountID + if qAccountID != "" { + if err := r.SetQueryParam("accountId", qAccountID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/crm/v0.0.1/crm_client/accounts/delete_account_responses.go b/api/crm/v0.0.1/crm_client/accounts/delete_account_responses.go new file mode 100644 index 0000000..b60fb9c --- /dev/null +++ b/api/crm/v0.0.1/crm_client/accounts/delete_account_responses.go @@ -0,0 +1,298 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package accounts + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/crm/crm_models" +) + +// DeleteAccountReader is a Reader for the DeleteAccount structure. +type DeleteAccountReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DeleteAccountReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDeleteAccountOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewDeleteAccountUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewDeleteAccountForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewDeleteAccountNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewDeleteAccountUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewDeleteAccountInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewDeleteAccountOK creates a DeleteAccountOK with default headers values +func NewDeleteAccountOK() *DeleteAccountOK { + return &DeleteAccountOK{} +} + +/*DeleteAccountOK handles this case with default header values. + +Taxnexus Response with Message Objects with Delete Status +*/ +type DeleteAccountOK struct { + AccessControlAllowOrigin string + + Payload *crm_models.DeleteResponse +} + +func (o *DeleteAccountOK) Error() string { + return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountOK %+v", 200, o.Payload) +} + +func (o *DeleteAccountOK) GetPayload() *crm_models.DeleteResponse { + return o.Payload +} + +func (o *DeleteAccountOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.DeleteResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteAccountUnauthorized creates a DeleteAccountUnauthorized with default headers values +func NewDeleteAccountUnauthorized() *DeleteAccountUnauthorized { + return &DeleteAccountUnauthorized{} +} + +/*DeleteAccountUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type DeleteAccountUnauthorized struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *DeleteAccountUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountUnauthorized %+v", 401, o.Payload) +} + +func (o *DeleteAccountUnauthorized) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *DeleteAccountUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteAccountForbidden creates a DeleteAccountForbidden with default headers values +func NewDeleteAccountForbidden() *DeleteAccountForbidden { + return &DeleteAccountForbidden{} +} + +/*DeleteAccountForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type DeleteAccountForbidden struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *DeleteAccountForbidden) Error() string { + return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountForbidden %+v", 403, o.Payload) +} + +func (o *DeleteAccountForbidden) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *DeleteAccountForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteAccountNotFound creates a DeleteAccountNotFound with default headers values +func NewDeleteAccountNotFound() *DeleteAccountNotFound { + return &DeleteAccountNotFound{} +} + +/*DeleteAccountNotFound handles this case with default header values. + +Resource was not found +*/ +type DeleteAccountNotFound struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *DeleteAccountNotFound) Error() string { + return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountNotFound %+v", 404, o.Payload) +} + +func (o *DeleteAccountNotFound) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *DeleteAccountNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteAccountUnprocessableEntity creates a DeleteAccountUnprocessableEntity with default headers values +func NewDeleteAccountUnprocessableEntity() *DeleteAccountUnprocessableEntity { + return &DeleteAccountUnprocessableEntity{} +} + +/*DeleteAccountUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type DeleteAccountUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *DeleteAccountUnprocessableEntity) Error() string { + return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *DeleteAccountUnprocessableEntity) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *DeleteAccountUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteAccountInternalServerError creates a DeleteAccountInternalServerError with default headers values +func NewDeleteAccountInternalServerError() *DeleteAccountInternalServerError { + return &DeleteAccountInternalServerError{} +} + +/*DeleteAccountInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type DeleteAccountInternalServerError struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *DeleteAccountInternalServerError) Error() string { + return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountInternalServerError %+v", 500, o.Payload) +} + +func (o *DeleteAccountInternalServerError) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *DeleteAccountInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/crm/v0.0.1/crm_client/accounts/get_accounts_observable_parameters.go b/api/crm/v0.0.1/crm_client/accounts/get_accounts_observable_parameters.go new file mode 100644 index 0000000..31c4824 --- /dev/null +++ b/api/crm/v0.0.1/crm_client/accounts/get_accounts_observable_parameters.go @@ -0,0 +1,247 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package accounts + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetAccountsObservableParams creates a new GetAccountsObservableParams object +// with the default values initialized. +func NewGetAccountsObservableParams() *GetAccountsObservableParams { + var () + return &GetAccountsObservableParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetAccountsObservableParamsWithTimeout creates a new GetAccountsObservableParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetAccountsObservableParamsWithTimeout(timeout time.Duration) *GetAccountsObservableParams { + var () + return &GetAccountsObservableParams{ + + timeout: timeout, + } +} + +// NewGetAccountsObservableParamsWithContext creates a new GetAccountsObservableParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetAccountsObservableParamsWithContext(ctx context.Context) *GetAccountsObservableParams { + var () + return &GetAccountsObservableParams{ + + Context: ctx, + } +} + +// NewGetAccountsObservableParamsWithHTTPClient creates a new GetAccountsObservableParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetAccountsObservableParamsWithHTTPClient(client *http.Client) *GetAccountsObservableParams { + var () + return &GetAccountsObservableParams{ + HTTPClient: client, + } +} + +/*GetAccountsObservableParams contains all the parameters to send to the API endpoint +for the get accounts observable operation typically these are written to a http.Request +*/ +type GetAccountsObservableParams struct { + + /*AccountID + Taxnexus Record Id of an Account + + */ + AccountID *string + /*Active + Only retrieve active records? + + */ + Active *bool + /*Email + Email address used for identity lookup + + */ + Email *string + /*Name + The Name of this Object + + */ + Name *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get accounts observable params +func (o *GetAccountsObservableParams) WithTimeout(timeout time.Duration) *GetAccountsObservableParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get accounts observable params +func (o *GetAccountsObservableParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get accounts observable params +func (o *GetAccountsObservableParams) WithContext(ctx context.Context) *GetAccountsObservableParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get accounts observable params +func (o *GetAccountsObservableParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get accounts observable params +func (o *GetAccountsObservableParams) WithHTTPClient(client *http.Client) *GetAccountsObservableParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get accounts observable params +func (o *GetAccountsObservableParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAccountID adds the accountID to the get accounts observable params +func (o *GetAccountsObservableParams) WithAccountID(accountID *string) *GetAccountsObservableParams { + o.SetAccountID(accountID) + return o +} + +// SetAccountID adds the accountId to the get accounts observable params +func (o *GetAccountsObservableParams) SetAccountID(accountID *string) { + o.AccountID = accountID +} + +// WithActive adds the active to the get accounts observable params +func (o *GetAccountsObservableParams) WithActive(active *bool) *GetAccountsObservableParams { + o.SetActive(active) + return o +} + +// SetActive adds the active to the get accounts observable params +func (o *GetAccountsObservableParams) SetActive(active *bool) { + o.Active = active +} + +// WithEmail adds the email to the get accounts observable params +func (o *GetAccountsObservableParams) WithEmail(email *string) *GetAccountsObservableParams { + o.SetEmail(email) + return o +} + +// SetEmail adds the email to the get accounts observable params +func (o *GetAccountsObservableParams) SetEmail(email *string) { + o.Email = email +} + +// WithName adds the name to the get accounts observable params +func (o *GetAccountsObservableParams) WithName(name *string) *GetAccountsObservableParams { + o.SetName(name) + return o +} + +// SetName adds the name to the get accounts observable params +func (o *GetAccountsObservableParams) SetName(name *string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *GetAccountsObservableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AccountID != nil { + + // query param accountId + var qrAccountID string + if o.AccountID != nil { + qrAccountID = *o.AccountID + } + qAccountID := qrAccountID + if qAccountID != "" { + if err := r.SetQueryParam("accountId", qAccountID); err != nil { + return err + } + } + + } + + if o.Active != nil { + + // query param active + var qrActive bool + if o.Active != nil { + qrActive = *o.Active + } + qActive := swag.FormatBool(qrActive) + if qActive != "" { + if err := r.SetQueryParam("active", qActive); err != nil { + return err + } + } + + } + + if o.Email != nil { + + // query param email + var qrEmail string + if o.Email != nil { + qrEmail = *o.Email + } + qEmail := qrEmail + if qEmail != "" { + if err := r.SetQueryParam("email", qEmail); err != nil { + return err + } + } + + } + + if o.Name != nil { + + // query param name + var qrName string + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/crm/v0.0.1/crm_client/accounts/get_accounts_observable_responses.go b/api/crm/v0.0.1/crm_client/accounts/get_accounts_observable_responses.go new file mode 100644 index 0000000..ffc96a3 --- /dev/null +++ b/api/crm/v0.0.1/crm_client/accounts/get_accounts_observable_responses.go @@ -0,0 +1,301 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package accounts + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/crm/crm_models" +) + +// GetAccountsObservableReader is a Reader for the GetAccountsObservable structure. +type GetAccountsObservableReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetAccountsObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetAccountsObservableOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetAccountsObservableUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetAccountsObservableForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetAccountsObservableNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetAccountsObservableUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetAccountsObservableInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetAccountsObservableOK creates a GetAccountsObservableOK with default headers values +func NewGetAccountsObservableOK() *GetAccountsObservableOK { + return &GetAccountsObservableOK{} +} + +/*GetAccountsObservableOK handles this case with default header values. + +Taxnexus Response with an array of Account objects +*/ +type GetAccountsObservableOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload []*crm_models.Account +} + +func (o *GetAccountsObservableOK) Error() string { + return fmt.Sprintf("[GET /accounts/observable][%d] getAccountsObservableOK %+v", 200, o.Payload) +} + +func (o *GetAccountsObservableOK) GetPayload() []*crm_models.Account { + return o.Payload +} + +func (o *GetAccountsObservableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAccountsObservableUnauthorized creates a GetAccountsObservableUnauthorized with default headers values +func NewGetAccountsObservableUnauthorized() *GetAccountsObservableUnauthorized { + return &GetAccountsObservableUnauthorized{} +} + +/*GetAccountsObservableUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetAccountsObservableUnauthorized struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetAccountsObservableUnauthorized) Error() string { + return fmt.Sprintf("[GET /accounts/observable][%d] getAccountsObservableUnauthorized %+v", 401, o.Payload) +} + +func (o *GetAccountsObservableUnauthorized) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetAccountsObservableUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAccountsObservableForbidden creates a GetAccountsObservableForbidden with default headers values +func NewGetAccountsObservableForbidden() *GetAccountsObservableForbidden { + return &GetAccountsObservableForbidden{} +} + +/*GetAccountsObservableForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetAccountsObservableForbidden struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetAccountsObservableForbidden) Error() string { + return fmt.Sprintf("[GET /accounts/observable][%d] getAccountsObservableForbidden %+v", 403, o.Payload) +} + +func (o *GetAccountsObservableForbidden) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetAccountsObservableForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAccountsObservableNotFound creates a GetAccountsObservableNotFound with default headers values +func NewGetAccountsObservableNotFound() *GetAccountsObservableNotFound { + return &GetAccountsObservableNotFound{} +} + +/*GetAccountsObservableNotFound handles this case with default header values. + +Resource was not found +*/ +type GetAccountsObservableNotFound struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetAccountsObservableNotFound) Error() string { + return fmt.Sprintf("[GET /accounts/observable][%d] getAccountsObservableNotFound %+v", 404, o.Payload) +} + +func (o *GetAccountsObservableNotFound) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetAccountsObservableNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAccountsObservableUnprocessableEntity creates a GetAccountsObservableUnprocessableEntity with default headers values +func NewGetAccountsObservableUnprocessableEntity() *GetAccountsObservableUnprocessableEntity { + return &GetAccountsObservableUnprocessableEntity{} +} + +/*GetAccountsObservableUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetAccountsObservableUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetAccountsObservableUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /accounts/observable][%d] getAccountsObservableUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetAccountsObservableUnprocessableEntity) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetAccountsObservableUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAccountsObservableInternalServerError creates a GetAccountsObservableInternalServerError with default headers values +func NewGetAccountsObservableInternalServerError() *GetAccountsObservableInternalServerError { + return &GetAccountsObservableInternalServerError{} +} + +/*GetAccountsObservableInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetAccountsObservableInternalServerError struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetAccountsObservableInternalServerError) Error() string { + return fmt.Sprintf("[GET /accounts/observable][%d] getAccountsObservableInternalServerError %+v", 500, o.Payload) +} + +func (o *GetAccountsObservableInternalServerError) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetAccountsObservableInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/crm/v0.0.1/crm_client/accounts/get_accounts_parameters.go b/api/crm/v0.0.1/crm_client/accounts/get_accounts_parameters.go new file mode 100644 index 0000000..640cccd --- /dev/null +++ b/api/crm/v0.0.1/crm_client/accounts/get_accounts_parameters.go @@ -0,0 +1,311 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package accounts + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetAccountsParams creates a new GetAccountsParams object +// with the default values initialized. +func NewGetAccountsParams() *GetAccountsParams { + var () + return &GetAccountsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetAccountsParamsWithTimeout creates a new GetAccountsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetAccountsParamsWithTimeout(timeout time.Duration) *GetAccountsParams { + var () + return &GetAccountsParams{ + + timeout: timeout, + } +} + +// NewGetAccountsParamsWithContext creates a new GetAccountsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetAccountsParamsWithContext(ctx context.Context) *GetAccountsParams { + var () + return &GetAccountsParams{ + + Context: ctx, + } +} + +// NewGetAccountsParamsWithHTTPClient creates a new GetAccountsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetAccountsParamsWithHTTPClient(client *http.Client) *GetAccountsParams { + var () + return &GetAccountsParams{ + HTTPClient: client, + } +} + +/*GetAccountsParams contains all the parameters to send to the API endpoint +for the get accounts operation typically these are written to a http.Request +*/ +type GetAccountsParams struct { + + /*AccountID + Taxnexus Record Id of an Account + + */ + AccountID *string + /*Active + Only retrieve active records? + + */ + Active *bool + /*Email + Email address used for identity lookup + + */ + Email *string + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Name + The Name of this Object + + */ + Name *string + /*Offset + How many objects to skip? + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get accounts params +func (o *GetAccountsParams) WithTimeout(timeout time.Duration) *GetAccountsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get accounts params +func (o *GetAccountsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get accounts params +func (o *GetAccountsParams) WithContext(ctx context.Context) *GetAccountsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get accounts params +func (o *GetAccountsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get accounts params +func (o *GetAccountsParams) WithHTTPClient(client *http.Client) *GetAccountsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get accounts params +func (o *GetAccountsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAccountID adds the accountID to the get accounts params +func (o *GetAccountsParams) WithAccountID(accountID *string) *GetAccountsParams { + o.SetAccountID(accountID) + return o +} + +// SetAccountID adds the accountId to the get accounts params +func (o *GetAccountsParams) SetAccountID(accountID *string) { + o.AccountID = accountID +} + +// WithActive adds the active to the get accounts params +func (o *GetAccountsParams) WithActive(active *bool) *GetAccountsParams { + o.SetActive(active) + return o +} + +// SetActive adds the active to the get accounts params +func (o *GetAccountsParams) SetActive(active *bool) { + o.Active = active +} + +// WithEmail adds the email to the get accounts params +func (o *GetAccountsParams) WithEmail(email *string) *GetAccountsParams { + o.SetEmail(email) + return o +} + +// SetEmail adds the email to the get accounts params +func (o *GetAccountsParams) SetEmail(email *string) { + o.Email = email +} + +// WithLimit adds the limit to the get accounts params +func (o *GetAccountsParams) WithLimit(limit *int64) *GetAccountsParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get accounts params +func (o *GetAccountsParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithName adds the name to the get accounts params +func (o *GetAccountsParams) WithName(name *string) *GetAccountsParams { + o.SetName(name) + return o +} + +// SetName adds the name to the get accounts params +func (o *GetAccountsParams) SetName(name *string) { + o.Name = name +} + +// WithOffset adds the offset to the get accounts params +func (o *GetAccountsParams) WithOffset(offset *int64) *GetAccountsParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get accounts params +func (o *GetAccountsParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *GetAccountsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AccountID != nil { + + // query param accountId + var qrAccountID string + if o.AccountID != nil { + qrAccountID = *o.AccountID + } + qAccountID := qrAccountID + if qAccountID != "" { + if err := r.SetQueryParam("accountId", qAccountID); err != nil { + return err + } + } + + } + + if o.Active != nil { + + // query param active + var qrActive bool + if o.Active != nil { + qrActive = *o.Active + } + qActive := swag.FormatBool(qrActive) + if qActive != "" { + if err := r.SetQueryParam("active", qActive); err != nil { + return err + } + } + + } + + if o.Email != nil { + + // query param email + var qrEmail string + if o.Email != nil { + qrEmail = *o.Email + } + qEmail := qrEmail + if qEmail != "" { + if err := r.SetQueryParam("email", qEmail); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Name != nil { + + // query param name + var qrName string + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/crm/v0.0.1/crm_client/accounts/get_accounts_responses.go b/api/crm/v0.0.1/crm_client/accounts/get_accounts_responses.go new file mode 100644 index 0000000..5a83074 --- /dev/null +++ b/api/crm/v0.0.1/crm_client/accounts/get_accounts_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package accounts + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/crm/crm_models" +) + +// GetAccountsReader is a Reader for the GetAccounts structure. +type GetAccountsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetAccountsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetAccountsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetAccountsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetAccountsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetAccountsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetAccountsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetAccountsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetAccountsOK creates a GetAccountsOK with default headers values +func NewGetAccountsOK() *GetAccountsOK { + return &GetAccountsOK{} +} + +/*GetAccountsOK handles this case with default header values. + +Taxnexus Response with Account objects with Contacts +*/ +type GetAccountsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *crm_models.AccountResponse +} + +func (o *GetAccountsOK) Error() string { + return fmt.Sprintf("[GET /accounts][%d] getAccountsOK %+v", 200, o.Payload) +} + +func (o *GetAccountsOK) GetPayload() *crm_models.AccountResponse { + return o.Payload +} + +func (o *GetAccountsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(crm_models.AccountResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAccountsUnauthorized creates a GetAccountsUnauthorized with default headers values +func NewGetAccountsUnauthorized() *GetAccountsUnauthorized { + return &GetAccountsUnauthorized{} +} + +/*GetAccountsUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetAccountsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetAccountsUnauthorized) Error() string { + return fmt.Sprintf("[GET /accounts][%d] getAccountsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetAccountsUnauthorized) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetAccountsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAccountsForbidden creates a GetAccountsForbidden with default headers values +func NewGetAccountsForbidden() *GetAccountsForbidden { + return &GetAccountsForbidden{} +} + +/*GetAccountsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetAccountsForbidden struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetAccountsForbidden) Error() string { + return fmt.Sprintf("[GET /accounts][%d] getAccountsForbidden %+v", 403, o.Payload) +} + +func (o *GetAccountsForbidden) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetAccountsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAccountsNotFound creates a GetAccountsNotFound with default headers values +func NewGetAccountsNotFound() *GetAccountsNotFound { + return &GetAccountsNotFound{} +} + +/*GetAccountsNotFound handles this case with default header values. + +Resource was not found +*/ +type GetAccountsNotFound struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetAccountsNotFound) Error() string { + return fmt.Sprintf("[GET /accounts][%d] getAccountsNotFound %+v", 404, o.Payload) +} + +func (o *GetAccountsNotFound) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetAccountsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAccountsUnprocessableEntity creates a GetAccountsUnprocessableEntity with default headers values +func NewGetAccountsUnprocessableEntity() *GetAccountsUnprocessableEntity { + return &GetAccountsUnprocessableEntity{} +} + +/*GetAccountsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetAccountsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetAccountsUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /accounts][%d] getAccountsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetAccountsUnprocessableEntity) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetAccountsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAccountsInternalServerError creates a GetAccountsInternalServerError with default headers values +func NewGetAccountsInternalServerError() *GetAccountsInternalServerError { + return &GetAccountsInternalServerError{} +} + +/*GetAccountsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetAccountsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetAccountsInternalServerError) Error() string { + return fmt.Sprintf("[GET /accounts][%d] getAccountsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetAccountsInternalServerError) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetAccountsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/crm/v0.0.1/crm_client/accounts/post_accounts_parameters.go b/api/crm/v0.0.1/crm_client/accounts/post_accounts_parameters.go new file mode 100644 index 0000000..6a16a22 --- /dev/null +++ b/api/crm/v0.0.1/crm_client/accounts/post_accounts_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package accounts + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/crm/crm_models" +) + +// NewPostAccountsParams creates a new PostAccountsParams object +// with the default values initialized. +func NewPostAccountsParams() *PostAccountsParams { + var () + return &PostAccountsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostAccountsParamsWithTimeout creates a new PostAccountsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostAccountsParamsWithTimeout(timeout time.Duration) *PostAccountsParams { + var () + return &PostAccountsParams{ + + timeout: timeout, + } +} + +// NewPostAccountsParamsWithContext creates a new PostAccountsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostAccountsParamsWithContext(ctx context.Context) *PostAccountsParams { + var () + return &PostAccountsParams{ + + Context: ctx, + } +} + +// NewPostAccountsParamsWithHTTPClient creates a new PostAccountsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostAccountsParamsWithHTTPClient(client *http.Client) *PostAccountsParams { + var () + return &PostAccountsParams{ + HTTPClient: client, + } +} + +/*PostAccountsParams contains all the parameters to send to the API endpoint +for the post accounts operation typically these are written to a http.Request +*/ +type PostAccountsParams struct { + + /*AccountRequest + An array of new Account records + + */ + AccountRequest *crm_models.AccountRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post accounts params +func (o *PostAccountsParams) WithTimeout(timeout time.Duration) *PostAccountsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post accounts params +func (o *PostAccountsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post accounts params +func (o *PostAccountsParams) WithContext(ctx context.Context) *PostAccountsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post accounts params +func (o *PostAccountsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post accounts params +func (o *PostAccountsParams) WithHTTPClient(client *http.Client) *PostAccountsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post accounts params +func (o *PostAccountsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAccountRequest adds the accountRequest to the post accounts params +func (o *PostAccountsParams) WithAccountRequest(accountRequest *crm_models.AccountRequest) *PostAccountsParams { + o.SetAccountRequest(accountRequest) + return o +} + +// SetAccountRequest adds the accountRequest to the post accounts params +func (o *PostAccountsParams) SetAccountRequest(accountRequest *crm_models.AccountRequest) { + o.AccountRequest = accountRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostAccountsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AccountRequest != nil { + if err := r.SetBodyParam(o.AccountRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/crm/v0.0.1/crm_client/accounts/post_accounts_responses.go b/api/crm/v0.0.1/crm_client/accounts/post_accounts_responses.go new file mode 100644 index 0000000..7c907dc --- /dev/null +++ b/api/crm/v0.0.1/crm_client/accounts/post_accounts_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package accounts + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/crm/crm_models" +) + +// PostAccountsReader is a Reader for the PostAccounts structure. +type PostAccountsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostAccountsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostAccountsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostAccountsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostAccountsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostAccountsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostAccountsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostAccountsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostAccountsOK creates a PostAccountsOK with default headers values +func NewPostAccountsOK() *PostAccountsOK { + return &PostAccountsOK{} +} + +/*PostAccountsOK handles this case with default header values. + +Taxnexus Response with Account objects with Contacts +*/ +type PostAccountsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *crm_models.AccountResponse +} + +func (o *PostAccountsOK) Error() string { + return fmt.Sprintf("[POST /accounts][%d] postAccountsOK %+v", 200, o.Payload) +} + +func (o *PostAccountsOK) GetPayload() *crm_models.AccountResponse { + return o.Payload +} + +func (o *PostAccountsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(crm_models.AccountResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostAccountsUnauthorized creates a PostAccountsUnauthorized with default headers values +func NewPostAccountsUnauthorized() *PostAccountsUnauthorized { + return &PostAccountsUnauthorized{} +} + +/*PostAccountsUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PostAccountsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PostAccountsUnauthorized) Error() string { + return fmt.Sprintf("[POST /accounts][%d] postAccountsUnauthorized %+v", 401, o.Payload) +} + +func (o *PostAccountsUnauthorized) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PostAccountsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostAccountsForbidden creates a PostAccountsForbidden with default headers values +func NewPostAccountsForbidden() *PostAccountsForbidden { + return &PostAccountsForbidden{} +} + +/*PostAccountsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostAccountsForbidden struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PostAccountsForbidden) Error() string { + return fmt.Sprintf("[POST /accounts][%d] postAccountsForbidden %+v", 403, o.Payload) +} + +func (o *PostAccountsForbidden) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PostAccountsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostAccountsNotFound creates a PostAccountsNotFound with default headers values +func NewPostAccountsNotFound() *PostAccountsNotFound { + return &PostAccountsNotFound{} +} + +/*PostAccountsNotFound handles this case with default header values. + +Resource was not found +*/ +type PostAccountsNotFound struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PostAccountsNotFound) Error() string { + return fmt.Sprintf("[POST /accounts][%d] postAccountsNotFound %+v", 404, o.Payload) +} + +func (o *PostAccountsNotFound) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PostAccountsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostAccountsUnprocessableEntity creates a PostAccountsUnprocessableEntity with default headers values +func NewPostAccountsUnprocessableEntity() *PostAccountsUnprocessableEntity { + return &PostAccountsUnprocessableEntity{} +} + +/*PostAccountsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostAccountsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PostAccountsUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /accounts][%d] postAccountsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostAccountsUnprocessableEntity) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PostAccountsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostAccountsInternalServerError creates a PostAccountsInternalServerError with default headers values +func NewPostAccountsInternalServerError() *PostAccountsInternalServerError { + return &PostAccountsInternalServerError{} +} + +/*PostAccountsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostAccountsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PostAccountsInternalServerError) Error() string { + return fmt.Sprintf("[POST /accounts][%d] postAccountsInternalServerError %+v", 500, o.Payload) +} + +func (o *PostAccountsInternalServerError) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PostAccountsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/crm/v0.0.1/crm_client/accounts/put_account_parameters.go b/api/crm/v0.0.1/crm_client/accounts/put_account_parameters.go new file mode 100644 index 0000000..b833c4f --- /dev/null +++ b/api/crm/v0.0.1/crm_client/accounts/put_account_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package accounts + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/crm/crm_models" +) + +// NewPutAccountParams creates a new PutAccountParams object +// with the default values initialized. +func NewPutAccountParams() *PutAccountParams { + var () + return &PutAccountParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPutAccountParamsWithTimeout creates a new PutAccountParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPutAccountParamsWithTimeout(timeout time.Duration) *PutAccountParams { + var () + return &PutAccountParams{ + + timeout: timeout, + } +} + +// NewPutAccountParamsWithContext creates a new PutAccountParams object +// with the default values initialized, and the ability to set a context for a request +func NewPutAccountParamsWithContext(ctx context.Context) *PutAccountParams { + var () + return &PutAccountParams{ + + Context: ctx, + } +} + +// NewPutAccountParamsWithHTTPClient creates a new PutAccountParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPutAccountParamsWithHTTPClient(client *http.Client) *PutAccountParams { + var () + return &PutAccountParams{ + HTTPClient: client, + } +} + +/*PutAccountParams contains all the parameters to send to the API endpoint +for the put account operation typically these are written to a http.Request +*/ +type PutAccountParams struct { + + /*AccountRequest + An array of new Account records + + */ + AccountRequest *crm_models.AccountRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the put account params +func (o *PutAccountParams) WithTimeout(timeout time.Duration) *PutAccountParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the put account params +func (o *PutAccountParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the put account params +func (o *PutAccountParams) WithContext(ctx context.Context) *PutAccountParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the put account params +func (o *PutAccountParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the put account params +func (o *PutAccountParams) WithHTTPClient(client *http.Client) *PutAccountParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the put account params +func (o *PutAccountParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAccountRequest adds the accountRequest to the put account params +func (o *PutAccountParams) WithAccountRequest(accountRequest *crm_models.AccountRequest) *PutAccountParams { + o.SetAccountRequest(accountRequest) + return o +} + +// SetAccountRequest adds the accountRequest to the put account params +func (o *PutAccountParams) SetAccountRequest(accountRequest *crm_models.AccountRequest) { + o.AccountRequest = accountRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PutAccountParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AccountRequest != nil { + if err := r.SetBodyParam(o.AccountRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/crm/v0.0.1/crm_client/accounts/put_account_responses.go b/api/crm/v0.0.1/crm_client/accounts/put_account_responses.go new file mode 100644 index 0000000..2477d13 --- /dev/null +++ b/api/crm/v0.0.1/crm_client/accounts/put_account_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package accounts + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/crm/crm_models" +) + +// PutAccountReader is a Reader for the PutAccount structure. +type PutAccountReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PutAccountReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPutAccountOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPutAccountUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPutAccountForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPutAccountNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPutAccountUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPutAccountInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPutAccountOK creates a PutAccountOK with default headers values +func NewPutAccountOK() *PutAccountOK { + return &PutAccountOK{} +} + +/*PutAccountOK handles this case with default header values. + +Taxnexus Response with Account objects with Contacts +*/ +type PutAccountOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *crm_models.AccountResponse +} + +func (o *PutAccountOK) Error() string { + return fmt.Sprintf("[PUT /accounts][%d] putAccountOK %+v", 200, o.Payload) +} + +func (o *PutAccountOK) GetPayload() *crm_models.AccountResponse { + return o.Payload +} + +func (o *PutAccountOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(crm_models.AccountResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutAccountUnauthorized creates a PutAccountUnauthorized with default headers values +func NewPutAccountUnauthorized() *PutAccountUnauthorized { + return &PutAccountUnauthorized{} +} + +/*PutAccountUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PutAccountUnauthorized struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PutAccountUnauthorized) Error() string { + return fmt.Sprintf("[PUT /accounts][%d] putAccountUnauthorized %+v", 401, o.Payload) +} + +func (o *PutAccountUnauthorized) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PutAccountUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutAccountForbidden creates a PutAccountForbidden with default headers values +func NewPutAccountForbidden() *PutAccountForbidden { + return &PutAccountForbidden{} +} + +/*PutAccountForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PutAccountForbidden struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PutAccountForbidden) Error() string { + return fmt.Sprintf("[PUT /accounts][%d] putAccountForbidden %+v", 403, o.Payload) +} + +func (o *PutAccountForbidden) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PutAccountForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutAccountNotFound creates a PutAccountNotFound with default headers values +func NewPutAccountNotFound() *PutAccountNotFound { + return &PutAccountNotFound{} +} + +/*PutAccountNotFound handles this case with default header values. + +Resource was not found +*/ +type PutAccountNotFound struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PutAccountNotFound) Error() string { + return fmt.Sprintf("[PUT /accounts][%d] putAccountNotFound %+v", 404, o.Payload) +} + +func (o *PutAccountNotFound) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PutAccountNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutAccountUnprocessableEntity creates a PutAccountUnprocessableEntity with default headers values +func NewPutAccountUnprocessableEntity() *PutAccountUnprocessableEntity { + return &PutAccountUnprocessableEntity{} +} + +/*PutAccountUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PutAccountUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PutAccountUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /accounts][%d] putAccountUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutAccountUnprocessableEntity) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PutAccountUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutAccountInternalServerError creates a PutAccountInternalServerError with default headers values +func NewPutAccountInternalServerError() *PutAccountInternalServerError { + return &PutAccountInternalServerError{} +} + +/*PutAccountInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PutAccountInternalServerError struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PutAccountInternalServerError) Error() string { + return fmt.Sprintf("[PUT /accounts][%d] putAccountInternalServerError %+v", 500, o.Payload) +} + +func (o *PutAccountInternalServerError) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PutAccountInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/crm/v0.0.1/crm_client/companies/companies_client.go b/api/crm/v0.0.1/crm_client/companies/companies_client.go new file mode 100644 index 0000000..c589a61 --- /dev/null +++ b/api/crm/v0.0.1/crm_client/companies/companies_client.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package companies + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new companies API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for companies API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetCompanies(params *GetCompaniesParams, authInfo runtime.ClientAuthInfoWriter) (*GetCompaniesOK, error) + + GetCompaniesObservable(params *GetCompaniesObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetCompaniesObservableOK, error) + + PostCompanies(params *PostCompaniesParams, authInfo runtime.ClientAuthInfoWriter) (*PostCompaniesOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetCompanies gets company records + + Retrieve Company records from the datastore +*/ +func (a *Client) GetCompanies(params *GetCompaniesParams, authInfo runtime.ClientAuthInfoWriter) (*GetCompaniesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetCompaniesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getCompanies", + Method: "GET", + PathPattern: "/companies", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetCompaniesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetCompaniesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getCompanies: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetCompaniesObservable gets taxnexus companies in an observable array + + A list of companies in a simple JSON array +*/ +func (a *Client) GetCompaniesObservable(params *GetCompaniesObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetCompaniesObservableOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetCompaniesObservableParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getCompaniesObservable", + Method: "GET", + PathPattern: "/companies/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetCompaniesObservableReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetCompaniesObservableOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getCompaniesObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostCompanies adds new companies + + Add new companies +*/ +func (a *Client) PostCompanies(params *PostCompaniesParams, authInfo runtime.ClientAuthInfoWriter) (*PostCompaniesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostCompaniesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postCompanies", + Method: "POST", + PathPattern: "/companies", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostCompaniesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostCompaniesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postCompanies: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/crm/v0.0.1/crm_client/companies/get_companies_observable_parameters.go b/api/crm/v0.0.1/crm_client/companies/get_companies_observable_parameters.go new file mode 100644 index 0000000..fb5f538 --- /dev/null +++ b/api/crm/v0.0.1/crm_client/companies/get_companies_observable_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package companies + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetCompaniesObservableParams creates a new GetCompaniesObservableParams object +// with the default values initialized. +func NewGetCompaniesObservableParams() *GetCompaniesObservableParams { + var () + return &GetCompaniesObservableParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetCompaniesObservableParamsWithTimeout creates a new GetCompaniesObservableParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetCompaniesObservableParamsWithTimeout(timeout time.Duration) *GetCompaniesObservableParams { + var () + return &GetCompaniesObservableParams{ + + timeout: timeout, + } +} + +// NewGetCompaniesObservableParamsWithContext creates a new GetCompaniesObservableParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetCompaniesObservableParamsWithContext(ctx context.Context) *GetCompaniesObservableParams { + var () + return &GetCompaniesObservableParams{ + + Context: ctx, + } +} + +// NewGetCompaniesObservableParamsWithHTTPClient creates a new GetCompaniesObservableParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetCompaniesObservableParamsWithHTTPClient(client *http.Client) *GetCompaniesObservableParams { + var () + return &GetCompaniesObservableParams{ + HTTPClient: client, + } +} + +/*GetCompaniesObservableParams contains all the parameters to send to the API endpoint +for the get companies observable operation typically these are written to a http.Request +*/ +type GetCompaniesObservableParams struct { + + /*CompanyID + Taxnexus Company record ID + + */ + CompanyID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get companies observable params +func (o *GetCompaniesObservableParams) WithTimeout(timeout time.Duration) *GetCompaniesObservableParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get companies observable params +func (o *GetCompaniesObservableParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get companies observable params +func (o *GetCompaniesObservableParams) WithContext(ctx context.Context) *GetCompaniesObservableParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get companies observable params +func (o *GetCompaniesObservableParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get companies observable params +func (o *GetCompaniesObservableParams) WithHTTPClient(client *http.Client) *GetCompaniesObservableParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get companies observable params +func (o *GetCompaniesObservableParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCompanyID adds the companyID to the get companies observable params +func (o *GetCompaniesObservableParams) WithCompanyID(companyID *string) *GetCompaniesObservableParams { + o.SetCompanyID(companyID) + return o +} + +// SetCompanyID adds the companyId to the get companies observable params +func (o *GetCompaniesObservableParams) SetCompanyID(companyID *string) { + o.CompanyID = companyID +} + +// WriteToRequest writes these params to a swagger request +func (o *GetCompaniesObservableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CompanyID != nil { + + // query param companyId + var qrCompanyID string + if o.CompanyID != nil { + qrCompanyID = *o.CompanyID + } + qCompanyID := qrCompanyID + if qCompanyID != "" { + if err := r.SetQueryParam("companyId", qCompanyID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/crm/v0.0.1/crm_client/companies/get_companies_observable_responses.go b/api/crm/v0.0.1/crm_client/companies/get_companies_observable_responses.go new file mode 100644 index 0000000..1b2389b --- /dev/null +++ b/api/crm/v0.0.1/crm_client/companies/get_companies_observable_responses.go @@ -0,0 +1,301 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package companies + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/crm/crm_models" +) + +// GetCompaniesObservableReader is a Reader for the GetCompaniesObservable structure. +type GetCompaniesObservableReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetCompaniesObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetCompaniesObservableOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetCompaniesObservableUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetCompaniesObservableForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetCompaniesObservableNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetCompaniesObservableUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetCompaniesObservableInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetCompaniesObservableOK creates a GetCompaniesObservableOK with default headers values +func NewGetCompaniesObservableOK() *GetCompaniesObservableOK { + return &GetCompaniesObservableOK{} +} + +/*GetCompaniesObservableOK handles this case with default header values. + +Taxnexus Response with an array of Company objects +*/ +type GetCompaniesObservableOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload []*crm_models.Company +} + +func (o *GetCompaniesObservableOK) Error() string { + return fmt.Sprintf("[GET /companies/observable][%d] getCompaniesObservableOK %+v", 200, o.Payload) +} + +func (o *GetCompaniesObservableOK) GetPayload() []*crm_models.Company { + return o.Payload +} + +func (o *GetCompaniesObservableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCompaniesObservableUnauthorized creates a GetCompaniesObservableUnauthorized with default headers values +func NewGetCompaniesObservableUnauthorized() *GetCompaniesObservableUnauthorized { + return &GetCompaniesObservableUnauthorized{} +} + +/*GetCompaniesObservableUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetCompaniesObservableUnauthorized struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetCompaniesObservableUnauthorized) Error() string { + return fmt.Sprintf("[GET /companies/observable][%d] getCompaniesObservableUnauthorized %+v", 401, o.Payload) +} + +func (o *GetCompaniesObservableUnauthorized) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetCompaniesObservableUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCompaniesObservableForbidden creates a GetCompaniesObservableForbidden with default headers values +func NewGetCompaniesObservableForbidden() *GetCompaniesObservableForbidden { + return &GetCompaniesObservableForbidden{} +} + +/*GetCompaniesObservableForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetCompaniesObservableForbidden struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetCompaniesObservableForbidden) Error() string { + return fmt.Sprintf("[GET /companies/observable][%d] getCompaniesObservableForbidden %+v", 403, o.Payload) +} + +func (o *GetCompaniesObservableForbidden) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetCompaniesObservableForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCompaniesObservableNotFound creates a GetCompaniesObservableNotFound with default headers values +func NewGetCompaniesObservableNotFound() *GetCompaniesObservableNotFound { + return &GetCompaniesObservableNotFound{} +} + +/*GetCompaniesObservableNotFound handles this case with default header values. + +Resource was not found +*/ +type GetCompaniesObservableNotFound struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetCompaniesObservableNotFound) Error() string { + return fmt.Sprintf("[GET /companies/observable][%d] getCompaniesObservableNotFound %+v", 404, o.Payload) +} + +func (o *GetCompaniesObservableNotFound) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetCompaniesObservableNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCompaniesObservableUnprocessableEntity creates a GetCompaniesObservableUnprocessableEntity with default headers values +func NewGetCompaniesObservableUnprocessableEntity() *GetCompaniesObservableUnprocessableEntity { + return &GetCompaniesObservableUnprocessableEntity{} +} + +/*GetCompaniesObservableUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetCompaniesObservableUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetCompaniesObservableUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /companies/observable][%d] getCompaniesObservableUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetCompaniesObservableUnprocessableEntity) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetCompaniesObservableUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCompaniesObservableInternalServerError creates a GetCompaniesObservableInternalServerError with default headers values +func NewGetCompaniesObservableInternalServerError() *GetCompaniesObservableInternalServerError { + return &GetCompaniesObservableInternalServerError{} +} + +/*GetCompaniesObservableInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetCompaniesObservableInternalServerError struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetCompaniesObservableInternalServerError) Error() string { + return fmt.Sprintf("[GET /companies/observable][%d] getCompaniesObservableInternalServerError %+v", 500, o.Payload) +} + +func (o *GetCompaniesObservableInternalServerError) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetCompaniesObservableInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/crm/v0.0.1/crm_client/companies/get_companies_parameters.go b/api/crm/v0.0.1/crm_client/companies/get_companies_parameters.go new file mode 100644 index 0000000..cabaefa --- /dev/null +++ b/api/crm/v0.0.1/crm_client/companies/get_companies_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package companies + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetCompaniesParams creates a new GetCompaniesParams object +// with the default values initialized. +func NewGetCompaniesParams() *GetCompaniesParams { + var () + return &GetCompaniesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetCompaniesParamsWithTimeout creates a new GetCompaniesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetCompaniesParamsWithTimeout(timeout time.Duration) *GetCompaniesParams { + var () + return &GetCompaniesParams{ + + timeout: timeout, + } +} + +// NewGetCompaniesParamsWithContext creates a new GetCompaniesParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetCompaniesParamsWithContext(ctx context.Context) *GetCompaniesParams { + var () + return &GetCompaniesParams{ + + Context: ctx, + } +} + +// NewGetCompaniesParamsWithHTTPClient creates a new GetCompaniesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetCompaniesParamsWithHTTPClient(client *http.Client) *GetCompaniesParams { + var () + return &GetCompaniesParams{ + HTTPClient: client, + } +} + +/*GetCompaniesParams contains all the parameters to send to the API endpoint +for the get companies operation typically these are written to a http.Request +*/ +type GetCompaniesParams struct { + + /*CompanyID + Taxnexus Company record ID + + */ + CompanyID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get companies params +func (o *GetCompaniesParams) WithTimeout(timeout time.Duration) *GetCompaniesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get companies params +func (o *GetCompaniesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get companies params +func (o *GetCompaniesParams) WithContext(ctx context.Context) *GetCompaniesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get companies params +func (o *GetCompaniesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get companies params +func (o *GetCompaniesParams) WithHTTPClient(client *http.Client) *GetCompaniesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get companies params +func (o *GetCompaniesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCompanyID adds the companyID to the get companies params +func (o *GetCompaniesParams) WithCompanyID(companyID *string) *GetCompaniesParams { + o.SetCompanyID(companyID) + return o +} + +// SetCompanyID adds the companyId to the get companies params +func (o *GetCompaniesParams) SetCompanyID(companyID *string) { + o.CompanyID = companyID +} + +// WriteToRequest writes these params to a swagger request +func (o *GetCompaniesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CompanyID != nil { + + // query param companyId + var qrCompanyID string + if o.CompanyID != nil { + qrCompanyID = *o.CompanyID + } + qCompanyID := qrCompanyID + if qCompanyID != "" { + if err := r.SetQueryParam("companyId", qCompanyID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/crm/v0.0.1/crm_client/companies/get_companies_responses.go b/api/crm/v0.0.1/crm_client/companies/get_companies_responses.go new file mode 100644 index 0000000..3d6101d --- /dev/null +++ b/api/crm/v0.0.1/crm_client/companies/get_companies_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package companies + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/crm/crm_models" +) + +// GetCompaniesReader is a Reader for the GetCompanies structure. +type GetCompaniesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetCompaniesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetCompaniesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetCompaniesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetCompaniesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetCompaniesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetCompaniesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetCompaniesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetCompaniesOK creates a GetCompaniesOK with default headers values +func NewGetCompaniesOK() *GetCompaniesOK { + return &GetCompaniesOK{} +} + +/*GetCompaniesOK handles this case with default header values. + +Taxnexus Response with Company objects +*/ +type GetCompaniesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *crm_models.CompanyResponse +} + +func (o *GetCompaniesOK) Error() string { + return fmt.Sprintf("[GET /companies][%d] getCompaniesOK %+v", 200, o.Payload) +} + +func (o *GetCompaniesOK) GetPayload() *crm_models.CompanyResponse { + return o.Payload +} + +func (o *GetCompaniesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(crm_models.CompanyResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCompaniesUnauthorized creates a GetCompaniesUnauthorized with default headers values +func NewGetCompaniesUnauthorized() *GetCompaniesUnauthorized { + return &GetCompaniesUnauthorized{} +} + +/*GetCompaniesUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetCompaniesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetCompaniesUnauthorized) Error() string { + return fmt.Sprintf("[GET /companies][%d] getCompaniesUnauthorized %+v", 401, o.Payload) +} + +func (o *GetCompaniesUnauthorized) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetCompaniesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCompaniesForbidden creates a GetCompaniesForbidden with default headers values +func NewGetCompaniesForbidden() *GetCompaniesForbidden { + return &GetCompaniesForbidden{} +} + +/*GetCompaniesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetCompaniesForbidden struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetCompaniesForbidden) Error() string { + return fmt.Sprintf("[GET /companies][%d] getCompaniesForbidden %+v", 403, o.Payload) +} + +func (o *GetCompaniesForbidden) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetCompaniesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCompaniesNotFound creates a GetCompaniesNotFound with default headers values +func NewGetCompaniesNotFound() *GetCompaniesNotFound { + return &GetCompaniesNotFound{} +} + +/*GetCompaniesNotFound handles this case with default header values. + +Resource was not found +*/ +type GetCompaniesNotFound struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetCompaniesNotFound) Error() string { + return fmt.Sprintf("[GET /companies][%d] getCompaniesNotFound %+v", 404, o.Payload) +} + +func (o *GetCompaniesNotFound) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetCompaniesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCompaniesUnprocessableEntity creates a GetCompaniesUnprocessableEntity with default headers values +func NewGetCompaniesUnprocessableEntity() *GetCompaniesUnprocessableEntity { + return &GetCompaniesUnprocessableEntity{} +} + +/*GetCompaniesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetCompaniesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetCompaniesUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /companies][%d] getCompaniesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetCompaniesUnprocessableEntity) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetCompaniesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCompaniesInternalServerError creates a GetCompaniesInternalServerError with default headers values +func NewGetCompaniesInternalServerError() *GetCompaniesInternalServerError { + return &GetCompaniesInternalServerError{} +} + +/*GetCompaniesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetCompaniesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetCompaniesInternalServerError) Error() string { + return fmt.Sprintf("[GET /companies][%d] getCompaniesInternalServerError %+v", 500, o.Payload) +} + +func (o *GetCompaniesInternalServerError) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetCompaniesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/crm/v0.0.1/crm_client/companies/post_companies_parameters.go b/api/crm/v0.0.1/crm_client/companies/post_companies_parameters.go new file mode 100644 index 0000000..879df5b --- /dev/null +++ b/api/crm/v0.0.1/crm_client/companies/post_companies_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package companies + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/crm/crm_models" +) + +// NewPostCompaniesParams creates a new PostCompaniesParams object +// with the default values initialized. +func NewPostCompaniesParams() *PostCompaniesParams { + var () + return &PostCompaniesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostCompaniesParamsWithTimeout creates a new PostCompaniesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostCompaniesParamsWithTimeout(timeout time.Duration) *PostCompaniesParams { + var () + return &PostCompaniesParams{ + + timeout: timeout, + } +} + +// NewPostCompaniesParamsWithContext creates a new PostCompaniesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostCompaniesParamsWithContext(ctx context.Context) *PostCompaniesParams { + var () + return &PostCompaniesParams{ + + Context: ctx, + } +} + +// NewPostCompaniesParamsWithHTTPClient creates a new PostCompaniesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostCompaniesParamsWithHTTPClient(client *http.Client) *PostCompaniesParams { + var () + return &PostCompaniesParams{ + HTTPClient: client, + } +} + +/*PostCompaniesParams contains all the parameters to send to the API endpoint +for the post companies operation typically these are written to a http.Request +*/ +type PostCompaniesParams struct { + + /*CompaniesRequest + An array of new Contact records + + */ + CompaniesRequest *crm_models.CompanyRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post companies params +func (o *PostCompaniesParams) WithTimeout(timeout time.Duration) *PostCompaniesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post companies params +func (o *PostCompaniesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post companies params +func (o *PostCompaniesParams) WithContext(ctx context.Context) *PostCompaniesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post companies params +func (o *PostCompaniesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post companies params +func (o *PostCompaniesParams) WithHTTPClient(client *http.Client) *PostCompaniesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post companies params +func (o *PostCompaniesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCompaniesRequest adds the companiesRequest to the post companies params +func (o *PostCompaniesParams) WithCompaniesRequest(companiesRequest *crm_models.CompanyRequest) *PostCompaniesParams { + o.SetCompaniesRequest(companiesRequest) + return o +} + +// SetCompaniesRequest adds the companiesRequest to the post companies params +func (o *PostCompaniesParams) SetCompaniesRequest(companiesRequest *crm_models.CompanyRequest) { + o.CompaniesRequest = companiesRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostCompaniesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CompaniesRequest != nil { + if err := r.SetBodyParam(o.CompaniesRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/crm/v0.0.1/crm_client/companies/post_companies_responses.go b/api/crm/v0.0.1/crm_client/companies/post_companies_responses.go new file mode 100644 index 0000000..bfcf74e --- /dev/null +++ b/api/crm/v0.0.1/crm_client/companies/post_companies_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package companies + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/crm/crm_models" +) + +// PostCompaniesReader is a Reader for the PostCompanies structure. +type PostCompaniesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostCompaniesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostCompaniesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostCompaniesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostCompaniesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostCompaniesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostCompaniesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostCompaniesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostCompaniesOK creates a PostCompaniesOK with default headers values +func NewPostCompaniesOK() *PostCompaniesOK { + return &PostCompaniesOK{} +} + +/*PostCompaniesOK handles this case with default header values. + +Taxnexus Response with Company objects +*/ +type PostCompaniesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *crm_models.CompanyResponse +} + +func (o *PostCompaniesOK) Error() string { + return fmt.Sprintf("[POST /companies][%d] postCompaniesOK %+v", 200, o.Payload) +} + +func (o *PostCompaniesOK) GetPayload() *crm_models.CompanyResponse { + return o.Payload +} + +func (o *PostCompaniesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(crm_models.CompanyResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCompaniesUnauthorized creates a PostCompaniesUnauthorized with default headers values +func NewPostCompaniesUnauthorized() *PostCompaniesUnauthorized { + return &PostCompaniesUnauthorized{} +} + +/*PostCompaniesUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PostCompaniesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PostCompaniesUnauthorized) Error() string { + return fmt.Sprintf("[POST /companies][%d] postCompaniesUnauthorized %+v", 401, o.Payload) +} + +func (o *PostCompaniesUnauthorized) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PostCompaniesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCompaniesForbidden creates a PostCompaniesForbidden with default headers values +func NewPostCompaniesForbidden() *PostCompaniesForbidden { + return &PostCompaniesForbidden{} +} + +/*PostCompaniesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostCompaniesForbidden struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PostCompaniesForbidden) Error() string { + return fmt.Sprintf("[POST /companies][%d] postCompaniesForbidden %+v", 403, o.Payload) +} + +func (o *PostCompaniesForbidden) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PostCompaniesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCompaniesNotFound creates a PostCompaniesNotFound with default headers values +func NewPostCompaniesNotFound() *PostCompaniesNotFound { + return &PostCompaniesNotFound{} +} + +/*PostCompaniesNotFound handles this case with default header values. + +Resource was not found +*/ +type PostCompaniesNotFound struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PostCompaniesNotFound) Error() string { + return fmt.Sprintf("[POST /companies][%d] postCompaniesNotFound %+v", 404, o.Payload) +} + +func (o *PostCompaniesNotFound) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PostCompaniesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCompaniesUnprocessableEntity creates a PostCompaniesUnprocessableEntity with default headers values +func NewPostCompaniesUnprocessableEntity() *PostCompaniesUnprocessableEntity { + return &PostCompaniesUnprocessableEntity{} +} + +/*PostCompaniesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostCompaniesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PostCompaniesUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /companies][%d] postCompaniesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostCompaniesUnprocessableEntity) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PostCompaniesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCompaniesInternalServerError creates a PostCompaniesInternalServerError with default headers values +func NewPostCompaniesInternalServerError() *PostCompaniesInternalServerError { + return &PostCompaniesInternalServerError{} +} + +/*PostCompaniesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostCompaniesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PostCompaniesInternalServerError) Error() string { + return fmt.Sprintf("[POST /companies][%d] postCompaniesInternalServerError %+v", 500, o.Payload) +} + +func (o *PostCompaniesInternalServerError) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PostCompaniesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/crm/v0.0.1/crm_client/contacts/contacts_client.go b/api/crm/v0.0.1/crm_client/contacts/contacts_client.go new file mode 100644 index 0000000..90d2274 --- /dev/null +++ b/api/crm/v0.0.1/crm_client/contacts/contacts_client.go @@ -0,0 +1,235 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package contacts + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new contacts API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for contacts API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + DeleteContact(params *DeleteContactParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteContactOK, error) + + GetContacts(params *GetContactsParams, authInfo runtime.ClientAuthInfoWriter) (*GetContactsOK, error) + + GetContactsObservable(params *GetContactsObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetContactsObservableOK, error) + + PostContacts(params *PostContactsParams, authInfo runtime.ClientAuthInfoWriter) (*PostContactsOK, error) + + PutContacts(params *PutContactsParams, authInfo runtime.ClientAuthInfoWriter) (*PutContactsOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + DeleteContact deletes a contact + + Delete Taxnexus Contact record +*/ +func (a *Client) DeleteContact(params *DeleteContactParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteContactOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDeleteContactParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "deleteContact", + Method: "DELETE", + PathPattern: "/contacts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &DeleteContactReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*DeleteContactOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for deleteContact: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetContacts gets a list of contacts + + Return a list of all available Contacts +*/ +func (a *Client) GetContacts(params *GetContactsParams, authInfo runtime.ClientAuthInfoWriter) (*GetContactsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetContactsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getContacts", + Method: "GET", + PathPattern: "/contacts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetContactsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetContactsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getContacts: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetContactsObservable gets taxnexus contacts in an observable array + + A list of contacts in a simple JSON array +*/ +func (a *Client) GetContactsObservable(params *GetContactsObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetContactsObservableOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetContactsObservableParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getContactsObservable", + Method: "GET", + PathPattern: "/contacts/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetContactsObservableReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetContactsObservableOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getContactsObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostContacts adds new contacts + + Contact record to be added +*/ +func (a *Client) PostContacts(params *PostContactsParams, authInfo runtime.ClientAuthInfoWriter) (*PostContactsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostContactsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postContacts", + Method: "POST", + PathPattern: "/contacts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostContactsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostContactsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postContacts: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PutContacts updates contact + + Update Contact records +*/ +func (a *Client) PutContacts(params *PutContactsParams, authInfo runtime.ClientAuthInfoWriter) (*PutContactsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPutContactsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "putContacts", + Method: "PUT", + PathPattern: "/contacts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PutContactsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PutContactsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for putContacts: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/crm/v0.0.1/crm_client/contacts/delete_contact_parameters.go b/api/crm/v0.0.1/crm_client/contacts/delete_contact_parameters.go new file mode 100644 index 0000000..4a6346d --- /dev/null +++ b/api/crm/v0.0.1/crm_client/contacts/delete_contact_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package contacts + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewDeleteContactParams creates a new DeleteContactParams object +// with the default values initialized. +func NewDeleteContactParams() *DeleteContactParams { + var () + return &DeleteContactParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewDeleteContactParamsWithTimeout creates a new DeleteContactParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewDeleteContactParamsWithTimeout(timeout time.Duration) *DeleteContactParams { + var () + return &DeleteContactParams{ + + timeout: timeout, + } +} + +// NewDeleteContactParamsWithContext creates a new DeleteContactParams object +// with the default values initialized, and the ability to set a context for a request +func NewDeleteContactParamsWithContext(ctx context.Context) *DeleteContactParams { + var () + return &DeleteContactParams{ + + Context: ctx, + } +} + +// NewDeleteContactParamsWithHTTPClient creates a new DeleteContactParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewDeleteContactParamsWithHTTPClient(client *http.Client) *DeleteContactParams { + var () + return &DeleteContactParams{ + HTTPClient: client, + } +} + +/*DeleteContactParams contains all the parameters to send to the API endpoint +for the delete contact operation typically these are written to a http.Request +*/ +type DeleteContactParams struct { + + /*ContactID + Taxnexus Contact record ID + + */ + ContactID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the delete contact params +func (o *DeleteContactParams) WithTimeout(timeout time.Duration) *DeleteContactParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the delete contact params +func (o *DeleteContactParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the delete contact params +func (o *DeleteContactParams) WithContext(ctx context.Context) *DeleteContactParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the delete contact params +func (o *DeleteContactParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the delete contact params +func (o *DeleteContactParams) WithHTTPClient(client *http.Client) *DeleteContactParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the delete contact params +func (o *DeleteContactParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithContactID adds the contactID to the delete contact params +func (o *DeleteContactParams) WithContactID(contactID *string) *DeleteContactParams { + o.SetContactID(contactID) + return o +} + +// SetContactID adds the contactId to the delete contact params +func (o *DeleteContactParams) SetContactID(contactID *string) { + o.ContactID = contactID +} + +// WriteToRequest writes these params to a swagger request +func (o *DeleteContactParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ContactID != nil { + + // query param contactId + var qrContactID string + if o.ContactID != nil { + qrContactID = *o.ContactID + } + qContactID := qrContactID + if qContactID != "" { + if err := r.SetQueryParam("contactId", qContactID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/crm/v0.0.1/crm_client/contacts/delete_contact_responses.go b/api/crm/v0.0.1/crm_client/contacts/delete_contact_responses.go new file mode 100644 index 0000000..debc4c9 --- /dev/null +++ b/api/crm/v0.0.1/crm_client/contacts/delete_contact_responses.go @@ -0,0 +1,298 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package contacts + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/crm/crm_models" +) + +// DeleteContactReader is a Reader for the DeleteContact structure. +type DeleteContactReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DeleteContactReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDeleteContactOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewDeleteContactUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewDeleteContactForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewDeleteContactNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewDeleteContactUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewDeleteContactInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewDeleteContactOK creates a DeleteContactOK with default headers values +func NewDeleteContactOK() *DeleteContactOK { + return &DeleteContactOK{} +} + +/*DeleteContactOK handles this case with default header values. + +Taxnexus Response with Message Objects with Delete Status +*/ +type DeleteContactOK struct { + AccessControlAllowOrigin string + + Payload *crm_models.DeleteResponse +} + +func (o *DeleteContactOK) Error() string { + return fmt.Sprintf("[DELETE /contacts][%d] deleteContactOK %+v", 200, o.Payload) +} + +func (o *DeleteContactOK) GetPayload() *crm_models.DeleteResponse { + return o.Payload +} + +func (o *DeleteContactOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.DeleteResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteContactUnauthorized creates a DeleteContactUnauthorized with default headers values +func NewDeleteContactUnauthorized() *DeleteContactUnauthorized { + return &DeleteContactUnauthorized{} +} + +/*DeleteContactUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type DeleteContactUnauthorized struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *DeleteContactUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /contacts][%d] deleteContactUnauthorized %+v", 401, o.Payload) +} + +func (o *DeleteContactUnauthorized) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *DeleteContactUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteContactForbidden creates a DeleteContactForbidden with default headers values +func NewDeleteContactForbidden() *DeleteContactForbidden { + return &DeleteContactForbidden{} +} + +/*DeleteContactForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type DeleteContactForbidden struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *DeleteContactForbidden) Error() string { + return fmt.Sprintf("[DELETE /contacts][%d] deleteContactForbidden %+v", 403, o.Payload) +} + +func (o *DeleteContactForbidden) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *DeleteContactForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteContactNotFound creates a DeleteContactNotFound with default headers values +func NewDeleteContactNotFound() *DeleteContactNotFound { + return &DeleteContactNotFound{} +} + +/*DeleteContactNotFound handles this case with default header values. + +Resource was not found +*/ +type DeleteContactNotFound struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *DeleteContactNotFound) Error() string { + return fmt.Sprintf("[DELETE /contacts][%d] deleteContactNotFound %+v", 404, o.Payload) +} + +func (o *DeleteContactNotFound) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *DeleteContactNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteContactUnprocessableEntity creates a DeleteContactUnprocessableEntity with default headers values +func NewDeleteContactUnprocessableEntity() *DeleteContactUnprocessableEntity { + return &DeleteContactUnprocessableEntity{} +} + +/*DeleteContactUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type DeleteContactUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *DeleteContactUnprocessableEntity) Error() string { + return fmt.Sprintf("[DELETE /contacts][%d] deleteContactUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *DeleteContactUnprocessableEntity) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *DeleteContactUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteContactInternalServerError creates a DeleteContactInternalServerError with default headers values +func NewDeleteContactInternalServerError() *DeleteContactInternalServerError { + return &DeleteContactInternalServerError{} +} + +/*DeleteContactInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type DeleteContactInternalServerError struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *DeleteContactInternalServerError) Error() string { + return fmt.Sprintf("[DELETE /contacts][%d] deleteContactInternalServerError %+v", 500, o.Payload) +} + +func (o *DeleteContactInternalServerError) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *DeleteContactInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/crm/v0.0.1/crm_client/contacts/get_contacts_observable_parameters.go b/api/crm/v0.0.1/crm_client/contacts/get_contacts_observable_parameters.go new file mode 100644 index 0000000..2d95e7f --- /dev/null +++ b/api/crm/v0.0.1/crm_client/contacts/get_contacts_observable_parameters.go @@ -0,0 +1,247 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package contacts + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetContactsObservableParams creates a new GetContactsObservableParams object +// with the default values initialized. +func NewGetContactsObservableParams() *GetContactsObservableParams { + var () + return &GetContactsObservableParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetContactsObservableParamsWithTimeout creates a new GetContactsObservableParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetContactsObservableParamsWithTimeout(timeout time.Duration) *GetContactsObservableParams { + var () + return &GetContactsObservableParams{ + + timeout: timeout, + } +} + +// NewGetContactsObservableParamsWithContext creates a new GetContactsObservableParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetContactsObservableParamsWithContext(ctx context.Context) *GetContactsObservableParams { + var () + return &GetContactsObservableParams{ + + Context: ctx, + } +} + +// NewGetContactsObservableParamsWithHTTPClient creates a new GetContactsObservableParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetContactsObservableParamsWithHTTPClient(client *http.Client) *GetContactsObservableParams { + var () + return &GetContactsObservableParams{ + HTTPClient: client, + } +} + +/*GetContactsObservableParams contains all the parameters to send to the API endpoint +for the get contacts observable operation typically these are written to a http.Request +*/ +type GetContactsObservableParams struct { + + /*Active + Only retrieve active records? + + */ + Active *bool + /*ContactID + Taxnexus Contact record ID + + */ + ContactID *string + /*Email + Email address used for identity lookup + + */ + Email *string + /*Name + The Name of this Object + + */ + Name *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get contacts observable params +func (o *GetContactsObservableParams) WithTimeout(timeout time.Duration) *GetContactsObservableParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get contacts observable params +func (o *GetContactsObservableParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get contacts observable params +func (o *GetContactsObservableParams) WithContext(ctx context.Context) *GetContactsObservableParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get contacts observable params +func (o *GetContactsObservableParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get contacts observable params +func (o *GetContactsObservableParams) WithHTTPClient(client *http.Client) *GetContactsObservableParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get contacts observable params +func (o *GetContactsObservableParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithActive adds the active to the get contacts observable params +func (o *GetContactsObservableParams) WithActive(active *bool) *GetContactsObservableParams { + o.SetActive(active) + return o +} + +// SetActive adds the active to the get contacts observable params +func (o *GetContactsObservableParams) SetActive(active *bool) { + o.Active = active +} + +// WithContactID adds the contactID to the get contacts observable params +func (o *GetContactsObservableParams) WithContactID(contactID *string) *GetContactsObservableParams { + o.SetContactID(contactID) + return o +} + +// SetContactID adds the contactId to the get contacts observable params +func (o *GetContactsObservableParams) SetContactID(contactID *string) { + o.ContactID = contactID +} + +// WithEmail adds the email to the get contacts observable params +func (o *GetContactsObservableParams) WithEmail(email *string) *GetContactsObservableParams { + o.SetEmail(email) + return o +} + +// SetEmail adds the email to the get contacts observable params +func (o *GetContactsObservableParams) SetEmail(email *string) { + o.Email = email +} + +// WithName adds the name to the get contacts observable params +func (o *GetContactsObservableParams) WithName(name *string) *GetContactsObservableParams { + o.SetName(name) + return o +} + +// SetName adds the name to the get contacts observable params +func (o *GetContactsObservableParams) SetName(name *string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *GetContactsObservableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Active != nil { + + // query param active + var qrActive bool + if o.Active != nil { + qrActive = *o.Active + } + qActive := swag.FormatBool(qrActive) + if qActive != "" { + if err := r.SetQueryParam("active", qActive); err != nil { + return err + } + } + + } + + if o.ContactID != nil { + + // query param contactId + var qrContactID string + if o.ContactID != nil { + qrContactID = *o.ContactID + } + qContactID := qrContactID + if qContactID != "" { + if err := r.SetQueryParam("contactId", qContactID); err != nil { + return err + } + } + + } + + if o.Email != nil { + + // query param email + var qrEmail string + if o.Email != nil { + qrEmail = *o.Email + } + qEmail := qrEmail + if qEmail != "" { + if err := r.SetQueryParam("email", qEmail); err != nil { + return err + } + } + + } + + if o.Name != nil { + + // query param name + var qrName string + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/crm/v0.0.1/crm_client/contacts/get_contacts_observable_responses.go b/api/crm/v0.0.1/crm_client/contacts/get_contacts_observable_responses.go new file mode 100644 index 0000000..641ae67 --- /dev/null +++ b/api/crm/v0.0.1/crm_client/contacts/get_contacts_observable_responses.go @@ -0,0 +1,301 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package contacts + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/crm/crm_models" +) + +// GetContactsObservableReader is a Reader for the GetContactsObservable structure. +type GetContactsObservableReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetContactsObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetContactsObservableOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetContactsObservableUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetContactsObservableForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetContactsObservableNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetContactsObservableUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetContactsObservableInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetContactsObservableOK creates a GetContactsObservableOK with default headers values +func NewGetContactsObservableOK() *GetContactsObservableOK { + return &GetContactsObservableOK{} +} + +/*GetContactsObservableOK handles this case with default header values. + +Taxnexus Response with an array of Contact objects +*/ +type GetContactsObservableOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload []*crm_models.Contact +} + +func (o *GetContactsObservableOK) Error() string { + return fmt.Sprintf("[GET /contacts/observable][%d] getContactsObservableOK %+v", 200, o.Payload) +} + +func (o *GetContactsObservableOK) GetPayload() []*crm_models.Contact { + return o.Payload +} + +func (o *GetContactsObservableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetContactsObservableUnauthorized creates a GetContactsObservableUnauthorized with default headers values +func NewGetContactsObservableUnauthorized() *GetContactsObservableUnauthorized { + return &GetContactsObservableUnauthorized{} +} + +/*GetContactsObservableUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetContactsObservableUnauthorized struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetContactsObservableUnauthorized) Error() string { + return fmt.Sprintf("[GET /contacts/observable][%d] getContactsObservableUnauthorized %+v", 401, o.Payload) +} + +func (o *GetContactsObservableUnauthorized) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetContactsObservableUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetContactsObservableForbidden creates a GetContactsObservableForbidden with default headers values +func NewGetContactsObservableForbidden() *GetContactsObservableForbidden { + return &GetContactsObservableForbidden{} +} + +/*GetContactsObservableForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetContactsObservableForbidden struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetContactsObservableForbidden) Error() string { + return fmt.Sprintf("[GET /contacts/observable][%d] getContactsObservableForbidden %+v", 403, o.Payload) +} + +func (o *GetContactsObservableForbidden) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetContactsObservableForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetContactsObservableNotFound creates a GetContactsObservableNotFound with default headers values +func NewGetContactsObservableNotFound() *GetContactsObservableNotFound { + return &GetContactsObservableNotFound{} +} + +/*GetContactsObservableNotFound handles this case with default header values. + +Resource was not found +*/ +type GetContactsObservableNotFound struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetContactsObservableNotFound) Error() string { + return fmt.Sprintf("[GET /contacts/observable][%d] getContactsObservableNotFound %+v", 404, o.Payload) +} + +func (o *GetContactsObservableNotFound) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetContactsObservableNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetContactsObservableUnprocessableEntity creates a GetContactsObservableUnprocessableEntity with default headers values +func NewGetContactsObservableUnprocessableEntity() *GetContactsObservableUnprocessableEntity { + return &GetContactsObservableUnprocessableEntity{} +} + +/*GetContactsObservableUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetContactsObservableUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetContactsObservableUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /contacts/observable][%d] getContactsObservableUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetContactsObservableUnprocessableEntity) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetContactsObservableUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetContactsObservableInternalServerError creates a GetContactsObservableInternalServerError with default headers values +func NewGetContactsObservableInternalServerError() *GetContactsObservableInternalServerError { + return &GetContactsObservableInternalServerError{} +} + +/*GetContactsObservableInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetContactsObservableInternalServerError struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetContactsObservableInternalServerError) Error() string { + return fmt.Sprintf("[GET /contacts/observable][%d] getContactsObservableInternalServerError %+v", 500, o.Payload) +} + +func (o *GetContactsObservableInternalServerError) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetContactsObservableInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/crm/v0.0.1/crm_client/contacts/get_contacts_parameters.go b/api/crm/v0.0.1/crm_client/contacts/get_contacts_parameters.go new file mode 100644 index 0000000..9d71a07 --- /dev/null +++ b/api/crm/v0.0.1/crm_client/contacts/get_contacts_parameters.go @@ -0,0 +1,311 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package contacts + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetContactsParams creates a new GetContactsParams object +// with the default values initialized. +func NewGetContactsParams() *GetContactsParams { + var () + return &GetContactsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetContactsParamsWithTimeout creates a new GetContactsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetContactsParamsWithTimeout(timeout time.Duration) *GetContactsParams { + var () + return &GetContactsParams{ + + timeout: timeout, + } +} + +// NewGetContactsParamsWithContext creates a new GetContactsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetContactsParamsWithContext(ctx context.Context) *GetContactsParams { + var () + return &GetContactsParams{ + + Context: ctx, + } +} + +// NewGetContactsParamsWithHTTPClient creates a new GetContactsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetContactsParamsWithHTTPClient(client *http.Client) *GetContactsParams { + var () + return &GetContactsParams{ + HTTPClient: client, + } +} + +/*GetContactsParams contains all the parameters to send to the API endpoint +for the get contacts operation typically these are written to a http.Request +*/ +type GetContactsParams struct { + + /*Active + Only retrieve active records? + + */ + Active *bool + /*ContactID + Taxnexus Contact record ID + + */ + ContactID *string + /*Email + Email address used for identity lookup + + */ + Email *string + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Name + The Name of this Object + + */ + Name *string + /*Offset + How many objects to skip? + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get contacts params +func (o *GetContactsParams) WithTimeout(timeout time.Duration) *GetContactsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get contacts params +func (o *GetContactsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get contacts params +func (o *GetContactsParams) WithContext(ctx context.Context) *GetContactsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get contacts params +func (o *GetContactsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get contacts params +func (o *GetContactsParams) WithHTTPClient(client *http.Client) *GetContactsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get contacts params +func (o *GetContactsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithActive adds the active to the get contacts params +func (o *GetContactsParams) WithActive(active *bool) *GetContactsParams { + o.SetActive(active) + return o +} + +// SetActive adds the active to the get contacts params +func (o *GetContactsParams) SetActive(active *bool) { + o.Active = active +} + +// WithContactID adds the contactID to the get contacts params +func (o *GetContactsParams) WithContactID(contactID *string) *GetContactsParams { + o.SetContactID(contactID) + return o +} + +// SetContactID adds the contactId to the get contacts params +func (o *GetContactsParams) SetContactID(contactID *string) { + o.ContactID = contactID +} + +// WithEmail adds the email to the get contacts params +func (o *GetContactsParams) WithEmail(email *string) *GetContactsParams { + o.SetEmail(email) + return o +} + +// SetEmail adds the email to the get contacts params +func (o *GetContactsParams) SetEmail(email *string) { + o.Email = email +} + +// WithLimit adds the limit to the get contacts params +func (o *GetContactsParams) WithLimit(limit *int64) *GetContactsParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get contacts params +func (o *GetContactsParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithName adds the name to the get contacts params +func (o *GetContactsParams) WithName(name *string) *GetContactsParams { + o.SetName(name) + return o +} + +// SetName adds the name to the get contacts params +func (o *GetContactsParams) SetName(name *string) { + o.Name = name +} + +// WithOffset adds the offset to the get contacts params +func (o *GetContactsParams) WithOffset(offset *int64) *GetContactsParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get contacts params +func (o *GetContactsParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *GetContactsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Active != nil { + + // query param active + var qrActive bool + if o.Active != nil { + qrActive = *o.Active + } + qActive := swag.FormatBool(qrActive) + if qActive != "" { + if err := r.SetQueryParam("active", qActive); err != nil { + return err + } + } + + } + + if o.ContactID != nil { + + // query param contactId + var qrContactID string + if o.ContactID != nil { + qrContactID = *o.ContactID + } + qContactID := qrContactID + if qContactID != "" { + if err := r.SetQueryParam("contactId", qContactID); err != nil { + return err + } + } + + } + + if o.Email != nil { + + // query param email + var qrEmail string + if o.Email != nil { + qrEmail = *o.Email + } + qEmail := qrEmail + if qEmail != "" { + if err := r.SetQueryParam("email", qEmail); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Name != nil { + + // query param name + var qrName string + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/crm/v0.0.1/crm_client/contacts/get_contacts_responses.go b/api/crm/v0.0.1/crm_client/contacts/get_contacts_responses.go new file mode 100644 index 0000000..7c74ab2 --- /dev/null +++ b/api/crm/v0.0.1/crm_client/contacts/get_contacts_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package contacts + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/crm/crm_models" +) + +// GetContactsReader is a Reader for the GetContacts structure. +type GetContactsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetContactsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetContactsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetContactsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetContactsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetContactsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetContactsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetContactsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetContactsOK creates a GetContactsOK with default headers values +func NewGetContactsOK() *GetContactsOK { + return &GetContactsOK{} +} + +/*GetContactsOK handles this case with default header values. + +Taxnexus Response with an array of Contact objects +*/ +type GetContactsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *crm_models.ContactResponse +} + +func (o *GetContactsOK) Error() string { + return fmt.Sprintf("[GET /contacts][%d] getContactsOK %+v", 200, o.Payload) +} + +func (o *GetContactsOK) GetPayload() *crm_models.ContactResponse { + return o.Payload +} + +func (o *GetContactsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(crm_models.ContactResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetContactsUnauthorized creates a GetContactsUnauthorized with default headers values +func NewGetContactsUnauthorized() *GetContactsUnauthorized { + return &GetContactsUnauthorized{} +} + +/*GetContactsUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetContactsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetContactsUnauthorized) Error() string { + return fmt.Sprintf("[GET /contacts][%d] getContactsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetContactsUnauthorized) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetContactsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetContactsForbidden creates a GetContactsForbidden with default headers values +func NewGetContactsForbidden() *GetContactsForbidden { + return &GetContactsForbidden{} +} + +/*GetContactsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetContactsForbidden struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetContactsForbidden) Error() string { + return fmt.Sprintf("[GET /contacts][%d] getContactsForbidden %+v", 403, o.Payload) +} + +func (o *GetContactsForbidden) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetContactsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetContactsNotFound creates a GetContactsNotFound with default headers values +func NewGetContactsNotFound() *GetContactsNotFound { + return &GetContactsNotFound{} +} + +/*GetContactsNotFound handles this case with default header values. + +Resource was not found +*/ +type GetContactsNotFound struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetContactsNotFound) Error() string { + return fmt.Sprintf("[GET /contacts][%d] getContactsNotFound %+v", 404, o.Payload) +} + +func (o *GetContactsNotFound) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetContactsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetContactsUnprocessableEntity creates a GetContactsUnprocessableEntity with default headers values +func NewGetContactsUnprocessableEntity() *GetContactsUnprocessableEntity { + return &GetContactsUnprocessableEntity{} +} + +/*GetContactsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetContactsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetContactsUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /contacts][%d] getContactsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetContactsUnprocessableEntity) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetContactsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetContactsInternalServerError creates a GetContactsInternalServerError with default headers values +func NewGetContactsInternalServerError() *GetContactsInternalServerError { + return &GetContactsInternalServerError{} +} + +/*GetContactsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetContactsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetContactsInternalServerError) Error() string { + return fmt.Sprintf("[GET /contacts][%d] getContactsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetContactsInternalServerError) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetContactsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/crm/v0.0.1/crm_client/contacts/post_contacts_parameters.go b/api/crm/v0.0.1/crm_client/contacts/post_contacts_parameters.go new file mode 100644 index 0000000..4648854 --- /dev/null +++ b/api/crm/v0.0.1/crm_client/contacts/post_contacts_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package contacts + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/crm/crm_models" +) + +// NewPostContactsParams creates a new PostContactsParams object +// with the default values initialized. +func NewPostContactsParams() *PostContactsParams { + var () + return &PostContactsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostContactsParamsWithTimeout creates a new PostContactsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostContactsParamsWithTimeout(timeout time.Duration) *PostContactsParams { + var () + return &PostContactsParams{ + + timeout: timeout, + } +} + +// NewPostContactsParamsWithContext creates a new PostContactsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostContactsParamsWithContext(ctx context.Context) *PostContactsParams { + var () + return &PostContactsParams{ + + Context: ctx, + } +} + +// NewPostContactsParamsWithHTTPClient creates a new PostContactsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostContactsParamsWithHTTPClient(client *http.Client) *PostContactsParams { + var () + return &PostContactsParams{ + HTTPClient: client, + } +} + +/*PostContactsParams contains all the parameters to send to the API endpoint +for the post contacts operation typically these are written to a http.Request +*/ +type PostContactsParams struct { + + /*ContactsRequest + An array of new Contact records + + */ + ContactsRequest *crm_models.ContactRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post contacts params +func (o *PostContactsParams) WithTimeout(timeout time.Duration) *PostContactsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post contacts params +func (o *PostContactsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post contacts params +func (o *PostContactsParams) WithContext(ctx context.Context) *PostContactsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post contacts params +func (o *PostContactsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post contacts params +func (o *PostContactsParams) WithHTTPClient(client *http.Client) *PostContactsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post contacts params +func (o *PostContactsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithContactsRequest adds the contactsRequest to the post contacts params +func (o *PostContactsParams) WithContactsRequest(contactsRequest *crm_models.ContactRequest) *PostContactsParams { + o.SetContactsRequest(contactsRequest) + return o +} + +// SetContactsRequest adds the contactsRequest to the post contacts params +func (o *PostContactsParams) SetContactsRequest(contactsRequest *crm_models.ContactRequest) { + o.ContactsRequest = contactsRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostContactsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ContactsRequest != nil { + if err := r.SetBodyParam(o.ContactsRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/crm/v0.0.1/crm_client/contacts/post_contacts_responses.go b/api/crm/v0.0.1/crm_client/contacts/post_contacts_responses.go new file mode 100644 index 0000000..6b7577b --- /dev/null +++ b/api/crm/v0.0.1/crm_client/contacts/post_contacts_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package contacts + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/crm/crm_models" +) + +// PostContactsReader is a Reader for the PostContacts structure. +type PostContactsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostContactsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostContactsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostContactsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostContactsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostContactsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostContactsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostContactsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostContactsOK creates a PostContactsOK with default headers values +func NewPostContactsOK() *PostContactsOK { + return &PostContactsOK{} +} + +/*PostContactsOK handles this case with default header values. + +Taxnexus Response with an array of Contact objects +*/ +type PostContactsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *crm_models.ContactResponse +} + +func (o *PostContactsOK) Error() string { + return fmt.Sprintf("[POST /contacts][%d] postContactsOK %+v", 200, o.Payload) +} + +func (o *PostContactsOK) GetPayload() *crm_models.ContactResponse { + return o.Payload +} + +func (o *PostContactsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(crm_models.ContactResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostContactsUnauthorized creates a PostContactsUnauthorized with default headers values +func NewPostContactsUnauthorized() *PostContactsUnauthorized { + return &PostContactsUnauthorized{} +} + +/*PostContactsUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PostContactsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PostContactsUnauthorized) Error() string { + return fmt.Sprintf("[POST /contacts][%d] postContactsUnauthorized %+v", 401, o.Payload) +} + +func (o *PostContactsUnauthorized) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PostContactsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostContactsForbidden creates a PostContactsForbidden with default headers values +func NewPostContactsForbidden() *PostContactsForbidden { + return &PostContactsForbidden{} +} + +/*PostContactsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostContactsForbidden struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PostContactsForbidden) Error() string { + return fmt.Sprintf("[POST /contacts][%d] postContactsForbidden %+v", 403, o.Payload) +} + +func (o *PostContactsForbidden) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PostContactsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostContactsNotFound creates a PostContactsNotFound with default headers values +func NewPostContactsNotFound() *PostContactsNotFound { + return &PostContactsNotFound{} +} + +/*PostContactsNotFound handles this case with default header values. + +Resource was not found +*/ +type PostContactsNotFound struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PostContactsNotFound) Error() string { + return fmt.Sprintf("[POST /contacts][%d] postContactsNotFound %+v", 404, o.Payload) +} + +func (o *PostContactsNotFound) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PostContactsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostContactsUnprocessableEntity creates a PostContactsUnprocessableEntity with default headers values +func NewPostContactsUnprocessableEntity() *PostContactsUnprocessableEntity { + return &PostContactsUnprocessableEntity{} +} + +/*PostContactsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostContactsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PostContactsUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /contacts][%d] postContactsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostContactsUnprocessableEntity) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PostContactsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostContactsInternalServerError creates a PostContactsInternalServerError with default headers values +func NewPostContactsInternalServerError() *PostContactsInternalServerError { + return &PostContactsInternalServerError{} +} + +/*PostContactsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostContactsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PostContactsInternalServerError) Error() string { + return fmt.Sprintf("[POST /contacts][%d] postContactsInternalServerError %+v", 500, o.Payload) +} + +func (o *PostContactsInternalServerError) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PostContactsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/crm/v0.0.1/crm_client/contacts/put_contacts_parameters.go b/api/crm/v0.0.1/crm_client/contacts/put_contacts_parameters.go new file mode 100644 index 0000000..6b39eb6 --- /dev/null +++ b/api/crm/v0.0.1/crm_client/contacts/put_contacts_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package contacts + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/crm/crm_models" +) + +// NewPutContactsParams creates a new PutContactsParams object +// with the default values initialized. +func NewPutContactsParams() *PutContactsParams { + var () + return &PutContactsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPutContactsParamsWithTimeout creates a new PutContactsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPutContactsParamsWithTimeout(timeout time.Duration) *PutContactsParams { + var () + return &PutContactsParams{ + + timeout: timeout, + } +} + +// NewPutContactsParamsWithContext creates a new PutContactsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPutContactsParamsWithContext(ctx context.Context) *PutContactsParams { + var () + return &PutContactsParams{ + + Context: ctx, + } +} + +// NewPutContactsParamsWithHTTPClient creates a new PutContactsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPutContactsParamsWithHTTPClient(client *http.Client) *PutContactsParams { + var () + return &PutContactsParams{ + HTTPClient: client, + } +} + +/*PutContactsParams contains all the parameters to send to the API endpoint +for the put contacts operation typically these are written to a http.Request +*/ +type PutContactsParams struct { + + /*ContactsRequest + An array of new Contact records + + */ + ContactsRequest *crm_models.ContactRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the put contacts params +func (o *PutContactsParams) WithTimeout(timeout time.Duration) *PutContactsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the put contacts params +func (o *PutContactsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the put contacts params +func (o *PutContactsParams) WithContext(ctx context.Context) *PutContactsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the put contacts params +func (o *PutContactsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the put contacts params +func (o *PutContactsParams) WithHTTPClient(client *http.Client) *PutContactsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the put contacts params +func (o *PutContactsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithContactsRequest adds the contactsRequest to the put contacts params +func (o *PutContactsParams) WithContactsRequest(contactsRequest *crm_models.ContactRequest) *PutContactsParams { + o.SetContactsRequest(contactsRequest) + return o +} + +// SetContactsRequest adds the contactsRequest to the put contacts params +func (o *PutContactsParams) SetContactsRequest(contactsRequest *crm_models.ContactRequest) { + o.ContactsRequest = contactsRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PutContactsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ContactsRequest != nil { + if err := r.SetBodyParam(o.ContactsRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/crm/v0.0.1/crm_client/contacts/put_contacts_responses.go b/api/crm/v0.0.1/crm_client/contacts/put_contacts_responses.go new file mode 100644 index 0000000..e6cce67 --- /dev/null +++ b/api/crm/v0.0.1/crm_client/contacts/put_contacts_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package contacts + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/crm/crm_models" +) + +// PutContactsReader is a Reader for the PutContacts structure. +type PutContactsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PutContactsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPutContactsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPutContactsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPutContactsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPutContactsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPutContactsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPutContactsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPutContactsOK creates a PutContactsOK with default headers values +func NewPutContactsOK() *PutContactsOK { + return &PutContactsOK{} +} + +/*PutContactsOK handles this case with default header values. + +Taxnexus Response with an array of Contact objects +*/ +type PutContactsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *crm_models.ContactResponse +} + +func (o *PutContactsOK) Error() string { + return fmt.Sprintf("[PUT /contacts][%d] putContactsOK %+v", 200, o.Payload) +} + +func (o *PutContactsOK) GetPayload() *crm_models.ContactResponse { + return o.Payload +} + +func (o *PutContactsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(crm_models.ContactResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutContactsUnauthorized creates a PutContactsUnauthorized with default headers values +func NewPutContactsUnauthorized() *PutContactsUnauthorized { + return &PutContactsUnauthorized{} +} + +/*PutContactsUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PutContactsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PutContactsUnauthorized) Error() string { + return fmt.Sprintf("[PUT /contacts][%d] putContactsUnauthorized %+v", 401, o.Payload) +} + +func (o *PutContactsUnauthorized) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PutContactsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutContactsForbidden creates a PutContactsForbidden with default headers values +func NewPutContactsForbidden() *PutContactsForbidden { + return &PutContactsForbidden{} +} + +/*PutContactsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PutContactsForbidden struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PutContactsForbidden) Error() string { + return fmt.Sprintf("[PUT /contacts][%d] putContactsForbidden %+v", 403, o.Payload) +} + +func (o *PutContactsForbidden) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PutContactsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutContactsNotFound creates a PutContactsNotFound with default headers values +func NewPutContactsNotFound() *PutContactsNotFound { + return &PutContactsNotFound{} +} + +/*PutContactsNotFound handles this case with default header values. + +Resource was not found +*/ +type PutContactsNotFound struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PutContactsNotFound) Error() string { + return fmt.Sprintf("[PUT /contacts][%d] putContactsNotFound %+v", 404, o.Payload) +} + +func (o *PutContactsNotFound) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PutContactsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutContactsUnprocessableEntity creates a PutContactsUnprocessableEntity with default headers values +func NewPutContactsUnprocessableEntity() *PutContactsUnprocessableEntity { + return &PutContactsUnprocessableEntity{} +} + +/*PutContactsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PutContactsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PutContactsUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /contacts][%d] putContactsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutContactsUnprocessableEntity) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PutContactsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutContactsInternalServerError creates a PutContactsInternalServerError with default headers values +func NewPutContactsInternalServerError() *PutContactsInternalServerError { + return &PutContactsInternalServerError{} +} + +/*PutContactsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PutContactsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PutContactsInternalServerError) Error() string { + return fmt.Sprintf("[PUT /contacts][%d] putContactsInternalServerError %+v", 500, o.Payload) +} + +func (o *PutContactsInternalServerError) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PutContactsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/crm/v0.0.1/crm_client/cors/account_options_observable_parameters.go b/api/crm/v0.0.1/crm_client/cors/account_options_observable_parameters.go new file mode 100644 index 0000000..e442184 --- /dev/null +++ b/api/crm/v0.0.1/crm_client/cors/account_options_observable_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewAccountOptionsObservableParams creates a new AccountOptionsObservableParams object +// with the default values initialized. +func NewAccountOptionsObservableParams() *AccountOptionsObservableParams { + + return &AccountOptionsObservableParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewAccountOptionsObservableParamsWithTimeout creates a new AccountOptionsObservableParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewAccountOptionsObservableParamsWithTimeout(timeout time.Duration) *AccountOptionsObservableParams { + + return &AccountOptionsObservableParams{ + + timeout: timeout, + } +} + +// NewAccountOptionsObservableParamsWithContext creates a new AccountOptionsObservableParams object +// with the default values initialized, and the ability to set a context for a request +func NewAccountOptionsObservableParamsWithContext(ctx context.Context) *AccountOptionsObservableParams { + + return &AccountOptionsObservableParams{ + + Context: ctx, + } +} + +// NewAccountOptionsObservableParamsWithHTTPClient creates a new AccountOptionsObservableParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewAccountOptionsObservableParamsWithHTTPClient(client *http.Client) *AccountOptionsObservableParams { + + return &AccountOptionsObservableParams{ + HTTPClient: client, + } +} + +/*AccountOptionsObservableParams contains all the parameters to send to the API endpoint +for the account options observable operation typically these are written to a http.Request +*/ +type AccountOptionsObservableParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the account options observable params +func (o *AccountOptionsObservableParams) WithTimeout(timeout time.Duration) *AccountOptionsObservableParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the account options observable params +func (o *AccountOptionsObservableParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the account options observable params +func (o *AccountOptionsObservableParams) WithContext(ctx context.Context) *AccountOptionsObservableParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the account options observable params +func (o *AccountOptionsObservableParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the account options observable params +func (o *AccountOptionsObservableParams) WithHTTPClient(client *http.Client) *AccountOptionsObservableParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the account options observable params +func (o *AccountOptionsObservableParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *AccountOptionsObservableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/crm/v0.0.1/crm_client/cors/account_options_observable_responses.go b/api/crm/v0.0.1/crm_client/cors/account_options_observable_responses.go new file mode 100644 index 0000000..4319591 --- /dev/null +++ b/api/crm/v0.0.1/crm_client/cors/account_options_observable_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// AccountOptionsObservableReader is a Reader for the AccountOptionsObservable structure. +type AccountOptionsObservableReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *AccountOptionsObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewAccountOptionsObservableOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewAccountOptionsObservableOK creates a AccountOptionsObservableOK with default headers values +func NewAccountOptionsObservableOK() *AccountOptionsObservableOK { + return &AccountOptionsObservableOK{} +} + +/*AccountOptionsObservableOK handles this case with default header values. + +CORS OPTIONS response +*/ +type AccountOptionsObservableOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *AccountOptionsObservableOK) Error() string { + return fmt.Sprintf("[OPTIONS /accounts/observable][%d] accountOptionsObservableOK ", 200) +} + +func (o *AccountOptionsObservableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/crm/v0.0.1/crm_client/cors/account_options_parameters.go b/api/crm/v0.0.1/crm_client/cors/account_options_parameters.go new file mode 100644 index 0000000..6f6c9df --- /dev/null +++ b/api/crm/v0.0.1/crm_client/cors/account_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewAccountOptionsParams creates a new AccountOptionsParams object +// with the default values initialized. +func NewAccountOptionsParams() *AccountOptionsParams { + + return &AccountOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewAccountOptionsParamsWithTimeout creates a new AccountOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewAccountOptionsParamsWithTimeout(timeout time.Duration) *AccountOptionsParams { + + return &AccountOptionsParams{ + + timeout: timeout, + } +} + +// NewAccountOptionsParamsWithContext creates a new AccountOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewAccountOptionsParamsWithContext(ctx context.Context) *AccountOptionsParams { + + return &AccountOptionsParams{ + + Context: ctx, + } +} + +// NewAccountOptionsParamsWithHTTPClient creates a new AccountOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewAccountOptionsParamsWithHTTPClient(client *http.Client) *AccountOptionsParams { + + return &AccountOptionsParams{ + HTTPClient: client, + } +} + +/*AccountOptionsParams contains all the parameters to send to the API endpoint +for the account options operation typically these are written to a http.Request +*/ +type AccountOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the account options params +func (o *AccountOptionsParams) WithTimeout(timeout time.Duration) *AccountOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the account options params +func (o *AccountOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the account options params +func (o *AccountOptionsParams) WithContext(ctx context.Context) *AccountOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the account options params +func (o *AccountOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the account options params +func (o *AccountOptionsParams) WithHTTPClient(client *http.Client) *AccountOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the account options params +func (o *AccountOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *AccountOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/crm/v0.0.1/crm_client/cors/account_options_responses.go b/api/crm/v0.0.1/crm_client/cors/account_options_responses.go new file mode 100644 index 0000000..8bfabd3 --- /dev/null +++ b/api/crm/v0.0.1/crm_client/cors/account_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// AccountOptionsReader is a Reader for the AccountOptions structure. +type AccountOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *AccountOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewAccountOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewAccountOptionsOK creates a AccountOptionsOK with default headers values +func NewAccountOptionsOK() *AccountOptionsOK { + return &AccountOptionsOK{} +} + +/*AccountOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type AccountOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *AccountOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /accounts][%d] accountOptionsOK ", 200) +} + +func (o *AccountOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/crm/v0.0.1/crm_client/cors/company_observable_options_parameters.go b/api/crm/v0.0.1/crm_client/cors/company_observable_options_parameters.go new file mode 100644 index 0000000..1984960 --- /dev/null +++ b/api/crm/v0.0.1/crm_client/cors/company_observable_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewCompanyObservableOptionsParams creates a new CompanyObservableOptionsParams object +// with the default values initialized. +func NewCompanyObservableOptionsParams() *CompanyObservableOptionsParams { + + return &CompanyObservableOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCompanyObservableOptionsParamsWithTimeout creates a new CompanyObservableOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCompanyObservableOptionsParamsWithTimeout(timeout time.Duration) *CompanyObservableOptionsParams { + + return &CompanyObservableOptionsParams{ + + timeout: timeout, + } +} + +// NewCompanyObservableOptionsParamsWithContext creates a new CompanyObservableOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewCompanyObservableOptionsParamsWithContext(ctx context.Context) *CompanyObservableOptionsParams { + + return &CompanyObservableOptionsParams{ + + Context: ctx, + } +} + +// NewCompanyObservableOptionsParamsWithHTTPClient creates a new CompanyObservableOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCompanyObservableOptionsParamsWithHTTPClient(client *http.Client) *CompanyObservableOptionsParams { + + return &CompanyObservableOptionsParams{ + HTTPClient: client, + } +} + +/*CompanyObservableOptionsParams contains all the parameters to send to the API endpoint +for the company observable options operation typically these are written to a http.Request +*/ +type CompanyObservableOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the company observable options params +func (o *CompanyObservableOptionsParams) WithTimeout(timeout time.Duration) *CompanyObservableOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the company observable options params +func (o *CompanyObservableOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the company observable options params +func (o *CompanyObservableOptionsParams) WithContext(ctx context.Context) *CompanyObservableOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the company observable options params +func (o *CompanyObservableOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the company observable options params +func (o *CompanyObservableOptionsParams) WithHTTPClient(client *http.Client) *CompanyObservableOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the company observable options params +func (o *CompanyObservableOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CompanyObservableOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/crm/v0.0.1/crm_client/cors/company_observable_options_responses.go b/api/crm/v0.0.1/crm_client/cors/company_observable_options_responses.go new file mode 100644 index 0000000..dea5eae --- /dev/null +++ b/api/crm/v0.0.1/crm_client/cors/company_observable_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// CompanyObservableOptionsReader is a Reader for the CompanyObservableOptions structure. +type CompanyObservableOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CompanyObservableOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCompanyObservableOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewCompanyObservableOptionsOK creates a CompanyObservableOptionsOK with default headers values +func NewCompanyObservableOptionsOK() *CompanyObservableOptionsOK { + return &CompanyObservableOptionsOK{} +} + +/*CompanyObservableOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type CompanyObservableOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *CompanyObservableOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /companies/observable][%d] companyObservableOptionsOK ", 200) +} + +func (o *CompanyObservableOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/crm/v0.0.1/crm_client/cors/company_options_parameters.go b/api/crm/v0.0.1/crm_client/cors/company_options_parameters.go new file mode 100644 index 0000000..51f6a63 --- /dev/null +++ b/api/crm/v0.0.1/crm_client/cors/company_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewCompanyOptionsParams creates a new CompanyOptionsParams object +// with the default values initialized. +func NewCompanyOptionsParams() *CompanyOptionsParams { + + return &CompanyOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCompanyOptionsParamsWithTimeout creates a new CompanyOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCompanyOptionsParamsWithTimeout(timeout time.Duration) *CompanyOptionsParams { + + return &CompanyOptionsParams{ + + timeout: timeout, + } +} + +// NewCompanyOptionsParamsWithContext creates a new CompanyOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewCompanyOptionsParamsWithContext(ctx context.Context) *CompanyOptionsParams { + + return &CompanyOptionsParams{ + + Context: ctx, + } +} + +// NewCompanyOptionsParamsWithHTTPClient creates a new CompanyOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCompanyOptionsParamsWithHTTPClient(client *http.Client) *CompanyOptionsParams { + + return &CompanyOptionsParams{ + HTTPClient: client, + } +} + +/*CompanyOptionsParams contains all the parameters to send to the API endpoint +for the company options operation typically these are written to a http.Request +*/ +type CompanyOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the company options params +func (o *CompanyOptionsParams) WithTimeout(timeout time.Duration) *CompanyOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the company options params +func (o *CompanyOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the company options params +func (o *CompanyOptionsParams) WithContext(ctx context.Context) *CompanyOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the company options params +func (o *CompanyOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the company options params +func (o *CompanyOptionsParams) WithHTTPClient(client *http.Client) *CompanyOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the company options params +func (o *CompanyOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CompanyOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/crm/v0.0.1/crm_client/cors/company_options_responses.go b/api/crm/v0.0.1/crm_client/cors/company_options_responses.go new file mode 100644 index 0000000..2b8d7b0 --- /dev/null +++ b/api/crm/v0.0.1/crm_client/cors/company_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// CompanyOptionsReader is a Reader for the CompanyOptions structure. +type CompanyOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CompanyOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCompanyOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewCompanyOptionsOK creates a CompanyOptionsOK with default headers values +func NewCompanyOptionsOK() *CompanyOptionsOK { + return &CompanyOptionsOK{} +} + +/*CompanyOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type CompanyOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *CompanyOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /companies][%d] companyOptionsOK ", 200) +} + +func (o *CompanyOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/crm/v0.0.1/crm_client/cors/contact_options_observable_parameters.go b/api/crm/v0.0.1/crm_client/cors/contact_options_observable_parameters.go new file mode 100644 index 0000000..5d350ec --- /dev/null +++ b/api/crm/v0.0.1/crm_client/cors/contact_options_observable_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewContactOptionsObservableParams creates a new ContactOptionsObservableParams object +// with the default values initialized. +func NewContactOptionsObservableParams() *ContactOptionsObservableParams { + + return &ContactOptionsObservableParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewContactOptionsObservableParamsWithTimeout creates a new ContactOptionsObservableParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewContactOptionsObservableParamsWithTimeout(timeout time.Duration) *ContactOptionsObservableParams { + + return &ContactOptionsObservableParams{ + + timeout: timeout, + } +} + +// NewContactOptionsObservableParamsWithContext creates a new ContactOptionsObservableParams object +// with the default values initialized, and the ability to set a context for a request +func NewContactOptionsObservableParamsWithContext(ctx context.Context) *ContactOptionsObservableParams { + + return &ContactOptionsObservableParams{ + + Context: ctx, + } +} + +// NewContactOptionsObservableParamsWithHTTPClient creates a new ContactOptionsObservableParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewContactOptionsObservableParamsWithHTTPClient(client *http.Client) *ContactOptionsObservableParams { + + return &ContactOptionsObservableParams{ + HTTPClient: client, + } +} + +/*ContactOptionsObservableParams contains all the parameters to send to the API endpoint +for the contact options observable operation typically these are written to a http.Request +*/ +type ContactOptionsObservableParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the contact options observable params +func (o *ContactOptionsObservableParams) WithTimeout(timeout time.Duration) *ContactOptionsObservableParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the contact options observable params +func (o *ContactOptionsObservableParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the contact options observable params +func (o *ContactOptionsObservableParams) WithContext(ctx context.Context) *ContactOptionsObservableParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the contact options observable params +func (o *ContactOptionsObservableParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the contact options observable params +func (o *ContactOptionsObservableParams) WithHTTPClient(client *http.Client) *ContactOptionsObservableParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the contact options observable params +func (o *ContactOptionsObservableParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ContactOptionsObservableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/crm/v0.0.1/crm_client/cors/contact_options_observable_responses.go b/api/crm/v0.0.1/crm_client/cors/contact_options_observable_responses.go new file mode 100644 index 0000000..95d5386 --- /dev/null +++ b/api/crm/v0.0.1/crm_client/cors/contact_options_observable_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// ContactOptionsObservableReader is a Reader for the ContactOptionsObservable structure. +type ContactOptionsObservableReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ContactOptionsObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewContactOptionsObservableOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewContactOptionsObservableOK creates a ContactOptionsObservableOK with default headers values +func NewContactOptionsObservableOK() *ContactOptionsObservableOK { + return &ContactOptionsObservableOK{} +} + +/*ContactOptionsObservableOK handles this case with default header values. + +CORS OPTIONS response +*/ +type ContactOptionsObservableOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *ContactOptionsObservableOK) Error() string { + return fmt.Sprintf("[OPTIONS /contacts/observable][%d] contactOptionsObservableOK ", 200) +} + +func (o *ContactOptionsObservableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/crm/v0.0.1/crm_client/cors/contact_options_parameters.go b/api/crm/v0.0.1/crm_client/cors/contact_options_parameters.go new file mode 100644 index 0000000..b07e0cd --- /dev/null +++ b/api/crm/v0.0.1/crm_client/cors/contact_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewContactOptionsParams creates a new ContactOptionsParams object +// with the default values initialized. +func NewContactOptionsParams() *ContactOptionsParams { + + return &ContactOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewContactOptionsParamsWithTimeout creates a new ContactOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewContactOptionsParamsWithTimeout(timeout time.Duration) *ContactOptionsParams { + + return &ContactOptionsParams{ + + timeout: timeout, + } +} + +// NewContactOptionsParamsWithContext creates a new ContactOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewContactOptionsParamsWithContext(ctx context.Context) *ContactOptionsParams { + + return &ContactOptionsParams{ + + Context: ctx, + } +} + +// NewContactOptionsParamsWithHTTPClient creates a new ContactOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewContactOptionsParamsWithHTTPClient(client *http.Client) *ContactOptionsParams { + + return &ContactOptionsParams{ + HTTPClient: client, + } +} + +/*ContactOptionsParams contains all the parameters to send to the API endpoint +for the contact options operation typically these are written to a http.Request +*/ +type ContactOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the contact options params +func (o *ContactOptionsParams) WithTimeout(timeout time.Duration) *ContactOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the contact options params +func (o *ContactOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the contact options params +func (o *ContactOptionsParams) WithContext(ctx context.Context) *ContactOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the contact options params +func (o *ContactOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the contact options params +func (o *ContactOptionsParams) WithHTTPClient(client *http.Client) *ContactOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the contact options params +func (o *ContactOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ContactOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/crm/v0.0.1/crm_client/cors/contact_options_responses.go b/api/crm/v0.0.1/crm_client/cors/contact_options_responses.go new file mode 100644 index 0000000..7d5ab7a --- /dev/null +++ b/api/crm/v0.0.1/crm_client/cors/contact_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// ContactOptionsReader is a Reader for the ContactOptions structure. +type ContactOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ContactOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewContactOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewContactOptionsOK creates a ContactOptionsOK with default headers values +func NewContactOptionsOK() *ContactOptionsOK { + return &ContactOptionsOK{} +} + +/*ContactOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type ContactOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *ContactOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /contacts][%d] contactOptionsOK ", 200) +} + +func (o *ContactOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/crm/v0.0.1/crm_client/cors/cors_client.go b/api/crm/v0.0.1/crm_client/cors/cors_client.go new file mode 100644 index 0000000..3f0d998 --- /dev/null +++ b/api/crm/v0.0.1/crm_client/cors/cors_client.go @@ -0,0 +1,328 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new cors API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for cors API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + AccountOptions(params *AccountOptionsParams) (*AccountOptionsOK, error) + + AccountOptionsObservable(params *AccountOptionsObservableParams) (*AccountOptionsObservableOK, error) + + CompanyObservableOptions(params *CompanyObservableOptionsParams) (*CompanyObservableOptionsOK, error) + + CompanyOptions(params *CompanyOptionsParams) (*CompanyOptionsOK, error) + + ContactOptions(params *ContactOptionsParams) (*ContactOptionsOK, error) + + ContactOptionsObservable(params *ContactOptionsObservableParams) (*ContactOptionsObservableOK, error) + + LeadOptions(params *LeadOptionsParams) (*LeadOptionsOK, error) + + LeadOptionsObservable(params *LeadOptionsObservableParams) (*LeadOptionsObservableOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + AccountOptions CORS support +*/ +func (a *Client) AccountOptions(params *AccountOptionsParams) (*AccountOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewAccountOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "accountOptions", + Method: "OPTIONS", + PathPattern: "/accounts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &AccountOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*AccountOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for accountOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + AccountOptionsObservable CORS support +*/ +func (a *Client) AccountOptionsObservable(params *AccountOptionsObservableParams) (*AccountOptionsObservableOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewAccountOptionsObservableParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "accountOptionsObservable", + Method: "OPTIONS", + PathPattern: "/accounts/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &AccountOptionsObservableReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*AccountOptionsObservableOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for accountOptionsObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + CompanyObservableOptions CORS support +*/ +func (a *Client) CompanyObservableOptions(params *CompanyObservableOptionsParams) (*CompanyObservableOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCompanyObservableOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "companyObservableOptions", + Method: "OPTIONS", + PathPattern: "/companies/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CompanyObservableOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CompanyObservableOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for companyObservableOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + CompanyOptions CORS support +*/ +func (a *Client) CompanyOptions(params *CompanyOptionsParams) (*CompanyOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCompanyOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "companyOptions", + Method: "OPTIONS", + PathPattern: "/companies", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CompanyOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CompanyOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for companyOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + ContactOptions CORS support +*/ +func (a *Client) ContactOptions(params *ContactOptionsParams) (*ContactOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewContactOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "contactOptions", + Method: "OPTIONS", + PathPattern: "/contacts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ContactOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ContactOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for contactOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + ContactOptionsObservable CORS support +*/ +func (a *Client) ContactOptionsObservable(params *ContactOptionsObservableParams) (*ContactOptionsObservableOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewContactOptionsObservableParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "contactOptionsObservable", + Method: "OPTIONS", + PathPattern: "/contacts/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ContactOptionsObservableReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ContactOptionsObservableOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for contactOptionsObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + LeadOptions CORS support +*/ +func (a *Client) LeadOptions(params *LeadOptionsParams) (*LeadOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewLeadOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "leadOptions", + Method: "OPTIONS", + PathPattern: "/leads", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &LeadOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*LeadOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for leadOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + LeadOptionsObservable CORS support +*/ +func (a *Client) LeadOptionsObservable(params *LeadOptionsObservableParams) (*LeadOptionsObservableOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewLeadOptionsObservableParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "leadOptionsObservable", + Method: "OPTIONS", + PathPattern: "/leads/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &LeadOptionsObservableReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*LeadOptionsObservableOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for leadOptionsObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/crm/v0.0.1/crm_client/cors/lead_options_observable_parameters.go b/api/crm/v0.0.1/crm_client/cors/lead_options_observable_parameters.go new file mode 100644 index 0000000..562f889 --- /dev/null +++ b/api/crm/v0.0.1/crm_client/cors/lead_options_observable_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewLeadOptionsObservableParams creates a new LeadOptionsObservableParams object +// with the default values initialized. +func NewLeadOptionsObservableParams() *LeadOptionsObservableParams { + + return &LeadOptionsObservableParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewLeadOptionsObservableParamsWithTimeout creates a new LeadOptionsObservableParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewLeadOptionsObservableParamsWithTimeout(timeout time.Duration) *LeadOptionsObservableParams { + + return &LeadOptionsObservableParams{ + + timeout: timeout, + } +} + +// NewLeadOptionsObservableParamsWithContext creates a new LeadOptionsObservableParams object +// with the default values initialized, and the ability to set a context for a request +func NewLeadOptionsObservableParamsWithContext(ctx context.Context) *LeadOptionsObservableParams { + + return &LeadOptionsObservableParams{ + + Context: ctx, + } +} + +// NewLeadOptionsObservableParamsWithHTTPClient creates a new LeadOptionsObservableParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewLeadOptionsObservableParamsWithHTTPClient(client *http.Client) *LeadOptionsObservableParams { + + return &LeadOptionsObservableParams{ + HTTPClient: client, + } +} + +/*LeadOptionsObservableParams contains all the parameters to send to the API endpoint +for the lead options observable operation typically these are written to a http.Request +*/ +type LeadOptionsObservableParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the lead options observable params +func (o *LeadOptionsObservableParams) WithTimeout(timeout time.Duration) *LeadOptionsObservableParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the lead options observable params +func (o *LeadOptionsObservableParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the lead options observable params +func (o *LeadOptionsObservableParams) WithContext(ctx context.Context) *LeadOptionsObservableParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the lead options observable params +func (o *LeadOptionsObservableParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the lead options observable params +func (o *LeadOptionsObservableParams) WithHTTPClient(client *http.Client) *LeadOptionsObservableParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the lead options observable params +func (o *LeadOptionsObservableParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *LeadOptionsObservableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/crm/v0.0.1/crm_client/cors/lead_options_observable_responses.go b/api/crm/v0.0.1/crm_client/cors/lead_options_observable_responses.go new file mode 100644 index 0000000..57f1e5f --- /dev/null +++ b/api/crm/v0.0.1/crm_client/cors/lead_options_observable_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// LeadOptionsObservableReader is a Reader for the LeadOptionsObservable structure. +type LeadOptionsObservableReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *LeadOptionsObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewLeadOptionsObservableOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewLeadOptionsObservableOK creates a LeadOptionsObservableOK with default headers values +func NewLeadOptionsObservableOK() *LeadOptionsObservableOK { + return &LeadOptionsObservableOK{} +} + +/*LeadOptionsObservableOK handles this case with default header values. + +CORS OPTIONS response +*/ +type LeadOptionsObservableOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *LeadOptionsObservableOK) Error() string { + return fmt.Sprintf("[OPTIONS /leads/observable][%d] leadOptionsObservableOK ", 200) +} + +func (o *LeadOptionsObservableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/crm/v0.0.1/crm_client/cors/lead_options_parameters.go b/api/crm/v0.0.1/crm_client/cors/lead_options_parameters.go new file mode 100644 index 0000000..bf2f295 --- /dev/null +++ b/api/crm/v0.0.1/crm_client/cors/lead_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewLeadOptionsParams creates a new LeadOptionsParams object +// with the default values initialized. +func NewLeadOptionsParams() *LeadOptionsParams { + + return &LeadOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewLeadOptionsParamsWithTimeout creates a new LeadOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewLeadOptionsParamsWithTimeout(timeout time.Duration) *LeadOptionsParams { + + return &LeadOptionsParams{ + + timeout: timeout, + } +} + +// NewLeadOptionsParamsWithContext creates a new LeadOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewLeadOptionsParamsWithContext(ctx context.Context) *LeadOptionsParams { + + return &LeadOptionsParams{ + + Context: ctx, + } +} + +// NewLeadOptionsParamsWithHTTPClient creates a new LeadOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewLeadOptionsParamsWithHTTPClient(client *http.Client) *LeadOptionsParams { + + return &LeadOptionsParams{ + HTTPClient: client, + } +} + +/*LeadOptionsParams contains all the parameters to send to the API endpoint +for the lead options operation typically these are written to a http.Request +*/ +type LeadOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the lead options params +func (o *LeadOptionsParams) WithTimeout(timeout time.Duration) *LeadOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the lead options params +func (o *LeadOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the lead options params +func (o *LeadOptionsParams) WithContext(ctx context.Context) *LeadOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the lead options params +func (o *LeadOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the lead options params +func (o *LeadOptionsParams) WithHTTPClient(client *http.Client) *LeadOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the lead options params +func (o *LeadOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *LeadOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/crm/v0.0.1/crm_client/cors/lead_options_responses.go b/api/crm/v0.0.1/crm_client/cors/lead_options_responses.go new file mode 100644 index 0000000..a01a60b --- /dev/null +++ b/api/crm/v0.0.1/crm_client/cors/lead_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// LeadOptionsReader is a Reader for the LeadOptions structure. +type LeadOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *LeadOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewLeadOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewLeadOptionsOK creates a LeadOptionsOK with default headers values +func NewLeadOptionsOK() *LeadOptionsOK { + return &LeadOptionsOK{} +} + +/*LeadOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type LeadOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *LeadOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /leads][%d] leadOptionsOK ", 200) +} + +func (o *LeadOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/crm/v0.0.1/crm_client/crm_client.go b/api/crm/v0.0.1/crm_client/crm_client.go new file mode 100644 index 0000000..445ae53 --- /dev/null +++ b/api/crm/v0.0.1/crm_client/crm_client.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package crm_client + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/crm/crm_client/accounts" + "github.com/taxnexus/lib/api/crm/crm_client/companies" + "github.com/taxnexus/lib/api/crm/crm_client/contacts" + "github.com/taxnexus/lib/api/crm/crm_client/cors" + "github.com/taxnexus/lib/api/crm/crm_client/leads" +) + +// Default crm HTTP client. +var Default = NewHTTPClient(nil) + +const ( + // DefaultHost is the default Host + // found in Meta (info) section of spec file + DefaultHost string = "crm.fabric.tnxs.net:8080" + // DefaultBasePath is the default BasePath + // found in Meta (info) section of spec file + DefaultBasePath string = "/v1" +) + +// DefaultSchemes are the default schemes found in Meta (info) section of spec file +var DefaultSchemes = []string{"http"} + +// NewHTTPClient creates a new crm HTTP client. +func NewHTTPClient(formats strfmt.Registry) *Crm { + return NewHTTPClientWithConfig(formats, nil) +} + +// NewHTTPClientWithConfig creates a new crm HTTP client, +// using a customizable transport config. +func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *Crm { + // ensure nullable parameters have default + if cfg == nil { + cfg = DefaultTransportConfig() + } + + // create transport and client + transport := httptransport.New(cfg.Host, cfg.BasePath, cfg.Schemes) + return New(transport, formats) +} + +// New creates a new crm client +func New(transport runtime.ClientTransport, formats strfmt.Registry) *Crm { + // ensure nullable parameters have default + if formats == nil { + formats = strfmt.Default + } + + cli := new(Crm) + cli.Transport = transport + cli.Accounts = accounts.New(transport, formats) + cli.Companies = companies.New(transport, formats) + cli.Contacts = contacts.New(transport, formats) + cli.Cors = cors.New(transport, formats) + cli.Leads = leads.New(transport, formats) + return cli +} + +// DefaultTransportConfig creates a TransportConfig with the +// default settings taken from the meta section of the spec file. +func DefaultTransportConfig() *TransportConfig { + return &TransportConfig{ + Host: DefaultHost, + BasePath: DefaultBasePath, + Schemes: DefaultSchemes, + } +} + +// TransportConfig contains the transport related info, +// found in the meta section of the spec file. +type TransportConfig struct { + Host string + BasePath string + Schemes []string +} + +// WithHost overrides the default host, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithHost(host string) *TransportConfig { + cfg.Host = host + return cfg +} + +// WithBasePath overrides the default basePath, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithBasePath(basePath string) *TransportConfig { + cfg.BasePath = basePath + return cfg +} + +// WithSchemes overrides the default schemes, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { + cfg.Schemes = schemes + return cfg +} + +// Crm is a client for crm +type Crm struct { + Accounts accounts.ClientService + + Companies companies.ClientService + + Contacts contacts.ClientService + + Cors cors.ClientService + + Leads leads.ClientService + + Transport runtime.ClientTransport +} + +// SetTransport changes the transport on the client and all its subresources +func (c *Crm) SetTransport(transport runtime.ClientTransport) { + c.Transport = transport + c.Accounts.SetTransport(transport) + c.Companies.SetTransport(transport) + c.Contacts.SetTransport(transport) + c.Cors.SetTransport(transport) + c.Leads.SetTransport(transport) +} diff --git a/api/crm/v0.0.1/crm_client/leads/delete_lead_parameters.go b/api/crm/v0.0.1/crm_client/leads/delete_lead_parameters.go new file mode 100644 index 0000000..25e4ce1 --- /dev/null +++ b/api/crm/v0.0.1/crm_client/leads/delete_lead_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package leads + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewDeleteLeadParams creates a new DeleteLeadParams object +// with the default values initialized. +func NewDeleteLeadParams() *DeleteLeadParams { + var () + return &DeleteLeadParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewDeleteLeadParamsWithTimeout creates a new DeleteLeadParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewDeleteLeadParamsWithTimeout(timeout time.Duration) *DeleteLeadParams { + var () + return &DeleteLeadParams{ + + timeout: timeout, + } +} + +// NewDeleteLeadParamsWithContext creates a new DeleteLeadParams object +// with the default values initialized, and the ability to set a context for a request +func NewDeleteLeadParamsWithContext(ctx context.Context) *DeleteLeadParams { + var () + return &DeleteLeadParams{ + + Context: ctx, + } +} + +// NewDeleteLeadParamsWithHTTPClient creates a new DeleteLeadParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewDeleteLeadParamsWithHTTPClient(client *http.Client) *DeleteLeadParams { + var () + return &DeleteLeadParams{ + HTTPClient: client, + } +} + +/*DeleteLeadParams contains all the parameters to send to the API endpoint +for the delete lead operation typically these are written to a http.Request +*/ +type DeleteLeadParams struct { + + /*LeadID + Taxnexus Lead record ID + + */ + LeadID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the delete lead params +func (o *DeleteLeadParams) WithTimeout(timeout time.Duration) *DeleteLeadParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the delete lead params +func (o *DeleteLeadParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the delete lead params +func (o *DeleteLeadParams) WithContext(ctx context.Context) *DeleteLeadParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the delete lead params +func (o *DeleteLeadParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the delete lead params +func (o *DeleteLeadParams) WithHTTPClient(client *http.Client) *DeleteLeadParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the delete lead params +func (o *DeleteLeadParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithLeadID adds the leadID to the delete lead params +func (o *DeleteLeadParams) WithLeadID(leadID *string) *DeleteLeadParams { + o.SetLeadID(leadID) + return o +} + +// SetLeadID adds the leadId to the delete lead params +func (o *DeleteLeadParams) SetLeadID(leadID *string) { + o.LeadID = leadID +} + +// WriteToRequest writes these params to a swagger request +func (o *DeleteLeadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.LeadID != nil { + + // query param leadId + var qrLeadID string + if o.LeadID != nil { + qrLeadID = *o.LeadID + } + qLeadID := qrLeadID + if qLeadID != "" { + if err := r.SetQueryParam("leadId", qLeadID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/crm/v0.0.1/crm_client/leads/delete_lead_responses.go b/api/crm/v0.0.1/crm_client/leads/delete_lead_responses.go new file mode 100644 index 0000000..f8c8316 --- /dev/null +++ b/api/crm/v0.0.1/crm_client/leads/delete_lead_responses.go @@ -0,0 +1,298 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package leads + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/crm/crm_models" +) + +// DeleteLeadReader is a Reader for the DeleteLead structure. +type DeleteLeadReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DeleteLeadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDeleteLeadOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewDeleteLeadUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewDeleteLeadForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewDeleteLeadNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewDeleteLeadUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewDeleteLeadInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewDeleteLeadOK creates a DeleteLeadOK with default headers values +func NewDeleteLeadOK() *DeleteLeadOK { + return &DeleteLeadOK{} +} + +/*DeleteLeadOK handles this case with default header values. + +Taxnexus Response with Message Objects with Delete Status +*/ +type DeleteLeadOK struct { + AccessControlAllowOrigin string + + Payload *crm_models.DeleteResponse +} + +func (o *DeleteLeadOK) Error() string { + return fmt.Sprintf("[DELETE /leads][%d] deleteLeadOK %+v", 200, o.Payload) +} + +func (o *DeleteLeadOK) GetPayload() *crm_models.DeleteResponse { + return o.Payload +} + +func (o *DeleteLeadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.DeleteResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteLeadUnauthorized creates a DeleteLeadUnauthorized with default headers values +func NewDeleteLeadUnauthorized() *DeleteLeadUnauthorized { + return &DeleteLeadUnauthorized{} +} + +/*DeleteLeadUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type DeleteLeadUnauthorized struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *DeleteLeadUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /leads][%d] deleteLeadUnauthorized %+v", 401, o.Payload) +} + +func (o *DeleteLeadUnauthorized) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *DeleteLeadUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteLeadForbidden creates a DeleteLeadForbidden with default headers values +func NewDeleteLeadForbidden() *DeleteLeadForbidden { + return &DeleteLeadForbidden{} +} + +/*DeleteLeadForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type DeleteLeadForbidden struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *DeleteLeadForbidden) Error() string { + return fmt.Sprintf("[DELETE /leads][%d] deleteLeadForbidden %+v", 403, o.Payload) +} + +func (o *DeleteLeadForbidden) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *DeleteLeadForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteLeadNotFound creates a DeleteLeadNotFound with default headers values +func NewDeleteLeadNotFound() *DeleteLeadNotFound { + return &DeleteLeadNotFound{} +} + +/*DeleteLeadNotFound handles this case with default header values. + +Resource was not found +*/ +type DeleteLeadNotFound struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *DeleteLeadNotFound) Error() string { + return fmt.Sprintf("[DELETE /leads][%d] deleteLeadNotFound %+v", 404, o.Payload) +} + +func (o *DeleteLeadNotFound) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *DeleteLeadNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteLeadUnprocessableEntity creates a DeleteLeadUnprocessableEntity with default headers values +func NewDeleteLeadUnprocessableEntity() *DeleteLeadUnprocessableEntity { + return &DeleteLeadUnprocessableEntity{} +} + +/*DeleteLeadUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type DeleteLeadUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *DeleteLeadUnprocessableEntity) Error() string { + return fmt.Sprintf("[DELETE /leads][%d] deleteLeadUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *DeleteLeadUnprocessableEntity) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *DeleteLeadUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteLeadInternalServerError creates a DeleteLeadInternalServerError with default headers values +func NewDeleteLeadInternalServerError() *DeleteLeadInternalServerError { + return &DeleteLeadInternalServerError{} +} + +/*DeleteLeadInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type DeleteLeadInternalServerError struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *DeleteLeadInternalServerError) Error() string { + return fmt.Sprintf("[DELETE /leads][%d] deleteLeadInternalServerError %+v", 500, o.Payload) +} + +func (o *DeleteLeadInternalServerError) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *DeleteLeadInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/crm/v0.0.1/crm_client/leads/get_leads_observable_parameters.go b/api/crm/v0.0.1/crm_client/leads/get_leads_observable_parameters.go new file mode 100644 index 0000000..687c5bc --- /dev/null +++ b/api/crm/v0.0.1/crm_client/leads/get_leads_observable_parameters.go @@ -0,0 +1,214 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package leads + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetLeadsObservableParams creates a new GetLeadsObservableParams object +// with the default values initialized. +func NewGetLeadsObservableParams() *GetLeadsObservableParams { + var () + return &GetLeadsObservableParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetLeadsObservableParamsWithTimeout creates a new GetLeadsObservableParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetLeadsObservableParamsWithTimeout(timeout time.Duration) *GetLeadsObservableParams { + var () + return &GetLeadsObservableParams{ + + timeout: timeout, + } +} + +// NewGetLeadsObservableParamsWithContext creates a new GetLeadsObservableParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetLeadsObservableParamsWithContext(ctx context.Context) *GetLeadsObservableParams { + var () + return &GetLeadsObservableParams{ + + Context: ctx, + } +} + +// NewGetLeadsObservableParamsWithHTTPClient creates a new GetLeadsObservableParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetLeadsObservableParamsWithHTTPClient(client *http.Client) *GetLeadsObservableParams { + var () + return &GetLeadsObservableParams{ + HTTPClient: client, + } +} + +/*GetLeadsObservableParams contains all the parameters to send to the API endpoint +for the get leads observable operation typically these are written to a http.Request +*/ +type GetLeadsObservableParams struct { + + /*Email + Email address used for identity lookup + + */ + Email *string + /*LeadID + Taxnexus Lead record ID + + */ + LeadID *string + /*Name + The Name of this Object + + */ + Name *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get leads observable params +func (o *GetLeadsObservableParams) WithTimeout(timeout time.Duration) *GetLeadsObservableParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get leads observable params +func (o *GetLeadsObservableParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get leads observable params +func (o *GetLeadsObservableParams) WithContext(ctx context.Context) *GetLeadsObservableParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get leads observable params +func (o *GetLeadsObservableParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get leads observable params +func (o *GetLeadsObservableParams) WithHTTPClient(client *http.Client) *GetLeadsObservableParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get leads observable params +func (o *GetLeadsObservableParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithEmail adds the email to the get leads observable params +func (o *GetLeadsObservableParams) WithEmail(email *string) *GetLeadsObservableParams { + o.SetEmail(email) + return o +} + +// SetEmail adds the email to the get leads observable params +func (o *GetLeadsObservableParams) SetEmail(email *string) { + o.Email = email +} + +// WithLeadID adds the leadID to the get leads observable params +func (o *GetLeadsObservableParams) WithLeadID(leadID *string) *GetLeadsObservableParams { + o.SetLeadID(leadID) + return o +} + +// SetLeadID adds the leadId to the get leads observable params +func (o *GetLeadsObservableParams) SetLeadID(leadID *string) { + o.LeadID = leadID +} + +// WithName adds the name to the get leads observable params +func (o *GetLeadsObservableParams) WithName(name *string) *GetLeadsObservableParams { + o.SetName(name) + return o +} + +// SetName adds the name to the get leads observable params +func (o *GetLeadsObservableParams) SetName(name *string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *GetLeadsObservableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Email != nil { + + // query param email + var qrEmail string + if o.Email != nil { + qrEmail = *o.Email + } + qEmail := qrEmail + if qEmail != "" { + if err := r.SetQueryParam("email", qEmail); err != nil { + return err + } + } + + } + + if o.LeadID != nil { + + // query param leadId + var qrLeadID string + if o.LeadID != nil { + qrLeadID = *o.LeadID + } + qLeadID := qrLeadID + if qLeadID != "" { + if err := r.SetQueryParam("leadId", qLeadID); err != nil { + return err + } + } + + } + + if o.Name != nil { + + // query param name + var qrName string + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/crm/v0.0.1/crm_client/leads/get_leads_observable_responses.go b/api/crm/v0.0.1/crm_client/leads/get_leads_observable_responses.go new file mode 100644 index 0000000..06ed07e --- /dev/null +++ b/api/crm/v0.0.1/crm_client/leads/get_leads_observable_responses.go @@ -0,0 +1,301 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package leads + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/crm/crm_models" +) + +// GetLeadsObservableReader is a Reader for the GetLeadsObservable structure. +type GetLeadsObservableReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetLeadsObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetLeadsObservableOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetLeadsObservableUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetLeadsObservableForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetLeadsObservableNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetLeadsObservableUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetLeadsObservableInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetLeadsObservableOK creates a GetLeadsObservableOK with default headers values +func NewGetLeadsObservableOK() *GetLeadsObservableOK { + return &GetLeadsObservableOK{} +} + +/*GetLeadsObservableOK handles this case with default header values. + +Taxnexus Response with an array of Lead objects +*/ +type GetLeadsObservableOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload []*crm_models.Lead +} + +func (o *GetLeadsObservableOK) Error() string { + return fmt.Sprintf("[GET /leads/observable][%d] getLeadsObservableOK %+v", 200, o.Payload) +} + +func (o *GetLeadsObservableOK) GetPayload() []*crm_models.Lead { + return o.Payload +} + +func (o *GetLeadsObservableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetLeadsObservableUnauthorized creates a GetLeadsObservableUnauthorized with default headers values +func NewGetLeadsObservableUnauthorized() *GetLeadsObservableUnauthorized { + return &GetLeadsObservableUnauthorized{} +} + +/*GetLeadsObservableUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetLeadsObservableUnauthorized struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetLeadsObservableUnauthorized) Error() string { + return fmt.Sprintf("[GET /leads/observable][%d] getLeadsObservableUnauthorized %+v", 401, o.Payload) +} + +func (o *GetLeadsObservableUnauthorized) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetLeadsObservableUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetLeadsObservableForbidden creates a GetLeadsObservableForbidden with default headers values +func NewGetLeadsObservableForbidden() *GetLeadsObservableForbidden { + return &GetLeadsObservableForbidden{} +} + +/*GetLeadsObservableForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetLeadsObservableForbidden struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetLeadsObservableForbidden) Error() string { + return fmt.Sprintf("[GET /leads/observable][%d] getLeadsObservableForbidden %+v", 403, o.Payload) +} + +func (o *GetLeadsObservableForbidden) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetLeadsObservableForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetLeadsObservableNotFound creates a GetLeadsObservableNotFound with default headers values +func NewGetLeadsObservableNotFound() *GetLeadsObservableNotFound { + return &GetLeadsObservableNotFound{} +} + +/*GetLeadsObservableNotFound handles this case with default header values. + +Resource was not found +*/ +type GetLeadsObservableNotFound struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetLeadsObservableNotFound) Error() string { + return fmt.Sprintf("[GET /leads/observable][%d] getLeadsObservableNotFound %+v", 404, o.Payload) +} + +func (o *GetLeadsObservableNotFound) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetLeadsObservableNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetLeadsObservableUnprocessableEntity creates a GetLeadsObservableUnprocessableEntity with default headers values +func NewGetLeadsObservableUnprocessableEntity() *GetLeadsObservableUnprocessableEntity { + return &GetLeadsObservableUnprocessableEntity{} +} + +/*GetLeadsObservableUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetLeadsObservableUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetLeadsObservableUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /leads/observable][%d] getLeadsObservableUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetLeadsObservableUnprocessableEntity) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetLeadsObservableUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetLeadsObservableInternalServerError creates a GetLeadsObservableInternalServerError with default headers values +func NewGetLeadsObservableInternalServerError() *GetLeadsObservableInternalServerError { + return &GetLeadsObservableInternalServerError{} +} + +/*GetLeadsObservableInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetLeadsObservableInternalServerError struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetLeadsObservableInternalServerError) Error() string { + return fmt.Sprintf("[GET /leads/observable][%d] getLeadsObservableInternalServerError %+v", 500, o.Payload) +} + +func (o *GetLeadsObservableInternalServerError) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetLeadsObservableInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/crm/v0.0.1/crm_client/leads/get_leads_parameters.go b/api/crm/v0.0.1/crm_client/leads/get_leads_parameters.go new file mode 100644 index 0000000..e45210c --- /dev/null +++ b/api/crm/v0.0.1/crm_client/leads/get_leads_parameters.go @@ -0,0 +1,279 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package leads + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetLeadsParams creates a new GetLeadsParams object +// with the default values initialized. +func NewGetLeadsParams() *GetLeadsParams { + var () + return &GetLeadsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetLeadsParamsWithTimeout creates a new GetLeadsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetLeadsParamsWithTimeout(timeout time.Duration) *GetLeadsParams { + var () + return &GetLeadsParams{ + + timeout: timeout, + } +} + +// NewGetLeadsParamsWithContext creates a new GetLeadsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetLeadsParamsWithContext(ctx context.Context) *GetLeadsParams { + var () + return &GetLeadsParams{ + + Context: ctx, + } +} + +// NewGetLeadsParamsWithHTTPClient creates a new GetLeadsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetLeadsParamsWithHTTPClient(client *http.Client) *GetLeadsParams { + var () + return &GetLeadsParams{ + HTTPClient: client, + } +} + +/*GetLeadsParams contains all the parameters to send to the API endpoint +for the get leads operation typically these are written to a http.Request +*/ +type GetLeadsParams struct { + + /*Email + Email address used for identity lookup + + */ + Email *string + /*LeadID + Taxnexus Lead record ID + + */ + LeadID *string + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Name + The Name of this Object + + */ + Name *string + /*Offset + How many objects to skip? + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get leads params +func (o *GetLeadsParams) WithTimeout(timeout time.Duration) *GetLeadsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get leads params +func (o *GetLeadsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get leads params +func (o *GetLeadsParams) WithContext(ctx context.Context) *GetLeadsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get leads params +func (o *GetLeadsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get leads params +func (o *GetLeadsParams) WithHTTPClient(client *http.Client) *GetLeadsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get leads params +func (o *GetLeadsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithEmail adds the email to the get leads params +func (o *GetLeadsParams) WithEmail(email *string) *GetLeadsParams { + o.SetEmail(email) + return o +} + +// SetEmail adds the email to the get leads params +func (o *GetLeadsParams) SetEmail(email *string) { + o.Email = email +} + +// WithLeadID adds the leadID to the get leads params +func (o *GetLeadsParams) WithLeadID(leadID *string) *GetLeadsParams { + o.SetLeadID(leadID) + return o +} + +// SetLeadID adds the leadId to the get leads params +func (o *GetLeadsParams) SetLeadID(leadID *string) { + o.LeadID = leadID +} + +// WithLimit adds the limit to the get leads params +func (o *GetLeadsParams) WithLimit(limit *int64) *GetLeadsParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get leads params +func (o *GetLeadsParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithName adds the name to the get leads params +func (o *GetLeadsParams) WithName(name *string) *GetLeadsParams { + o.SetName(name) + return o +} + +// SetName adds the name to the get leads params +func (o *GetLeadsParams) SetName(name *string) { + o.Name = name +} + +// WithOffset adds the offset to the get leads params +func (o *GetLeadsParams) WithOffset(offset *int64) *GetLeadsParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get leads params +func (o *GetLeadsParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *GetLeadsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Email != nil { + + // query param email + var qrEmail string + if o.Email != nil { + qrEmail = *o.Email + } + qEmail := qrEmail + if qEmail != "" { + if err := r.SetQueryParam("email", qEmail); err != nil { + return err + } + } + + } + + if o.LeadID != nil { + + // query param leadId + var qrLeadID string + if o.LeadID != nil { + qrLeadID = *o.LeadID + } + qLeadID := qrLeadID + if qLeadID != "" { + if err := r.SetQueryParam("leadId", qLeadID); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Name != nil { + + // query param name + var qrName string + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/crm/v0.0.1/crm_client/leads/get_leads_responses.go b/api/crm/v0.0.1/crm_client/leads/get_leads_responses.go new file mode 100644 index 0000000..1f42bb9 --- /dev/null +++ b/api/crm/v0.0.1/crm_client/leads/get_leads_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package leads + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/crm/crm_models" +) + +// GetLeadsReader is a Reader for the GetLeads structure. +type GetLeadsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetLeadsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetLeadsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetLeadsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetLeadsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetLeadsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetLeadsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetLeadsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetLeadsOK creates a GetLeadsOK with default headers values +func NewGetLeadsOK() *GetLeadsOK { + return &GetLeadsOK{} +} + +/*GetLeadsOK handles this case with default header values. + +Taxnexus Response with an array of Lead objects +*/ +type GetLeadsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *crm_models.LeadResponse +} + +func (o *GetLeadsOK) Error() string { + return fmt.Sprintf("[GET /leads][%d] getLeadsOK %+v", 200, o.Payload) +} + +func (o *GetLeadsOK) GetPayload() *crm_models.LeadResponse { + return o.Payload +} + +func (o *GetLeadsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(crm_models.LeadResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetLeadsUnauthorized creates a GetLeadsUnauthorized with default headers values +func NewGetLeadsUnauthorized() *GetLeadsUnauthorized { + return &GetLeadsUnauthorized{} +} + +/*GetLeadsUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetLeadsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetLeadsUnauthorized) Error() string { + return fmt.Sprintf("[GET /leads][%d] getLeadsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetLeadsUnauthorized) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetLeadsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetLeadsForbidden creates a GetLeadsForbidden with default headers values +func NewGetLeadsForbidden() *GetLeadsForbidden { + return &GetLeadsForbidden{} +} + +/*GetLeadsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetLeadsForbidden struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetLeadsForbidden) Error() string { + return fmt.Sprintf("[GET /leads][%d] getLeadsForbidden %+v", 403, o.Payload) +} + +func (o *GetLeadsForbidden) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetLeadsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetLeadsNotFound creates a GetLeadsNotFound with default headers values +func NewGetLeadsNotFound() *GetLeadsNotFound { + return &GetLeadsNotFound{} +} + +/*GetLeadsNotFound handles this case with default header values. + +Resource was not found +*/ +type GetLeadsNotFound struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetLeadsNotFound) Error() string { + return fmt.Sprintf("[GET /leads][%d] getLeadsNotFound %+v", 404, o.Payload) +} + +func (o *GetLeadsNotFound) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetLeadsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetLeadsUnprocessableEntity creates a GetLeadsUnprocessableEntity with default headers values +func NewGetLeadsUnprocessableEntity() *GetLeadsUnprocessableEntity { + return &GetLeadsUnprocessableEntity{} +} + +/*GetLeadsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetLeadsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetLeadsUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /leads][%d] getLeadsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetLeadsUnprocessableEntity) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetLeadsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetLeadsInternalServerError creates a GetLeadsInternalServerError with default headers values +func NewGetLeadsInternalServerError() *GetLeadsInternalServerError { + return &GetLeadsInternalServerError{} +} + +/*GetLeadsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetLeadsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *GetLeadsInternalServerError) Error() string { + return fmt.Sprintf("[GET /leads][%d] getLeadsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetLeadsInternalServerError) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *GetLeadsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/crm/v0.0.1/crm_client/leads/leads_client.go b/api/crm/v0.0.1/crm_client/leads/leads_client.go new file mode 100644 index 0000000..9038071 --- /dev/null +++ b/api/crm/v0.0.1/crm_client/leads/leads_client.go @@ -0,0 +1,235 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package leads + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new leads API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for leads API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + DeleteLead(params *DeleteLeadParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteLeadOK, error) + + GetLeads(params *GetLeadsParams, authInfo runtime.ClientAuthInfoWriter) (*GetLeadsOK, error) + + GetLeadsObservable(params *GetLeadsObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetLeadsObservableOK, error) + + PostLeads(params *PostLeadsParams, authInfo runtime.ClientAuthInfoWriter) (*PostLeadsOK, error) + + PutLeads(params *PutLeadsParams, authInfo runtime.ClientAuthInfoWriter) (*PutLeadsOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + DeleteLead deletes a contact + + Delete Taxnexus Lead record +*/ +func (a *Client) DeleteLead(params *DeleteLeadParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteLeadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDeleteLeadParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "deleteLead", + Method: "DELETE", + PathPattern: "/leads", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &DeleteLeadReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*DeleteLeadOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for deleteLead: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetLeads gets a list of contacts + + Return a list of all available Leads +*/ +func (a *Client) GetLeads(params *GetLeadsParams, authInfo runtime.ClientAuthInfoWriter) (*GetLeadsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetLeadsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getLeads", + Method: "GET", + PathPattern: "/leads", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetLeadsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetLeadsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getLeads: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetLeadsObservable gets taxnexus leads in an observable array + + A list of leads in a simple JSON array +*/ +func (a *Client) GetLeadsObservable(params *GetLeadsObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetLeadsObservableOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetLeadsObservableParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getLeadsObservable", + Method: "GET", + PathPattern: "/leads/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetLeadsObservableReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetLeadsObservableOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getLeadsObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostLeads adds new leads + + Lead records to be added +*/ +func (a *Client) PostLeads(params *PostLeadsParams, authInfo runtime.ClientAuthInfoWriter) (*PostLeadsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostLeadsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postLeads", + Method: "POST", + PathPattern: "/leads", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostLeadsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostLeadsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postLeads: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PutLeads updates leads + + Update Lead records +*/ +func (a *Client) PutLeads(params *PutLeadsParams, authInfo runtime.ClientAuthInfoWriter) (*PutLeadsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPutLeadsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "putLeads", + Method: "PUT", + PathPattern: "/leads", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PutLeadsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PutLeadsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for putLeads: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/crm/v0.0.1/crm_client/leads/post_leads_parameters.go b/api/crm/v0.0.1/crm_client/leads/post_leads_parameters.go new file mode 100644 index 0000000..d87a2cb --- /dev/null +++ b/api/crm/v0.0.1/crm_client/leads/post_leads_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package leads + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/crm/crm_models" +) + +// NewPostLeadsParams creates a new PostLeadsParams object +// with the default values initialized. +func NewPostLeadsParams() *PostLeadsParams { + var () + return &PostLeadsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostLeadsParamsWithTimeout creates a new PostLeadsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostLeadsParamsWithTimeout(timeout time.Duration) *PostLeadsParams { + var () + return &PostLeadsParams{ + + timeout: timeout, + } +} + +// NewPostLeadsParamsWithContext creates a new PostLeadsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostLeadsParamsWithContext(ctx context.Context) *PostLeadsParams { + var () + return &PostLeadsParams{ + + Context: ctx, + } +} + +// NewPostLeadsParamsWithHTTPClient creates a new PostLeadsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostLeadsParamsWithHTTPClient(client *http.Client) *PostLeadsParams { + var () + return &PostLeadsParams{ + HTTPClient: client, + } +} + +/*PostLeadsParams contains all the parameters to send to the API endpoint +for the post leads operation typically these are written to a http.Request +*/ +type PostLeadsParams struct { + + /*LeadRequest + An array of new Lead records + + */ + LeadRequest *crm_models.LeadRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post leads params +func (o *PostLeadsParams) WithTimeout(timeout time.Duration) *PostLeadsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post leads params +func (o *PostLeadsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post leads params +func (o *PostLeadsParams) WithContext(ctx context.Context) *PostLeadsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post leads params +func (o *PostLeadsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post leads params +func (o *PostLeadsParams) WithHTTPClient(client *http.Client) *PostLeadsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post leads params +func (o *PostLeadsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithLeadRequest adds the leadRequest to the post leads params +func (o *PostLeadsParams) WithLeadRequest(leadRequest *crm_models.LeadRequest) *PostLeadsParams { + o.SetLeadRequest(leadRequest) + return o +} + +// SetLeadRequest adds the leadRequest to the post leads params +func (o *PostLeadsParams) SetLeadRequest(leadRequest *crm_models.LeadRequest) { + o.LeadRequest = leadRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostLeadsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.LeadRequest != nil { + if err := r.SetBodyParam(o.LeadRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/crm/v0.0.1/crm_client/leads/post_leads_responses.go b/api/crm/v0.0.1/crm_client/leads/post_leads_responses.go new file mode 100644 index 0000000..abdca4a --- /dev/null +++ b/api/crm/v0.0.1/crm_client/leads/post_leads_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package leads + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/crm/crm_models" +) + +// PostLeadsReader is a Reader for the PostLeads structure. +type PostLeadsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostLeadsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostLeadsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostLeadsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostLeadsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostLeadsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostLeadsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostLeadsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostLeadsOK creates a PostLeadsOK with default headers values +func NewPostLeadsOK() *PostLeadsOK { + return &PostLeadsOK{} +} + +/*PostLeadsOK handles this case with default header values. + +Taxnexus Response with an array of Lead objects +*/ +type PostLeadsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *crm_models.LeadResponse +} + +func (o *PostLeadsOK) Error() string { + return fmt.Sprintf("[POST /leads][%d] postLeadsOK %+v", 200, o.Payload) +} + +func (o *PostLeadsOK) GetPayload() *crm_models.LeadResponse { + return o.Payload +} + +func (o *PostLeadsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(crm_models.LeadResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostLeadsUnauthorized creates a PostLeadsUnauthorized with default headers values +func NewPostLeadsUnauthorized() *PostLeadsUnauthorized { + return &PostLeadsUnauthorized{} +} + +/*PostLeadsUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PostLeadsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PostLeadsUnauthorized) Error() string { + return fmt.Sprintf("[POST /leads][%d] postLeadsUnauthorized %+v", 401, o.Payload) +} + +func (o *PostLeadsUnauthorized) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PostLeadsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostLeadsForbidden creates a PostLeadsForbidden with default headers values +func NewPostLeadsForbidden() *PostLeadsForbidden { + return &PostLeadsForbidden{} +} + +/*PostLeadsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostLeadsForbidden struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PostLeadsForbidden) Error() string { + return fmt.Sprintf("[POST /leads][%d] postLeadsForbidden %+v", 403, o.Payload) +} + +func (o *PostLeadsForbidden) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PostLeadsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostLeadsNotFound creates a PostLeadsNotFound with default headers values +func NewPostLeadsNotFound() *PostLeadsNotFound { + return &PostLeadsNotFound{} +} + +/*PostLeadsNotFound handles this case with default header values. + +Resource was not found +*/ +type PostLeadsNotFound struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PostLeadsNotFound) Error() string { + return fmt.Sprintf("[POST /leads][%d] postLeadsNotFound %+v", 404, o.Payload) +} + +func (o *PostLeadsNotFound) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PostLeadsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostLeadsUnprocessableEntity creates a PostLeadsUnprocessableEntity with default headers values +func NewPostLeadsUnprocessableEntity() *PostLeadsUnprocessableEntity { + return &PostLeadsUnprocessableEntity{} +} + +/*PostLeadsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostLeadsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PostLeadsUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /leads][%d] postLeadsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostLeadsUnprocessableEntity) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PostLeadsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostLeadsInternalServerError creates a PostLeadsInternalServerError with default headers values +func NewPostLeadsInternalServerError() *PostLeadsInternalServerError { + return &PostLeadsInternalServerError{} +} + +/*PostLeadsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostLeadsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PostLeadsInternalServerError) Error() string { + return fmt.Sprintf("[POST /leads][%d] postLeadsInternalServerError %+v", 500, o.Payload) +} + +func (o *PostLeadsInternalServerError) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PostLeadsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/crm/v0.0.1/crm_client/leads/put_leads_parameters.go b/api/crm/v0.0.1/crm_client/leads/put_leads_parameters.go new file mode 100644 index 0000000..be08f53 --- /dev/null +++ b/api/crm/v0.0.1/crm_client/leads/put_leads_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package leads + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/crm/crm_models" +) + +// NewPutLeadsParams creates a new PutLeadsParams object +// with the default values initialized. +func NewPutLeadsParams() *PutLeadsParams { + var () + return &PutLeadsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPutLeadsParamsWithTimeout creates a new PutLeadsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPutLeadsParamsWithTimeout(timeout time.Duration) *PutLeadsParams { + var () + return &PutLeadsParams{ + + timeout: timeout, + } +} + +// NewPutLeadsParamsWithContext creates a new PutLeadsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPutLeadsParamsWithContext(ctx context.Context) *PutLeadsParams { + var () + return &PutLeadsParams{ + + Context: ctx, + } +} + +// NewPutLeadsParamsWithHTTPClient creates a new PutLeadsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPutLeadsParamsWithHTTPClient(client *http.Client) *PutLeadsParams { + var () + return &PutLeadsParams{ + HTTPClient: client, + } +} + +/*PutLeadsParams contains all the parameters to send to the API endpoint +for the put leads operation typically these are written to a http.Request +*/ +type PutLeadsParams struct { + + /*LeadRequest + An array of new Lead records + + */ + LeadRequest *crm_models.LeadRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the put leads params +func (o *PutLeadsParams) WithTimeout(timeout time.Duration) *PutLeadsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the put leads params +func (o *PutLeadsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the put leads params +func (o *PutLeadsParams) WithContext(ctx context.Context) *PutLeadsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the put leads params +func (o *PutLeadsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the put leads params +func (o *PutLeadsParams) WithHTTPClient(client *http.Client) *PutLeadsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the put leads params +func (o *PutLeadsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithLeadRequest adds the leadRequest to the put leads params +func (o *PutLeadsParams) WithLeadRequest(leadRequest *crm_models.LeadRequest) *PutLeadsParams { + o.SetLeadRequest(leadRequest) + return o +} + +// SetLeadRequest adds the leadRequest to the put leads params +func (o *PutLeadsParams) SetLeadRequest(leadRequest *crm_models.LeadRequest) { + o.LeadRequest = leadRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PutLeadsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.LeadRequest != nil { + if err := r.SetBodyParam(o.LeadRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/crm/v0.0.1/crm_client/leads/put_leads_responses.go b/api/crm/v0.0.1/crm_client/leads/put_leads_responses.go new file mode 100644 index 0000000..36deb37 --- /dev/null +++ b/api/crm/v0.0.1/crm_client/leads/put_leads_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package leads + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/crm/crm_models" +) + +// PutLeadsReader is a Reader for the PutLeads structure. +type PutLeadsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PutLeadsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPutLeadsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPutLeadsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPutLeadsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPutLeadsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPutLeadsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPutLeadsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPutLeadsOK creates a PutLeadsOK with default headers values +func NewPutLeadsOK() *PutLeadsOK { + return &PutLeadsOK{} +} + +/*PutLeadsOK handles this case with default header values. + +Taxnexus Response with an array of Lead objects +*/ +type PutLeadsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *crm_models.LeadResponse +} + +func (o *PutLeadsOK) Error() string { + return fmt.Sprintf("[PUT /leads][%d] putLeadsOK %+v", 200, o.Payload) +} + +func (o *PutLeadsOK) GetPayload() *crm_models.LeadResponse { + return o.Payload +} + +func (o *PutLeadsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(crm_models.LeadResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutLeadsUnauthorized creates a PutLeadsUnauthorized with default headers values +func NewPutLeadsUnauthorized() *PutLeadsUnauthorized { + return &PutLeadsUnauthorized{} +} + +/*PutLeadsUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PutLeadsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PutLeadsUnauthorized) Error() string { + return fmt.Sprintf("[PUT /leads][%d] putLeadsUnauthorized %+v", 401, o.Payload) +} + +func (o *PutLeadsUnauthorized) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PutLeadsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutLeadsForbidden creates a PutLeadsForbidden with default headers values +func NewPutLeadsForbidden() *PutLeadsForbidden { + return &PutLeadsForbidden{} +} + +/*PutLeadsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PutLeadsForbidden struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PutLeadsForbidden) Error() string { + return fmt.Sprintf("[PUT /leads][%d] putLeadsForbidden %+v", 403, o.Payload) +} + +func (o *PutLeadsForbidden) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PutLeadsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutLeadsNotFound creates a PutLeadsNotFound with default headers values +func NewPutLeadsNotFound() *PutLeadsNotFound { + return &PutLeadsNotFound{} +} + +/*PutLeadsNotFound handles this case with default header values. + +Resource was not found +*/ +type PutLeadsNotFound struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PutLeadsNotFound) Error() string { + return fmt.Sprintf("[PUT /leads][%d] putLeadsNotFound %+v", 404, o.Payload) +} + +func (o *PutLeadsNotFound) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PutLeadsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutLeadsUnprocessableEntity creates a PutLeadsUnprocessableEntity with default headers values +func NewPutLeadsUnprocessableEntity() *PutLeadsUnprocessableEntity { + return &PutLeadsUnprocessableEntity{} +} + +/*PutLeadsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PutLeadsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PutLeadsUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /leads][%d] putLeadsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutLeadsUnprocessableEntity) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PutLeadsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutLeadsInternalServerError creates a PutLeadsInternalServerError with default headers values +func NewPutLeadsInternalServerError() *PutLeadsInternalServerError { + return &PutLeadsInternalServerError{} +} + +/*PutLeadsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PutLeadsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *crm_models.Error +} + +func (o *PutLeadsInternalServerError) Error() string { + return fmt.Sprintf("[PUT /leads][%d] putLeadsInternalServerError %+v", 500, o.Payload) +} + +func (o *PutLeadsInternalServerError) GetPayload() *crm_models.Error { + return o.Payload +} + +func (o *PutLeadsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(crm_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/crm/v0.0.1/crm_models/account.go b/api/crm/v0.0.1/crm_models/account.go new file mode 100644 index 0000000..853fd6e --- /dev/null +++ b/api/crm/v0.0.1/crm_models/account.go @@ -0,0 +1,402 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package crm_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Account account +// +// swagger:model Account +type Account struct { + + // Account Number + AccountNumber string `json:"AccountNumber,omitempty"` + + // The marketing orgin of this account + AccountSource string `json:"AccountSource,omitempty"` + + // Active + Active bool `json:"Active,omitempty"` + + // For tax authorities, this account's administrative level, e.g. Local, County, State or Federal + AdministrativeLevel string `json:"AdministrativeLevel,omitempty"` + + // Rollup Tax Amount + Amount float64 `json:"Amount,omitempty"` + + // Amount Invoiced + AmountInvoiced float64 `json:"AmountInvoiced,omitempty"` + + // Amount Paid + AmountPaid float64 `json:"AmountPaid,omitempty"` + + // Annual Revenue Estimate + AnnualRevenue float64 `json:"AnnualRevenue,omitempty"` + + // Account Balance + Balance float64 `json:"Balance,omitempty"` + + // billing address + BillingAddress *Address `json:"BillingAddress,omitempty"` + + // Contact ID + BillingContactID string `json:"BillingContactID,omitempty"` + + // Billing Preference + BillingPreference string `json:"BillingPreference,omitempty"` + + // business address + BusinessAddress *Address `json:"BusinessAddress,omitempty"` + + // Is this a cannabis customer? + CannabisCustomer bool `json:"CannabisCustomer,omitempty"` + + // Channel Program Level Name + ChannelProgramLevelName string `json:"ChannelProgramLevelName,omitempty"` + + // Channel Program Name + ChannelProgramName string `json:"ChannelProgramName,omitempty"` + + // Client End Date + ClientEndDate string `json:"ClientEndDate,omitempty"` + + // Client Start Date + ClientStartDate string `json:"ClientStartDate,omitempty"` + + // The Company ID of this Account + CompanyID string `json:"CompanyID,omitempty"` + + // The Id of the geo coordinates of this account + CoordinateID string `json:"CoordinateID,omitempty"` + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Customer ID from source system + CustomerID string `json:"CustomerID,omitempty"` + + // Customer Priority + CustomerPriority string `json:"CustomerPriority,omitempty"` + + // This Account's 'Doing Business As' name + DBA string `json:"DBA,omitempty"` + + // D-U-N-S Number + DUNSNumber string `json:"DUNSNumber,omitempty"` + + // D-n-B Company + DandBCompanyID string `json:"DandBCompanyID,omitempty"` + + // default address + DefaultAddress *Address `json:"DefaultAddress,omitempty"` + + // Default Backend ID + DefaultBackendID string `json:"DefaultBackendID,omitempty"` + + // Default Delivery Address Contact ID + DefaultDeliveryContactID string `json:"DefaultDeliveryContactID,omitempty"` + + // Default End User Contact ID + DefaultEndUserID string `json:"DefaultEndUserID,omitempty"` + + // Description + Description string `json:"Description,omitempty"` + + // EIN + EIN string `json:"EIN,omitempty"` + + // Main Account Email + Email string `json:"Email,omitempty"` + + // Enrollment Status + EnrollmentStatus string `json:"EnrollmentStatus,omitempty"` + + // Fax + Fax string `json:"Fax,omitempty"` + + // Taxnexus Account Id + ID string `json:"ID,omitempty"` + + // ISP Customer? + ISPCustomer bool `json:"ISPCustomer,omitempty"` + + // Industry + Industry string `json:"Industry,omitempty"` + + // Customer Portal Account + IsCustomerPortal bool `json:"IsCustomerPortal,omitempty"` + + // Partner Account + IsPartner bool `json:"IsPartner,omitempty"` + + // Data.com Key + JigSaw string `json:"JigSaw,omitempty"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // MSP Customer? + MSPCustomer bool `json:"MSPCustomer,omitempty"` + + // NAICS Code + NAICSCode string `json:"NAICSCode,omitempty"` + + // NAICS Description + NAICSDesc string `json:"NAICSDesc,omitempty"` + + // Account Name + Name string `json:"Name,omitempty"` + + // Employee Count Estimate + NumberOfEmployees int64 `json:"NumberOfEmployees,omitempty"` + + // Number of Locations Estimate + NumberOfLocations int64 `json:"NumberOfLocations,omitempty"` + + // Open Charges + OpenCharges float64 `json:"OpenCharges,omitempty"` + + // Vendor Order Contact ID + OrderContactID string `json:"OrderContactID,omitempty"` + + // Order Email + OrderEmail string `json:"OrderEmail,omitempty"` + + // Account Owner User ID + OwnerID string `json:"OwnerID,omitempty"` + + // Ownership + Ownership string `json:"Ownership,omitempty"` + + // Parent Foreign Key + ParentFK string `json:"ParentFK,omitempty"` + + // Parent Account + ParentID string `json:"ParentID,omitempty"` + + // Phone + Phone string `json:"Phone,omitempty"` + + // The ID of the Place situs record that applies to this Account + PlaceID string `json:"PlaceID,omitempty"` + + // Tax Preparer Contact ID + PreparerID string `json:"PreparerID,omitempty"` + + // Rating + Rating string `json:"Rating,omitempty"` + + // Rating Engine identifier + RatingEngineID string `json:"RatingEngineID,omitempty"` + + // External Reference ID + Ref string `json:"Ref,omitempty"` + + // Rollup Revenue Base + RevenueBase float64 `json:"RevenueBase,omitempty"` + + // Rollup Revenue Net + RevenueNet float64 `json:"RevenueNet,omitempty"` + + // Rollup Revenue Not Taxable + RevenueNotTaxable float64 `json:"RevenueNotTaxable,omitempty"` + + // SIC Code + SIC string `json:"SIC,omitempty"` + + // SIC Description + SICDesc string `json:"SICDesc,omitempty"` + + // shipping address + ShippingAddress *Address `json:"ShippingAddress,omitempty"` + + // Shipping Census Tract + ShippingCensusTract string `json:"ShippingCensusTract,omitempty"` + + // Shipping Contact ID + ShippingConactID string `json:"ShippingConactID,omitempty"` + + // Shipping County + ShippingCounty string `json:"ShippingCounty,omitempty"` + + // Account Site + Site string `json:"Site,omitempty"` + + // Account Status + Status string `json:"Status,omitempty"` + + // Tax Exemption + TaxExemption string `json:"TaxExemption,omitempty"` + + // Rollup Tax On Tax + TaxOnTax float64 `json:"TaxOnTax,omitempty"` + + // Telecom Customer? + TelecomCustomer bool `json:"TelecomCustomer,omitempty"` + + // Tenant Identifier + TenantID string `json:"TenantID,omitempty"` + + // Ticker Symbol + TickerSymbol string `json:"TickerSymbol,omitempty"` + + // Tradestyle + TradeStyle string `json:"TradeStyle,omitempty"` + + // Type + Type string `json:"Type,omitempty"` + + // Unapplied Payments + UnappliedPayments float64 `json:"UnappliedPayments,omitempty"` + + // Rollup Unit Base + UnitBase float64 `json:"UnitBase,omitempty"` + + // Upsell Opportunity + UpsellOpportunity string `json:"UpsellOpportunity,omitempty"` + + // WHMCS Client ID + WHMCSClientID int64 `json:"WHMCSClientID,omitempty"` + + // Website + Website string `json:"Website,omitempty"` + + // Xero Contact ID + XeroContactID string `json:"XeroContactID,omitempty"` + + // Year Started + YearStarted string `json:"YearStarted,omitempty"` +} + +// Validate validates this account +func (m *Account) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBillingAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateBusinessAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDefaultAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateShippingAddress(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Account) validateBillingAddress(formats strfmt.Registry) error { + + if swag.IsZero(m.BillingAddress) { // not required + return nil + } + + if m.BillingAddress != nil { + if err := m.BillingAddress.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("BillingAddress") + } + return err + } + } + + return nil +} + +func (m *Account) validateBusinessAddress(formats strfmt.Registry) error { + + if swag.IsZero(m.BusinessAddress) { // not required + return nil + } + + if m.BusinessAddress != nil { + if err := m.BusinessAddress.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("BusinessAddress") + } + return err + } + } + + return nil +} + +func (m *Account) validateDefaultAddress(formats strfmt.Registry) error { + + if swag.IsZero(m.DefaultAddress) { // not required + return nil + } + + if m.DefaultAddress != nil { + if err := m.DefaultAddress.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("DefaultAddress") + } + return err + } + } + + return nil +} + +func (m *Account) validateShippingAddress(formats strfmt.Registry) error { + + if swag.IsZero(m.ShippingAddress) { // not required + return nil + } + + if m.ShippingAddress != nil { + if err := m.ShippingAddress.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ShippingAddress") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Account) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Account) UnmarshalBinary(b []byte) error { + var res Account + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/crm/v0.0.1/crm_models/account_basic.go b/api/crm/v0.0.1/crm_models/account_basic.go new file mode 100644 index 0000000..ccbce2d --- /dev/null +++ b/api/crm/v0.0.1/crm_models/account_basic.go @@ -0,0 +1,188 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package crm_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// AccountBasic account basic +// +// swagger:model AccountBasic +type AccountBasic struct { + + // Taxnexus Account Number of the OEM/Reseller + AccountNumber string `json:"AccountNumber,omitempty"` + + // billing address + BillingAddress *Address `json:"BillingAddress,omitempty"` + + // Contact ID + BillingContactID string `json:"BillingContactID,omitempty"` + + // Taxnexus OEM/Reseller Record Id + CompanyID string `json:"CompanyID,omitempty"` + + // The id of the Coordinate of the business establishment + CoordinateID string `json:"CoordinateID,omitempty"` + + // Taxpayer Customer Id designated by OEM/Reseller + CustomerID string `json:"CustomerID,omitempty"` + + // default address + DefaultAddress *Address `json:"DefaultAddress,omitempty"` + + // Default Backend ID + DefaultBackendID string `json:"DefaultBackendID,omitempty"` + + // Default Delivery Address Contact ID + DefaultDeliveryContactID string `json:"DefaultDeliveryContactID,omitempty"` + + // Contact ID + DefaultEndUserID string `json:"DefaultEndUserID,omitempty"` + + // Taxpayer Public Email Address + Email string `json:"Email,omitempty"` + + // Taxpayer Fax Number + Fax string `json:"Fax,omitempty"` + + // Taxpayer Account Record Id + ID string `json:"ID,omitempty"` + + // Taxpayer Account Name (ignored for Tax Processing) + Name string `json:"Name,omitempty"` + + // UUID Reference the master record that owns this item + ParentFK string `json:"ParentFK,omitempty"` + + // Taxpayer Public Phone Number + Phone string `json:"Phone,omitempty"` + + // Contact ID + PreparerID string `json:"PreparerID,omitempty"` + + // Source System identifier for this record, if any + Ref string `json:"Ref,omitempty"` + + // Shipping Address + ShippingAddress *Address `json:"ShippingAddress,omitempty"` + + // Contact ID + ShippingConactID string `json:"ShippingConactID,omitempty"` + + // Taxpayer Location Designation + Site string `json:"Site,omitempty"` + + // Tenant Identifier + TenantID string `json:"TenantID,omitempty"` + + // Account Type + Type string `json:"Type,omitempty"` + + // Taxpayer Website + Website string `json:"Website,omitempty"` +} + +// Validate validates this account basic +func (m *AccountBasic) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBillingAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDefaultAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateShippingAddress(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AccountBasic) validateBillingAddress(formats strfmt.Registry) error { + + if swag.IsZero(m.BillingAddress) { // not required + return nil + } + + if m.BillingAddress != nil { + if err := m.BillingAddress.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("BillingAddress") + } + return err + } + } + + return nil +} + +func (m *AccountBasic) validateDefaultAddress(formats strfmt.Registry) error { + + if swag.IsZero(m.DefaultAddress) { // not required + return nil + } + + if m.DefaultAddress != nil { + if err := m.DefaultAddress.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("DefaultAddress") + } + return err + } + } + + return nil +} + +func (m *AccountBasic) validateShippingAddress(formats strfmt.Registry) error { + + if swag.IsZero(m.ShippingAddress) { // not required + return nil + } + + if m.ShippingAddress != nil { + if err := m.ShippingAddress.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ShippingAddress") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *AccountBasic) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AccountBasic) UnmarshalBinary(b []byte) error { + var res AccountBasic + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/crm/v0.0.1/crm_models/account_basic_response.go b/api/crm/v0.0.1/crm_models/account_basic_response.go new file mode 100644 index 0000000..2cb6649 --- /dev/null +++ b/api/crm/v0.0.1/crm_models/account_basic_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package crm_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// AccountBasicResponse account basic response +// +// swagger:model AccountBasicResponse +type AccountBasicResponse struct { + + // data + Data []*AccountBasic `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this account basic response +func (m *AccountBasicResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AccountBasicResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *AccountBasicResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *AccountBasicResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AccountBasicResponse) UnmarshalBinary(b []byte) error { + var res AccountBasicResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/crm/v0.0.1/crm_models/account_request.go b/api/crm/v0.0.1/crm_models/account_request.go new file mode 100644 index 0000000..c55bc4c --- /dev/null +++ b/api/crm/v0.0.1/crm_models/account_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package crm_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// AccountRequest An array of Account objects with Contacts +// +// swagger:model AccountRequest +type AccountRequest struct { + + // data + Data []*Account `json:"Data"` +} + +// Validate validates this account request +func (m *AccountRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AccountRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *AccountRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AccountRequest) UnmarshalBinary(b []byte) error { + var res AccountRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/crm/v0.0.1/crm_models/account_response.go b/api/crm/v0.0.1/crm_models/account_response.go new file mode 100644 index 0000000..c2b46dc --- /dev/null +++ b/api/crm/v0.0.1/crm_models/account_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package crm_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// AccountResponse An array of Account objects with Contacts +// +// swagger:model AccountResponse +type AccountResponse struct { + + // data + Data []*Account `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this account response +func (m *AccountResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AccountResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *AccountResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *AccountResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AccountResponse) UnmarshalBinary(b []byte) error { + var res AccountResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/crm/v0.0.1/crm_models/address.go b/api/crm/v0.0.1/crm_models/address.go new file mode 100644 index 0000000..d98c3dd --- /dev/null +++ b/api/crm/v0.0.1/crm_models/address.go @@ -0,0 +1,65 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package crm_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Address address +// +// swagger:model Address +type Address struct { + + // City + City string `json:"City,omitempty"` + + // Country full name + Country string `json:"Country,omitempty"` + + // Country Code + CountryCode string `json:"CountryCode,omitempty"` + + // Postal Code + PostalCode string `json:"PostalCode,omitempty"` + + // State full name + State string `json:"State,omitempty"` + + // State Code + StateCode string `json:"StateCode,omitempty"` + + // Street number and name + Street string `json:"Street,omitempty"` +} + +// Validate validates this address +func (m *Address) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Address) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Address) UnmarshalBinary(b []byte) error { + var res Address + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/crm/v0.0.1/crm_models/company.go b/api/crm/v0.0.1/crm_models/company.go new file mode 100644 index 0000000..9777b87 --- /dev/null +++ b/api/crm/v0.0.1/crm_models/company.go @@ -0,0 +1,202 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package crm_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Company company +// +// swagger:model Company +type Company struct { + + // Taxnexus ID of the Account that owns this Company + AccountID string `json:"AccountID,omitempty"` + + // Account Number Prefix + AccountNumberPrefix string `json:"AccountNumberPrefix,omitempty"` + + // billing address + BillingAddress *Address `json:"BillingAddress,omitempty"` + + // Billing Advice + BillingAdvice string `json:"BillingAdvice,omitempty"` + + // Contact ID + BillingContactID string `json:"BillingContactID,omitempty"` + + // Billing Email + BillingEmail string `json:"BillingEmail,omitempty"` + + // Billing Phone + BillingPhone string `json:"BillingPhone,omitempty"` + + // Billing Website + BillingWebsite string `json:"BillingWebsite,omitempty"` + + // Chart of Accounts Template Account ID + COATemplateID string `json:"COATemplateID,omitempty"` + + // Color Accent1 + ColorAccent1 string `json:"ColorAccent1,omitempty"` + + // Color Accent2 + ColorAccent2 string `json:"ColorAccent2,omitempty"` + + // Color Primary + ColorPrimary string `json:"ColorPrimary,omitempty"` + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // User ID of default Customer Success user + CustomerSuccessID string `json:"CustomerSuccessID,omitempty"` + + // Date Closed + DateClosed string `json:"DateClosed,omitempty"` + + // default address + DefaultAddress *Address `json:"DefaultAddress,omitempty"` + + // Default Company? + DefaultCompany bool `json:"DefaultCompany,omitempty"` + + // Font Name for Body Text + FontBody string `json:"FontBody,omitempty"` + + // Font Name for Heading + FontHeading string `json:"FontHeading,omitempty"` + + // Font Name for Heading Narrow + FontHeadingNarrow string `json:"FontHeadingNarrow,omitempty"` + + // Font Names for CSS Link + FontLink string `json:"FontLink,omitempty"` + + // Font Name for Monospace + FontMono string `json:"FontMono,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // International Customers? + International bool `json:"International,omitempty"` + + // Last Account Number + LastAccountNumber int64 `json:"LastAccountNumber,omitempty"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Last TaxType Number + LastTaxTypeNumber int64 `json:"LastTaxTypeNumber,omitempty"` + + // Logo URL + Logo string `json:"Logo,omitempty"` + + // Company Name + Name string `json:"Name,omitempty"` + + // The ID of the contact who owns this Company + OwnerID string `json:"OwnerID,omitempty"` + + // User ID of the default tax preparer + PreparerID string `json:"PreparerID,omitempty"` + + // The ID of the default Pricebook for this company + PricebookID string `json:"PricebookID,omitempty"` + + // Tenant Identifier + TenantID string `json:"TenantID,omitempty"` + + // The ID of the contact who is the User Tech Lead for Company + UserTechLeadID string `json:"UserTechLeadID,omitempty"` +} + +// Validate validates this company +func (m *Company) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBillingAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDefaultAddress(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Company) validateBillingAddress(formats strfmt.Registry) error { + + if swag.IsZero(m.BillingAddress) { // not required + return nil + } + + if m.BillingAddress != nil { + if err := m.BillingAddress.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("BillingAddress") + } + return err + } + } + + return nil +} + +func (m *Company) validateDefaultAddress(formats strfmt.Registry) error { + + if swag.IsZero(m.DefaultAddress) { // not required + return nil + } + + if m.DefaultAddress != nil { + if err := m.DefaultAddress.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("DefaultAddress") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Company) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Company) UnmarshalBinary(b []byte) error { + var res Company + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/crm/v0.0.1/crm_models/company_request.go b/api/crm/v0.0.1/crm_models/company_request.go new file mode 100644 index 0000000..2b2988b --- /dev/null +++ b/api/crm/v0.0.1/crm_models/company_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package crm_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// CompanyRequest An array of Company objects +// +// swagger:model CompanyRequest +type CompanyRequest struct { + + // data + Data []*Company `json:"Data"` +} + +// Validate validates this company request +func (m *CompanyRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *CompanyRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *CompanyRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CompanyRequest) UnmarshalBinary(b []byte) error { + var res CompanyRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/crm/v0.0.1/crm_models/company_response.go b/api/crm/v0.0.1/crm_models/company_response.go new file mode 100644 index 0000000..89455ba --- /dev/null +++ b/api/crm/v0.0.1/crm_models/company_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package crm_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// CompanyResponse An array of Company objects +// +// swagger:model CompanyResponse +type CompanyResponse struct { + + // data + Data []*Company `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this company response +func (m *CompanyResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *CompanyResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *CompanyResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *CompanyResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CompanyResponse) UnmarshalBinary(b []byte) error { + var res CompanyResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/crm/v0.0.1/crm_models/contact.go b/api/crm/v0.0.1/crm_models/contact.go new file mode 100644 index 0000000..1c5947c --- /dev/null +++ b/api/crm/v0.0.1/crm_models/contact.go @@ -0,0 +1,229 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package crm_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Contact contact +// +// swagger:model Contact +type Contact struct { + + // The primary account ID of this contact + AccountID string `json:"AccountID,omitempty"` + + // Assistant Name + AssistantName string `json:"AssistantName,omitempty"` + + // Asst. Phone + AssistantPhone string `json:"AssistantPhone,omitempty"` + + // Birthdate + BirthDate string `json:"BirthDate,omitempty"` + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Department + Department string `json:"Department,omitempty"` + + // Description + Description string `json:"Description,omitempty"` + + // Do Not Call? + DoNotCall bool `json:"DoNotCall,omitempty"` + + // Email address + Email string `json:"Email,omitempty"` + + // Email Bounce Date + EmailBounceDate string `json:"EmailBounceDate,omitempty"` + + // Email Bounce Reason + EmailBouncedReason string `json:"EmailBouncedReason,omitempty"` + + // Taxnexus Enrollment Status + EnrollmentStatus string `json:"EnrollmentStatus,omitempty"` + + // Fax Number + Fax string `json:"Fax,omitempty"` + + // First Name + FirstName string `json:"FirstName,omitempty"` + + // Email Opt Out + HasOptedOutOfEmail bool `json:"HasOptedOutOfEmail,omitempty"` + + // Fax Opt Out + HasOptedOutOfFax bool `json:"HasOptedOutOfFax,omitempty"` + + // Home Phone + HomePhone string `json:"HomePhone,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // Does this contact have bounced emails? + IsEmailBounced bool `json:"IsEmailBounced,omitempty"` + + // Is Provisioned? + IsProvisioned bool `json:"IsProvisioned,omitempty"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Last Name + LastName string `json:"LastName,omitempty"` + + // Lead Source + LeadSource string `json:"LeadSource,omitempty"` + + // Level + Level string `json:"Level,omitempty"` + + // LinkedIn Page + LinkedIn string `json:"LinkedIn,omitempty"` + + // mailing address + MailingAddress *Address `json:"MailingAddress,omitempty"` + + // Mailing Lists + MailingLists string `json:"MailingLists,omitempty"` + + // Mobile Phone + MobilePhone string `json:"MobilePhone,omitempty"` + + // Full Name + Name string `json:"Name,omitempty"` + + // other address + OtherAddress *Address `json:"OtherAddress,omitempty"` + + // Other Phone + OtherPhone string `json:"OtherPhone,omitempty"` + + // The User ID of the user who owns this Contact + OwnerID string `json:"OwnerID,omitempty"` + + // Personal Email Address for this Contact + PersonalEmail string `json:"PersonalEmail,omitempty"` + + // Phone Number + Phone string `json:"Phone,omitempty"` + + // URL of a photograph of this User + PhotoURL string `json:"PhotoURL,omitempty"` + + // Recruiting Status + RecruitingStatus string `json:"RecruitingStatus,omitempty"` + + // External reference to this contact, if any + Ref string `json:"Ref,omitempty"` + + // Reports To Contact ID + ReportsToID string `json:"ReportsToID,omitempty"` + + // Contact Salutation + Salutation string `json:"Salutation,omitempty"` + + // The Contact Status + Status string `json:"Status,omitempty"` + + // Tenant Identifier + TenantID string `json:"TenantID,omitempty"` + + // Contact Title + Title string `json:"Title,omitempty"` + + // Contact Type + Type string `json:"Type,omitempty"` +} + +// Validate validates this contact +func (m *Contact) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMailingAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOtherAddress(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Contact) validateMailingAddress(formats strfmt.Registry) error { + + if swag.IsZero(m.MailingAddress) { // not required + return nil + } + + if m.MailingAddress != nil { + if err := m.MailingAddress.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("MailingAddress") + } + return err + } + } + + return nil +} + +func (m *Contact) validateOtherAddress(formats strfmt.Registry) error { + + if swag.IsZero(m.OtherAddress) { // not required + return nil + } + + if m.OtherAddress != nil { + if err := m.OtherAddress.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("OtherAddress") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Contact) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Contact) UnmarshalBinary(b []byte) error { + var res Contact + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/crm/v0.0.1/crm_models/contact_request.go b/api/crm/v0.0.1/crm_models/contact_request.go new file mode 100644 index 0000000..66013ea --- /dev/null +++ b/api/crm/v0.0.1/crm_models/contact_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package crm_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ContactRequest contact request +// +// swagger:model ContactRequest +type ContactRequest struct { + + // data + Data []*Contact `json:"Data"` +} + +// Validate validates this contact request +func (m *ContactRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ContactRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ContactRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ContactRequest) UnmarshalBinary(b []byte) error { + var res ContactRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/crm/v0.0.1/crm_models/contact_response.go b/api/crm/v0.0.1/crm_models/contact_response.go new file mode 100644 index 0000000..2523c48 --- /dev/null +++ b/api/crm/v0.0.1/crm_models/contact_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package crm_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ContactResponse contact response +// +// swagger:model ContactResponse +type ContactResponse struct { + + // data + Data []*Contact `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this contact response +func (m *ContactResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ContactResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ContactResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ContactResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ContactResponse) UnmarshalBinary(b []byte) error { + var res ContactResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/crm/v0.0.1/crm_models/delete_response.go b/api/crm/v0.0.1/crm_models/delete_response.go new file mode 100644 index 0000000..0c31d26 --- /dev/null +++ b/api/crm/v0.0.1/crm_models/delete_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package crm_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// DeleteResponse delete response +// +// swagger:model DeleteResponse +type DeleteResponse struct { + + // data + Data []*Message `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this delete response +func (m *DeleteResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DeleteResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *DeleteResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *DeleteResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DeleteResponse) UnmarshalBinary(b []byte) error { + var res DeleteResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/crm/v0.0.1/crm_models/error.go b/api/crm/v0.0.1/crm_models/error.go new file mode 100644 index 0000000..2c91a29 --- /dev/null +++ b/api/crm/v0.0.1/crm_models/error.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package crm_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Error error +// +// swagger:model Error +type Error struct { + + // code + Code int64 `json:"Code,omitempty"` + + // fields + Fields string `json:"Fields,omitempty"` + + // message + Message string `json:"Message,omitempty"` +} + +// Validate validates this error +func (m *Error) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Error) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Error) UnmarshalBinary(b []byte) error { + var res Error + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/crm/v0.0.1/crm_models/invalid_error.go b/api/crm/v0.0.1/crm_models/invalid_error.go new file mode 100644 index 0000000..a66045c --- /dev/null +++ b/api/crm/v0.0.1/crm_models/invalid_error.go @@ -0,0 +1,104 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package crm_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// InvalidError invalid error +// +// swagger:model InvalidError +type InvalidError struct { + Error + + // details + Details []string `json:"details"` +} + +// UnmarshalJSON unmarshals this object from a JSON structure +func (m *InvalidError) UnmarshalJSON(raw []byte) error { + // AO0 + var aO0 Error + if err := swag.ReadJSON(raw, &aO0); err != nil { + return err + } + m.Error = aO0 + + // AO1 + var dataAO1 struct { + Details []string `json:"details"` + } + if err := swag.ReadJSON(raw, &dataAO1); err != nil { + return err + } + + m.Details = dataAO1.Details + + return nil +} + +// MarshalJSON marshals this object to a JSON structure +func (m InvalidError) MarshalJSON() ([]byte, error) { + _parts := make([][]byte, 0, 2) + + aO0, err := swag.WriteJSON(m.Error) + if err != nil { + return nil, err + } + _parts = append(_parts, aO0) + var dataAO1 struct { + Details []string `json:"details"` + } + + dataAO1.Details = m.Details + + jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) + if errAO1 != nil { + return nil, errAO1 + } + _parts = append(_parts, jsonDataAO1) + return swag.ConcatJSON(_parts...), nil +} + +// Validate validates this invalid error +func (m *InvalidError) Validate(formats strfmt.Registry) error { + var res []error + + // validation for a type composition with Error + if err := m.Error.Validate(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// MarshalBinary interface implementation +func (m *InvalidError) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *InvalidError) UnmarshalBinary(b []byte) error { + var res InvalidError + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/crm/v0.0.1/crm_models/lead.go b/api/crm/v0.0.1/crm_models/lead.go new file mode 100644 index 0000000..5f78804 --- /dev/null +++ b/api/crm/v0.0.1/crm_models/lead.go @@ -0,0 +1,156 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package crm_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Lead lead +// +// swagger:model Lead +type Lead struct { + + // address + Address *Address `json:"Address,omitempty"` + + // Company + Company string `json:"Company,omitempty"` + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Description + Description string `json:"Description,omitempty"` + + // Email + Email string `json:"Email,omitempty"` + + // First Name + FirstName string `json:"FirstName,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Last Name + LastName string `json:"LastName,omitempty"` + + // Mobile + MobilePhone string `json:"MobilePhone,omitempty"` + + // Name + Name string `json:"Name,omitempty"` + + // LeadBasic Owner + OwnerID string `json:"OwnerId,omitempty"` + + // Partner Account + PartnerAccountID string `json:"PartnerAccountId,omitempty"` + + // Phone + Phone string `json:"Phone,omitempty"` + + // Product + ProductID string `json:"ProductID,omitempty"` + + // referer_url + RefererURL string `json:"RefererURL,omitempty"` + + // LeadBasic Status + Status string `json:"Status,omitempty"` + + // Tenant Identifier + TenantID string `json:"TenantID,omitempty"` + + // Title + Title string `json:"Title,omitempty"` + + // Type + Type string `json:"Type,omitempty"` + + // utm_campaign + UTMCampaign string `json:"UTMCampaign,omitempty"` + + // utm_content + UTMContent string `json:"UTMContent,omitempty"` + + // utm_medium + UTMMedium string `json:"UTMMedium,omitempty"` + + // utm_source + UTMSource string `json:"UTMSource,omitempty"` + + // utm_term + UTMTerm string `json:"UTMTerm,omitempty"` + + // Website + Website string `json:"Website,omitempty"` +} + +// Validate validates this lead +func (m *Lead) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAddress(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Lead) validateAddress(formats strfmt.Registry) error { + + if swag.IsZero(m.Address) { // not required + return nil + } + + if m.Address != nil { + if err := m.Address.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Address") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Lead) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Lead) UnmarshalBinary(b []byte) error { + var res Lead + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/crm/v0.0.1/crm_models/lead_request.go b/api/crm/v0.0.1/crm_models/lead_request.go new file mode 100644 index 0000000..51dd97a --- /dev/null +++ b/api/crm/v0.0.1/crm_models/lead_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package crm_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// LeadRequest lead request +// +// swagger:model LeadRequest +type LeadRequest struct { + + // data + Data []*Lead `json:"Data"` +} + +// Validate validates this lead request +func (m *LeadRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *LeadRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *LeadRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *LeadRequest) UnmarshalBinary(b []byte) error { + var res LeadRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/crm/v0.0.1/crm_models/lead_response.go b/api/crm/v0.0.1/crm_models/lead_response.go new file mode 100644 index 0000000..3c93260 --- /dev/null +++ b/api/crm/v0.0.1/crm_models/lead_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package crm_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// LeadResponse lead response +// +// swagger:model LeadResponse +type LeadResponse struct { + + // data + Data []*Lead `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this lead response +func (m *LeadResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *LeadResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *LeadResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *LeadResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *LeadResponse) UnmarshalBinary(b []byte) error { + var res LeadResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/crm/v0.0.1/crm_models/message.go b/api/crm/v0.0.1/crm_models/message.go new file mode 100644 index 0000000..17d286a --- /dev/null +++ b/api/crm/v0.0.1/crm_models/message.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package crm_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Message message +// +// swagger:model Message +type Message struct { + + // message + Message string `json:"message,omitempty"` + + // ref + Ref string `json:"ref,omitempty"` + + // status + Status int64 `json:"status,omitempty"` +} + +// Validate validates this message +func (m *Message) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Message) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Message) UnmarshalBinary(b []byte) error { + var res Message + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/crm/v0.0.1/crm_models/pagination.go b/api/crm/v0.0.1/crm_models/pagination.go new file mode 100644 index 0000000..d581cc4 --- /dev/null +++ b/api/crm/v0.0.1/crm_models/pagination.go @@ -0,0 +1,56 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package crm_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Pagination pagination +// +// swagger:model Pagination +type Pagination struct { + + // limit + Limit int64 `json:"limit,omitempty"` + + // pagesize + Pagesize int64 `json:"pagesize,omitempty"` + + // poffset + Poffset int64 `json:"poffset,omitempty"` + + // setsize + Setsize int64 `json:"setsize,omitempty"` +} + +// Validate validates this pagination +func (m *Pagination) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Pagination) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Pagination) UnmarshalBinary(b []byte) error { + var res Pagination + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/crm/v0.0.1/crm_models/request_meta.go b/api/crm/v0.0.1/crm_models/request_meta.go new file mode 100644 index 0000000..5985615 --- /dev/null +++ b/api/crm/v0.0.1/crm_models/request_meta.go @@ -0,0 +1,68 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package crm_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// RequestMeta request meta +// +// swagger:model RequestMeta +type RequestMeta struct { + + // Taxnexus Account Number of the Reseller or OEM + // Required: true + TaxnexusAccount *string `json:"TaxnexusAccount"` +} + +// Validate validates this request meta +func (m *RequestMeta) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTaxnexusAccount(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RequestMeta) validateTaxnexusAccount(formats strfmt.Registry) error { + + if err := validate.Required("TaxnexusAccount", "body", m.TaxnexusAccount); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *RequestMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RequestMeta) UnmarshalBinary(b []byte) error { + var res RequestMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/crm/v0.0.1/crm_models/response_meta.go b/api/crm/v0.0.1/crm_models/response_meta.go new file mode 100644 index 0000000..6faf4de --- /dev/null +++ b/api/crm/v0.0.1/crm_models/response_meta.go @@ -0,0 +1,108 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package crm_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ResponseMeta response meta +// +// swagger:model ResponseMeta +type ResponseMeta struct { + + // Microservice Contact Info + Contact string `json:"Contact,omitempty"` + + // Copyright Info + Copyright string `json:"Copyright,omitempty"` + + // License Information and Restrictions + License string `json:"License,omitempty"` + + // Operation ID + OperationID string `json:"OperationID,omitempty"` + + // pagination + Pagination *Pagination `json:"Pagination,omitempty"` + + // Request IP Address + RequestIP string `json:"RequestIP,omitempty"` + + // Request Type + RequestType string `json:"RequestType,omitempty"` + + // Request URL + RequestURL string `json:"RequestURL,omitempty"` + + // Data Server Info + ServerInfo string `json:"ServerInfo,omitempty"` + + // Data Server Response Time (ms) + ServerResponseTime string `json:"ServerResponseTime,omitempty"` + + // Backend Server Timestamp + ServerTimestamp string `json:"ServerTimestamp,omitempty"` + + // Taxnexus Account Number used for recording transactions + TaxnexusAccount string `json:"TaxnexusAccount,omitempty"` +} + +// Validate validates this response meta +func (m *ResponseMeta) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePagination(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ResponseMeta) validatePagination(formats strfmt.Registry) error { + + if swag.IsZero(m.Pagination) { // not required + return nil + } + + if m.Pagination != nil { + if err := m.Pagination.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Pagination") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ResponseMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ResponseMeta) UnmarshalBinary(b []byte) error { + var res ResponseMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_client/authority/authority_client.go b/api/devops/regs_client/authority/authority_client.go new file mode 100644 index 0000000..f73fae8 --- /dev/null +++ b/api/devops/regs_client/authority/authority_client.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package authority + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new authority API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for authority API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetAuthorities(params *GetAuthoritiesParams, authInfo runtime.ClientAuthInfoWriter) (*GetAuthoritiesOK, error) + + PostAuthorities(params *PostAuthoritiesParams, authInfo runtime.ClientAuthInfoWriter) (*PostAuthoritiesOK, error) + + PutAuthorities(params *PutAuthoritiesParams, authInfo runtime.ClientAuthInfoWriter) (*PutAuthoritiesOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetAuthorities gets a list of authorities + + Return a list of available Authorities +*/ +func (a *Client) GetAuthorities(params *GetAuthoritiesParams, authInfo runtime.ClientAuthInfoWriter) (*GetAuthoritiesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetAuthoritiesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getAuthorities", + Method: "GET", + PathPattern: "/authorities", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetAuthoritiesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetAuthoritiesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getAuthorities: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostAuthorities adds new authorities + + Create new Authorities +*/ +func (a *Client) PostAuthorities(params *PostAuthoritiesParams, authInfo runtime.ClientAuthInfoWriter) (*PostAuthoritiesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostAuthoritiesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postAuthorities", + Method: "POST", + PathPattern: "/authorities", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostAuthoritiesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostAuthoritiesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postAuthorities: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PutAuthorities updates authorities + + Update fields in an Authority record identified by Taxnexus Id +*/ +func (a *Client) PutAuthorities(params *PutAuthoritiesParams, authInfo runtime.ClientAuthInfoWriter) (*PutAuthoritiesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPutAuthoritiesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "putAuthorities", + Method: "PUT", + PathPattern: "/authorities", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PutAuthoritiesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PutAuthoritiesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for putAuthorities: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/devops/regs_client/authority/get_authorities_parameters.go b/api/devops/regs_client/authority/get_authorities_parameters.go new file mode 100644 index 0000000..529da56 --- /dev/null +++ b/api/devops/regs_client/authority/get_authorities_parameters.go @@ -0,0 +1,215 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package authority + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetAuthoritiesParams creates a new GetAuthoritiesParams object +// with the default values initialized. +func NewGetAuthoritiesParams() *GetAuthoritiesParams { + var () + return &GetAuthoritiesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetAuthoritiesParamsWithTimeout creates a new GetAuthoritiesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetAuthoritiesParamsWithTimeout(timeout time.Duration) *GetAuthoritiesParams { + var () + return &GetAuthoritiesParams{ + + timeout: timeout, + } +} + +// NewGetAuthoritiesParamsWithContext creates a new GetAuthoritiesParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetAuthoritiesParamsWithContext(ctx context.Context) *GetAuthoritiesParams { + var () + return &GetAuthoritiesParams{ + + Context: ctx, + } +} + +// NewGetAuthoritiesParamsWithHTTPClient creates a new GetAuthoritiesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetAuthoritiesParamsWithHTTPClient(client *http.Client) *GetAuthoritiesParams { + var () + return &GetAuthoritiesParams{ + HTTPClient: client, + } +} + +/*GetAuthoritiesParams contains all the parameters to send to the API endpoint +for the get authorities operation typically these are written to a http.Request +*/ +type GetAuthoritiesParams struct { + + /*AuthorityID + Taxnexus Id of the Authority to be retrieved + + */ + AuthorityID *string + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get authorities params +func (o *GetAuthoritiesParams) WithTimeout(timeout time.Duration) *GetAuthoritiesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get authorities params +func (o *GetAuthoritiesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get authorities params +func (o *GetAuthoritiesParams) WithContext(ctx context.Context) *GetAuthoritiesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get authorities params +func (o *GetAuthoritiesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get authorities params +func (o *GetAuthoritiesParams) WithHTTPClient(client *http.Client) *GetAuthoritiesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get authorities params +func (o *GetAuthoritiesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAuthorityID adds the authorityID to the get authorities params +func (o *GetAuthoritiesParams) WithAuthorityID(authorityID *string) *GetAuthoritiesParams { + o.SetAuthorityID(authorityID) + return o +} + +// SetAuthorityID adds the authorityId to the get authorities params +func (o *GetAuthoritiesParams) SetAuthorityID(authorityID *string) { + o.AuthorityID = authorityID +} + +// WithLimit adds the limit to the get authorities params +func (o *GetAuthoritiesParams) WithLimit(limit *int64) *GetAuthoritiesParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get authorities params +func (o *GetAuthoritiesParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get authorities params +func (o *GetAuthoritiesParams) WithOffset(offset *int64) *GetAuthoritiesParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get authorities params +func (o *GetAuthoritiesParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *GetAuthoritiesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AuthorityID != nil { + + // query param authorityId + var qrAuthorityID string + if o.AuthorityID != nil { + qrAuthorityID = *o.AuthorityID + } + qAuthorityID := qrAuthorityID + if qAuthorityID != "" { + if err := r.SetQueryParam("authorityId", qAuthorityID); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/authority/get_authorities_responses.go b/api/devops/regs_client/authority/get_authorities_responses.go new file mode 100644 index 0000000..c180f6e --- /dev/null +++ b/api/devops/regs_client/authority/get_authorities_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package authority + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// GetAuthoritiesReader is a Reader for the GetAuthorities structure. +type GetAuthoritiesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetAuthoritiesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetAuthoritiesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetAuthoritiesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetAuthoritiesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetAuthoritiesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetAuthoritiesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetAuthoritiesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetAuthoritiesOK creates a GetAuthoritiesOK with default headers values +func NewGetAuthoritiesOK() *GetAuthoritiesOK { + return &GetAuthoritiesOK{} +} + +/*GetAuthoritiesOK handles this case with default header values. + +Taxnexus Response with an array of Authority objects +*/ +type GetAuthoritiesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *regs_models.AuthorityResponse +} + +func (o *GetAuthoritiesOK) Error() string { + return fmt.Sprintf("[GET /authorities][%d] getAuthoritiesOK %+v", 200, o.Payload) +} + +func (o *GetAuthoritiesOK) GetPayload() *regs_models.AuthorityResponse { + return o.Payload +} + +func (o *GetAuthoritiesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(regs_models.AuthorityResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAuthoritiesUnauthorized creates a GetAuthoritiesUnauthorized with default headers values +func NewGetAuthoritiesUnauthorized() *GetAuthoritiesUnauthorized { + return &GetAuthoritiesUnauthorized{} +} + +/*GetAuthoritiesUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetAuthoritiesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetAuthoritiesUnauthorized) Error() string { + return fmt.Sprintf("[GET /authorities][%d] getAuthoritiesUnauthorized %+v", 401, o.Payload) +} + +func (o *GetAuthoritiesUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetAuthoritiesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAuthoritiesForbidden creates a GetAuthoritiesForbidden with default headers values +func NewGetAuthoritiesForbidden() *GetAuthoritiesForbidden { + return &GetAuthoritiesForbidden{} +} + +/*GetAuthoritiesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetAuthoritiesForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetAuthoritiesForbidden) Error() string { + return fmt.Sprintf("[GET /authorities][%d] getAuthoritiesForbidden %+v", 403, o.Payload) +} + +func (o *GetAuthoritiesForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetAuthoritiesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAuthoritiesNotFound creates a GetAuthoritiesNotFound with default headers values +func NewGetAuthoritiesNotFound() *GetAuthoritiesNotFound { + return &GetAuthoritiesNotFound{} +} + +/*GetAuthoritiesNotFound handles this case with default header values. + +Resource was not found +*/ +type GetAuthoritiesNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetAuthoritiesNotFound) Error() string { + return fmt.Sprintf("[GET /authorities][%d] getAuthoritiesNotFound %+v", 404, o.Payload) +} + +func (o *GetAuthoritiesNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetAuthoritiesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAuthoritiesUnprocessableEntity creates a GetAuthoritiesUnprocessableEntity with default headers values +func NewGetAuthoritiesUnprocessableEntity() *GetAuthoritiesUnprocessableEntity { + return &GetAuthoritiesUnprocessableEntity{} +} + +/*GetAuthoritiesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetAuthoritiesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetAuthoritiesUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /authorities][%d] getAuthoritiesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetAuthoritiesUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetAuthoritiesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAuthoritiesInternalServerError creates a GetAuthoritiesInternalServerError with default headers values +func NewGetAuthoritiesInternalServerError() *GetAuthoritiesInternalServerError { + return &GetAuthoritiesInternalServerError{} +} + +/*GetAuthoritiesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetAuthoritiesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetAuthoritiesInternalServerError) Error() string { + return fmt.Sprintf("[GET /authorities][%d] getAuthoritiesInternalServerError %+v", 500, o.Payload) +} + +func (o *GetAuthoritiesInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetAuthoritiesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/authority/post_authorities_parameters.go b/api/devops/regs_client/authority/post_authorities_parameters.go new file mode 100644 index 0000000..3a26431 --- /dev/null +++ b/api/devops/regs_client/authority/post_authorities_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package authority + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// NewPostAuthoritiesParams creates a new PostAuthoritiesParams object +// with the default values initialized. +func NewPostAuthoritiesParams() *PostAuthoritiesParams { + var () + return &PostAuthoritiesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostAuthoritiesParamsWithTimeout creates a new PostAuthoritiesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostAuthoritiesParamsWithTimeout(timeout time.Duration) *PostAuthoritiesParams { + var () + return &PostAuthoritiesParams{ + + timeout: timeout, + } +} + +// NewPostAuthoritiesParamsWithContext creates a new PostAuthoritiesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostAuthoritiesParamsWithContext(ctx context.Context) *PostAuthoritiesParams { + var () + return &PostAuthoritiesParams{ + + Context: ctx, + } +} + +// NewPostAuthoritiesParamsWithHTTPClient creates a new PostAuthoritiesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostAuthoritiesParamsWithHTTPClient(client *http.Client) *PostAuthoritiesParams { + var () + return &PostAuthoritiesParams{ + HTTPClient: client, + } +} + +/*PostAuthoritiesParams contains all the parameters to send to the API endpoint +for the post authorities operation typically these are written to a http.Request +*/ +type PostAuthoritiesParams struct { + + /*AuthorityRequest + A request with an array of Authority Objects + + */ + AuthorityRequest *regs_models.AuthorityRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post authorities params +func (o *PostAuthoritiesParams) WithTimeout(timeout time.Duration) *PostAuthoritiesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post authorities params +func (o *PostAuthoritiesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post authorities params +func (o *PostAuthoritiesParams) WithContext(ctx context.Context) *PostAuthoritiesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post authorities params +func (o *PostAuthoritiesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post authorities params +func (o *PostAuthoritiesParams) WithHTTPClient(client *http.Client) *PostAuthoritiesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post authorities params +func (o *PostAuthoritiesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAuthorityRequest adds the authorityRequest to the post authorities params +func (o *PostAuthoritiesParams) WithAuthorityRequest(authorityRequest *regs_models.AuthorityRequest) *PostAuthoritiesParams { + o.SetAuthorityRequest(authorityRequest) + return o +} + +// SetAuthorityRequest adds the authorityRequest to the post authorities params +func (o *PostAuthoritiesParams) SetAuthorityRequest(authorityRequest *regs_models.AuthorityRequest) { + o.AuthorityRequest = authorityRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostAuthoritiesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AuthorityRequest != nil { + if err := r.SetBodyParam(o.AuthorityRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/authority/post_authorities_responses.go b/api/devops/regs_client/authority/post_authorities_responses.go new file mode 100644 index 0000000..fdb668d --- /dev/null +++ b/api/devops/regs_client/authority/post_authorities_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package authority + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// PostAuthoritiesReader is a Reader for the PostAuthorities structure. +type PostAuthoritiesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostAuthoritiesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostAuthoritiesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostAuthoritiesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostAuthoritiesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostAuthoritiesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostAuthoritiesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostAuthoritiesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostAuthoritiesOK creates a PostAuthoritiesOK with default headers values +func NewPostAuthoritiesOK() *PostAuthoritiesOK { + return &PostAuthoritiesOK{} +} + +/*PostAuthoritiesOK handles this case with default header values. + +Taxnexus Response with an array of Authority objects +*/ +type PostAuthoritiesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *regs_models.AuthorityResponse +} + +func (o *PostAuthoritiesOK) Error() string { + return fmt.Sprintf("[POST /authorities][%d] postAuthoritiesOK %+v", 200, o.Payload) +} + +func (o *PostAuthoritiesOK) GetPayload() *regs_models.AuthorityResponse { + return o.Payload +} + +func (o *PostAuthoritiesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(regs_models.AuthorityResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostAuthoritiesUnauthorized creates a PostAuthoritiesUnauthorized with default headers values +func NewPostAuthoritiesUnauthorized() *PostAuthoritiesUnauthorized { + return &PostAuthoritiesUnauthorized{} +} + +/*PostAuthoritiesUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostAuthoritiesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostAuthoritiesUnauthorized) Error() string { + return fmt.Sprintf("[POST /authorities][%d] postAuthoritiesUnauthorized %+v", 401, o.Payload) +} + +func (o *PostAuthoritiesUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostAuthoritiesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostAuthoritiesForbidden creates a PostAuthoritiesForbidden with default headers values +func NewPostAuthoritiesForbidden() *PostAuthoritiesForbidden { + return &PostAuthoritiesForbidden{} +} + +/*PostAuthoritiesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostAuthoritiesForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostAuthoritiesForbidden) Error() string { + return fmt.Sprintf("[POST /authorities][%d] postAuthoritiesForbidden %+v", 403, o.Payload) +} + +func (o *PostAuthoritiesForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostAuthoritiesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostAuthoritiesNotFound creates a PostAuthoritiesNotFound with default headers values +func NewPostAuthoritiesNotFound() *PostAuthoritiesNotFound { + return &PostAuthoritiesNotFound{} +} + +/*PostAuthoritiesNotFound handles this case with default header values. + +Resource was not found +*/ +type PostAuthoritiesNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostAuthoritiesNotFound) Error() string { + return fmt.Sprintf("[POST /authorities][%d] postAuthoritiesNotFound %+v", 404, o.Payload) +} + +func (o *PostAuthoritiesNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostAuthoritiesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostAuthoritiesUnprocessableEntity creates a PostAuthoritiesUnprocessableEntity with default headers values +func NewPostAuthoritiesUnprocessableEntity() *PostAuthoritiesUnprocessableEntity { + return &PostAuthoritiesUnprocessableEntity{} +} + +/*PostAuthoritiesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostAuthoritiesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostAuthoritiesUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /authorities][%d] postAuthoritiesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostAuthoritiesUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostAuthoritiesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostAuthoritiesInternalServerError creates a PostAuthoritiesInternalServerError with default headers values +func NewPostAuthoritiesInternalServerError() *PostAuthoritiesInternalServerError { + return &PostAuthoritiesInternalServerError{} +} + +/*PostAuthoritiesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostAuthoritiesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostAuthoritiesInternalServerError) Error() string { + return fmt.Sprintf("[POST /authorities][%d] postAuthoritiesInternalServerError %+v", 500, o.Payload) +} + +func (o *PostAuthoritiesInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostAuthoritiesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/authority/put_authorities_parameters.go b/api/devops/regs_client/authority/put_authorities_parameters.go new file mode 100644 index 0000000..e7d7169 --- /dev/null +++ b/api/devops/regs_client/authority/put_authorities_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package authority + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// NewPutAuthoritiesParams creates a new PutAuthoritiesParams object +// with the default values initialized. +func NewPutAuthoritiesParams() *PutAuthoritiesParams { + var () + return &PutAuthoritiesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPutAuthoritiesParamsWithTimeout creates a new PutAuthoritiesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPutAuthoritiesParamsWithTimeout(timeout time.Duration) *PutAuthoritiesParams { + var () + return &PutAuthoritiesParams{ + + timeout: timeout, + } +} + +// NewPutAuthoritiesParamsWithContext creates a new PutAuthoritiesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPutAuthoritiesParamsWithContext(ctx context.Context) *PutAuthoritiesParams { + var () + return &PutAuthoritiesParams{ + + Context: ctx, + } +} + +// NewPutAuthoritiesParamsWithHTTPClient creates a new PutAuthoritiesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPutAuthoritiesParamsWithHTTPClient(client *http.Client) *PutAuthoritiesParams { + var () + return &PutAuthoritiesParams{ + HTTPClient: client, + } +} + +/*PutAuthoritiesParams contains all the parameters to send to the API endpoint +for the put authorities operation typically these are written to a http.Request +*/ +type PutAuthoritiesParams struct { + + /*AuthorityRequest + A request with an array of Authority Objects + + */ + AuthorityRequest *regs_models.AuthorityRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the put authorities params +func (o *PutAuthoritiesParams) WithTimeout(timeout time.Duration) *PutAuthoritiesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the put authorities params +func (o *PutAuthoritiesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the put authorities params +func (o *PutAuthoritiesParams) WithContext(ctx context.Context) *PutAuthoritiesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the put authorities params +func (o *PutAuthoritiesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the put authorities params +func (o *PutAuthoritiesParams) WithHTTPClient(client *http.Client) *PutAuthoritiesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the put authorities params +func (o *PutAuthoritiesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAuthorityRequest adds the authorityRequest to the put authorities params +func (o *PutAuthoritiesParams) WithAuthorityRequest(authorityRequest *regs_models.AuthorityRequest) *PutAuthoritiesParams { + o.SetAuthorityRequest(authorityRequest) + return o +} + +// SetAuthorityRequest adds the authorityRequest to the put authorities params +func (o *PutAuthoritiesParams) SetAuthorityRequest(authorityRequest *regs_models.AuthorityRequest) { + o.AuthorityRequest = authorityRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PutAuthoritiesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AuthorityRequest != nil { + if err := r.SetBodyParam(o.AuthorityRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/authority/put_authorities_responses.go b/api/devops/regs_client/authority/put_authorities_responses.go new file mode 100644 index 0000000..524514b --- /dev/null +++ b/api/devops/regs_client/authority/put_authorities_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package authority + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// PutAuthoritiesReader is a Reader for the PutAuthorities structure. +type PutAuthoritiesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PutAuthoritiesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPutAuthoritiesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPutAuthoritiesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPutAuthoritiesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPutAuthoritiesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPutAuthoritiesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPutAuthoritiesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPutAuthoritiesOK creates a PutAuthoritiesOK with default headers values +func NewPutAuthoritiesOK() *PutAuthoritiesOK { + return &PutAuthoritiesOK{} +} + +/*PutAuthoritiesOK handles this case with default header values. + +Taxnexus Response with an array of Authority objects +*/ +type PutAuthoritiesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *regs_models.AuthorityResponse +} + +func (o *PutAuthoritiesOK) Error() string { + return fmt.Sprintf("[PUT /authorities][%d] putAuthoritiesOK %+v", 200, o.Payload) +} + +func (o *PutAuthoritiesOK) GetPayload() *regs_models.AuthorityResponse { + return o.Payload +} + +func (o *PutAuthoritiesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(regs_models.AuthorityResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutAuthoritiesUnauthorized creates a PutAuthoritiesUnauthorized with default headers values +func NewPutAuthoritiesUnauthorized() *PutAuthoritiesUnauthorized { + return &PutAuthoritiesUnauthorized{} +} + +/*PutAuthoritiesUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PutAuthoritiesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutAuthoritiesUnauthorized) Error() string { + return fmt.Sprintf("[PUT /authorities][%d] putAuthoritiesUnauthorized %+v", 401, o.Payload) +} + +func (o *PutAuthoritiesUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutAuthoritiesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutAuthoritiesForbidden creates a PutAuthoritiesForbidden with default headers values +func NewPutAuthoritiesForbidden() *PutAuthoritiesForbidden { + return &PutAuthoritiesForbidden{} +} + +/*PutAuthoritiesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PutAuthoritiesForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutAuthoritiesForbidden) Error() string { + return fmt.Sprintf("[PUT /authorities][%d] putAuthoritiesForbidden %+v", 403, o.Payload) +} + +func (o *PutAuthoritiesForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutAuthoritiesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutAuthoritiesNotFound creates a PutAuthoritiesNotFound with default headers values +func NewPutAuthoritiesNotFound() *PutAuthoritiesNotFound { + return &PutAuthoritiesNotFound{} +} + +/*PutAuthoritiesNotFound handles this case with default header values. + +Resource was not found +*/ +type PutAuthoritiesNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutAuthoritiesNotFound) Error() string { + return fmt.Sprintf("[PUT /authorities][%d] putAuthoritiesNotFound %+v", 404, o.Payload) +} + +func (o *PutAuthoritiesNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutAuthoritiesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutAuthoritiesUnprocessableEntity creates a PutAuthoritiesUnprocessableEntity with default headers values +func NewPutAuthoritiesUnprocessableEntity() *PutAuthoritiesUnprocessableEntity { + return &PutAuthoritiesUnprocessableEntity{} +} + +/*PutAuthoritiesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PutAuthoritiesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutAuthoritiesUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /authorities][%d] putAuthoritiesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutAuthoritiesUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutAuthoritiesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutAuthoritiesInternalServerError creates a PutAuthoritiesInternalServerError with default headers values +func NewPutAuthoritiesInternalServerError() *PutAuthoritiesInternalServerError { + return &PutAuthoritiesInternalServerError{} +} + +/*PutAuthoritiesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PutAuthoritiesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutAuthoritiesInternalServerError) Error() string { + return fmt.Sprintf("[PUT /authorities][%d] putAuthoritiesInternalServerError %+v", 500, o.Payload) +} + +func (o *PutAuthoritiesInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutAuthoritiesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/backend/backend_client.go b/api/devops/regs_client/backend/backend_client.go new file mode 100644 index 0000000..ac0e37d --- /dev/null +++ b/api/devops/regs_client/backend/backend_client.go @@ -0,0 +1,196 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package backend + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new backend API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for backend API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + DeleteBackend(params *DeleteBackendParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteBackendOK, error) + + GetBackends(params *GetBackendsParams, authInfo runtime.ClientAuthInfoWriter) (*GetBackendsOK, error) + + PostBackends(params *PostBackendsParams, authInfo runtime.ClientAuthInfoWriter) (*PostBackendsOK, error) + + PutBackends(params *PutBackendsParams, authInfo runtime.ClientAuthInfoWriter) (*PutBackendsOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + DeleteBackend deletes a backend + + Delete Taxnexus Backend record +*/ +func (a *Client) DeleteBackend(params *DeleteBackendParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteBackendOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDeleteBackendParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "deleteBackend", + Method: "DELETE", + PathPattern: "/backends", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &DeleteBackendReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*DeleteBackendOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for deleteBackend: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetBackends gets a list of backends + + Return a list of Backends +*/ +func (a *Client) GetBackends(params *GetBackendsParams, authInfo runtime.ClientAuthInfoWriter) (*GetBackendsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetBackendsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getBackends", + Method: "GET", + PathPattern: "/backends", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetBackendsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetBackendsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getBackends: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostBackends adds new backends + + Contact record to be added +*/ +func (a *Client) PostBackends(params *PostBackendsParams, authInfo runtime.ClientAuthInfoWriter) (*PostBackendsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostBackendsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postBackends", + Method: "POST", + PathPattern: "/backends", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostBackendsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostBackendsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postBackends: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PutBackends updates backends + + Update Backend records +*/ +func (a *Client) PutBackends(params *PutBackendsParams, authInfo runtime.ClientAuthInfoWriter) (*PutBackendsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPutBackendsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "putBackends", + Method: "PUT", + PathPattern: "/backends", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PutBackendsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PutBackendsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for putBackends: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/devops/regs_client/backend/delete_backend_parameters.go b/api/devops/regs_client/backend/delete_backend_parameters.go new file mode 100644 index 0000000..e6d6a92 --- /dev/null +++ b/api/devops/regs_client/backend/delete_backend_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package backend + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewDeleteBackendParams creates a new DeleteBackendParams object +// with the default values initialized. +func NewDeleteBackendParams() *DeleteBackendParams { + var () + return &DeleteBackendParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewDeleteBackendParamsWithTimeout creates a new DeleteBackendParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewDeleteBackendParamsWithTimeout(timeout time.Duration) *DeleteBackendParams { + var () + return &DeleteBackendParams{ + + timeout: timeout, + } +} + +// NewDeleteBackendParamsWithContext creates a new DeleteBackendParams object +// with the default values initialized, and the ability to set a context for a request +func NewDeleteBackendParamsWithContext(ctx context.Context) *DeleteBackendParams { + var () + return &DeleteBackendParams{ + + Context: ctx, + } +} + +// NewDeleteBackendParamsWithHTTPClient creates a new DeleteBackendParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewDeleteBackendParamsWithHTTPClient(client *http.Client) *DeleteBackendParams { + var () + return &DeleteBackendParams{ + HTTPClient: client, + } +} + +/*DeleteBackendParams contains all the parameters to send to the API endpoint +for the delete backend operation typically these are written to a http.Request +*/ +type DeleteBackendParams struct { + + /*BackendID + Taxnexus Id of the Backend to be retrieved + + */ + BackendID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the delete backend params +func (o *DeleteBackendParams) WithTimeout(timeout time.Duration) *DeleteBackendParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the delete backend params +func (o *DeleteBackendParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the delete backend params +func (o *DeleteBackendParams) WithContext(ctx context.Context) *DeleteBackendParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the delete backend params +func (o *DeleteBackendParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the delete backend params +func (o *DeleteBackendParams) WithHTTPClient(client *http.Client) *DeleteBackendParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the delete backend params +func (o *DeleteBackendParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBackendID adds the backendID to the delete backend params +func (o *DeleteBackendParams) WithBackendID(backendID *string) *DeleteBackendParams { + o.SetBackendID(backendID) + return o +} + +// SetBackendID adds the backendId to the delete backend params +func (o *DeleteBackendParams) SetBackendID(backendID *string) { + o.BackendID = backendID +} + +// WriteToRequest writes these params to a swagger request +func (o *DeleteBackendParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.BackendID != nil { + + // query param backendId + var qrBackendID string + if o.BackendID != nil { + qrBackendID = *o.BackendID + } + qBackendID := qrBackendID + if qBackendID != "" { + if err := r.SetQueryParam("backendId", qBackendID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/backend/delete_backend_responses.go b/api/devops/regs_client/backend/delete_backend_responses.go new file mode 100644 index 0000000..0d61894 --- /dev/null +++ b/api/devops/regs_client/backend/delete_backend_responses.go @@ -0,0 +1,298 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package backend + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// DeleteBackendReader is a Reader for the DeleteBackend structure. +type DeleteBackendReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DeleteBackendReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDeleteBackendOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewDeleteBackendUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewDeleteBackendForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewDeleteBackendNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewDeleteBackendUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewDeleteBackendInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewDeleteBackendOK creates a DeleteBackendOK with default headers values +func NewDeleteBackendOK() *DeleteBackendOK { + return &DeleteBackendOK{} +} + +/*DeleteBackendOK handles this case with default header values. + +Taxnexus Response with Message Objects with Delete Status +*/ +type DeleteBackendOK struct { + AccessControlAllowOrigin string + + Payload *regs_models.DeleteResponse +} + +func (o *DeleteBackendOK) Error() string { + return fmt.Sprintf("[DELETE /backends][%d] deleteBackendOK %+v", 200, o.Payload) +} + +func (o *DeleteBackendOK) GetPayload() *regs_models.DeleteResponse { + return o.Payload +} + +func (o *DeleteBackendOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.DeleteResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteBackendUnauthorized creates a DeleteBackendUnauthorized with default headers values +func NewDeleteBackendUnauthorized() *DeleteBackendUnauthorized { + return &DeleteBackendUnauthorized{} +} + +/*DeleteBackendUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type DeleteBackendUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *DeleteBackendUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /backends][%d] deleteBackendUnauthorized %+v", 401, o.Payload) +} + +func (o *DeleteBackendUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *DeleteBackendUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteBackendForbidden creates a DeleteBackendForbidden with default headers values +func NewDeleteBackendForbidden() *DeleteBackendForbidden { + return &DeleteBackendForbidden{} +} + +/*DeleteBackendForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type DeleteBackendForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *DeleteBackendForbidden) Error() string { + return fmt.Sprintf("[DELETE /backends][%d] deleteBackendForbidden %+v", 403, o.Payload) +} + +func (o *DeleteBackendForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *DeleteBackendForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteBackendNotFound creates a DeleteBackendNotFound with default headers values +func NewDeleteBackendNotFound() *DeleteBackendNotFound { + return &DeleteBackendNotFound{} +} + +/*DeleteBackendNotFound handles this case with default header values. + +Resource was not found +*/ +type DeleteBackendNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *DeleteBackendNotFound) Error() string { + return fmt.Sprintf("[DELETE /backends][%d] deleteBackendNotFound %+v", 404, o.Payload) +} + +func (o *DeleteBackendNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *DeleteBackendNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteBackendUnprocessableEntity creates a DeleteBackendUnprocessableEntity with default headers values +func NewDeleteBackendUnprocessableEntity() *DeleteBackendUnprocessableEntity { + return &DeleteBackendUnprocessableEntity{} +} + +/*DeleteBackendUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type DeleteBackendUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *DeleteBackendUnprocessableEntity) Error() string { + return fmt.Sprintf("[DELETE /backends][%d] deleteBackendUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *DeleteBackendUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *DeleteBackendUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteBackendInternalServerError creates a DeleteBackendInternalServerError with default headers values +func NewDeleteBackendInternalServerError() *DeleteBackendInternalServerError { + return &DeleteBackendInternalServerError{} +} + +/*DeleteBackendInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type DeleteBackendInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *DeleteBackendInternalServerError) Error() string { + return fmt.Sprintf("[DELETE /backends][%d] deleteBackendInternalServerError %+v", 500, o.Payload) +} + +func (o *DeleteBackendInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *DeleteBackendInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/backend/get_backends_parameters.go b/api/devops/regs_client/backend/get_backends_parameters.go new file mode 100644 index 0000000..8374280 --- /dev/null +++ b/api/devops/regs_client/backend/get_backends_parameters.go @@ -0,0 +1,343 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package backend + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetBackendsParams creates a new GetBackendsParams object +// with the default values initialized. +func NewGetBackendsParams() *GetBackendsParams { + var () + return &GetBackendsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetBackendsParamsWithTimeout creates a new GetBackendsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetBackendsParamsWithTimeout(timeout time.Duration) *GetBackendsParams { + var () + return &GetBackendsParams{ + + timeout: timeout, + } +} + +// NewGetBackendsParamsWithContext creates a new GetBackendsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetBackendsParamsWithContext(ctx context.Context) *GetBackendsParams { + var () + return &GetBackendsParams{ + + Context: ctx, + } +} + +// NewGetBackendsParamsWithHTTPClient creates a new GetBackendsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetBackendsParamsWithHTTPClient(client *http.Client) *GetBackendsParams { + var () + return &GetBackendsParams{ + HTTPClient: client, + } +} + +/*GetBackendsParams contains all the parameters to send to the API endpoint +for the get backends operation typically these are written to a http.Request +*/ +type GetBackendsParams struct { + + /*AccountID + Taxnexus Record Id of an Account + + */ + AccountID *string + /*AccountNumber + The Taxnexus Account Number of the Account to be used a record retrieval + + */ + AccountNumber *string + /*BackendID + Taxnexus Id of the Backend to be retrieved + + */ + BackendID *string + /*CompanyID + Taxnexus Record Id of a Company + + */ + CompanyID *string + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Name + The Name of this Object + + */ + Name *string + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get backends params +func (o *GetBackendsParams) WithTimeout(timeout time.Duration) *GetBackendsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get backends params +func (o *GetBackendsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get backends params +func (o *GetBackendsParams) WithContext(ctx context.Context) *GetBackendsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get backends params +func (o *GetBackendsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get backends params +func (o *GetBackendsParams) WithHTTPClient(client *http.Client) *GetBackendsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get backends params +func (o *GetBackendsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAccountID adds the accountID to the get backends params +func (o *GetBackendsParams) WithAccountID(accountID *string) *GetBackendsParams { + o.SetAccountID(accountID) + return o +} + +// SetAccountID adds the accountId to the get backends params +func (o *GetBackendsParams) SetAccountID(accountID *string) { + o.AccountID = accountID +} + +// WithAccountNumber adds the accountNumber to the get backends params +func (o *GetBackendsParams) WithAccountNumber(accountNumber *string) *GetBackendsParams { + o.SetAccountNumber(accountNumber) + return o +} + +// SetAccountNumber adds the accountNumber to the get backends params +func (o *GetBackendsParams) SetAccountNumber(accountNumber *string) { + o.AccountNumber = accountNumber +} + +// WithBackendID adds the backendID to the get backends params +func (o *GetBackendsParams) WithBackendID(backendID *string) *GetBackendsParams { + o.SetBackendID(backendID) + return o +} + +// SetBackendID adds the backendId to the get backends params +func (o *GetBackendsParams) SetBackendID(backendID *string) { + o.BackendID = backendID +} + +// WithCompanyID adds the companyID to the get backends params +func (o *GetBackendsParams) WithCompanyID(companyID *string) *GetBackendsParams { + o.SetCompanyID(companyID) + return o +} + +// SetCompanyID adds the companyId to the get backends params +func (o *GetBackendsParams) SetCompanyID(companyID *string) { + o.CompanyID = companyID +} + +// WithLimit adds the limit to the get backends params +func (o *GetBackendsParams) WithLimit(limit *int64) *GetBackendsParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get backends params +func (o *GetBackendsParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithName adds the name to the get backends params +func (o *GetBackendsParams) WithName(name *string) *GetBackendsParams { + o.SetName(name) + return o +} + +// SetName adds the name to the get backends params +func (o *GetBackendsParams) SetName(name *string) { + o.Name = name +} + +// WithOffset adds the offset to the get backends params +func (o *GetBackendsParams) WithOffset(offset *int64) *GetBackendsParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get backends params +func (o *GetBackendsParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *GetBackendsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AccountID != nil { + + // query param accountId + var qrAccountID string + if o.AccountID != nil { + qrAccountID = *o.AccountID + } + qAccountID := qrAccountID + if qAccountID != "" { + if err := r.SetQueryParam("accountId", qAccountID); err != nil { + return err + } + } + + } + + if o.AccountNumber != nil { + + // query param accountNumber + var qrAccountNumber string + if o.AccountNumber != nil { + qrAccountNumber = *o.AccountNumber + } + qAccountNumber := qrAccountNumber + if qAccountNumber != "" { + if err := r.SetQueryParam("accountNumber", qAccountNumber); err != nil { + return err + } + } + + } + + if o.BackendID != nil { + + // query param backendId + var qrBackendID string + if o.BackendID != nil { + qrBackendID = *o.BackendID + } + qBackendID := qrBackendID + if qBackendID != "" { + if err := r.SetQueryParam("backendId", qBackendID); err != nil { + return err + } + } + + } + + if o.CompanyID != nil { + + // query param companyId + var qrCompanyID string + if o.CompanyID != nil { + qrCompanyID = *o.CompanyID + } + qCompanyID := qrCompanyID + if qCompanyID != "" { + if err := r.SetQueryParam("companyId", qCompanyID); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Name != nil { + + // query param name + var qrName string + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/backend/get_backends_responses.go b/api/devops/regs_client/backend/get_backends_responses.go new file mode 100644 index 0000000..9d3ea16 --- /dev/null +++ b/api/devops/regs_client/backend/get_backends_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package backend + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// GetBackendsReader is a Reader for the GetBackends structure. +type GetBackendsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetBackendsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetBackendsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetBackendsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetBackendsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetBackendsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetBackendsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetBackendsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetBackendsOK creates a GetBackendsOK with default headers values +func NewGetBackendsOK() *GetBackendsOK { + return &GetBackendsOK{} +} + +/*GetBackendsOK handles this case with default header values. + +Taxnexus Response with an array of Backend Objects +*/ +type GetBackendsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *regs_models.BackendResponse +} + +func (o *GetBackendsOK) Error() string { + return fmt.Sprintf("[GET /backends][%d] getBackendsOK %+v", 200, o.Payload) +} + +func (o *GetBackendsOK) GetPayload() *regs_models.BackendResponse { + return o.Payload +} + +func (o *GetBackendsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(regs_models.BackendResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetBackendsUnauthorized creates a GetBackendsUnauthorized with default headers values +func NewGetBackendsUnauthorized() *GetBackendsUnauthorized { + return &GetBackendsUnauthorized{} +} + +/*GetBackendsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetBackendsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetBackendsUnauthorized) Error() string { + return fmt.Sprintf("[GET /backends][%d] getBackendsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetBackendsUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetBackendsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetBackendsForbidden creates a GetBackendsForbidden with default headers values +func NewGetBackendsForbidden() *GetBackendsForbidden { + return &GetBackendsForbidden{} +} + +/*GetBackendsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetBackendsForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetBackendsForbidden) Error() string { + return fmt.Sprintf("[GET /backends][%d] getBackendsForbidden %+v", 403, o.Payload) +} + +func (o *GetBackendsForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetBackendsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetBackendsNotFound creates a GetBackendsNotFound with default headers values +func NewGetBackendsNotFound() *GetBackendsNotFound { + return &GetBackendsNotFound{} +} + +/*GetBackendsNotFound handles this case with default header values. + +Resource was not found +*/ +type GetBackendsNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetBackendsNotFound) Error() string { + return fmt.Sprintf("[GET /backends][%d] getBackendsNotFound %+v", 404, o.Payload) +} + +func (o *GetBackendsNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetBackendsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetBackendsUnprocessableEntity creates a GetBackendsUnprocessableEntity with default headers values +func NewGetBackendsUnprocessableEntity() *GetBackendsUnprocessableEntity { + return &GetBackendsUnprocessableEntity{} +} + +/*GetBackendsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetBackendsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetBackendsUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /backends][%d] getBackendsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetBackendsUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetBackendsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetBackendsInternalServerError creates a GetBackendsInternalServerError with default headers values +func NewGetBackendsInternalServerError() *GetBackendsInternalServerError { + return &GetBackendsInternalServerError{} +} + +/*GetBackendsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetBackendsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetBackendsInternalServerError) Error() string { + return fmt.Sprintf("[GET /backends][%d] getBackendsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetBackendsInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetBackendsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/backend/post_backends_parameters.go b/api/devops/regs_client/backend/post_backends_parameters.go new file mode 100644 index 0000000..8e22c56 --- /dev/null +++ b/api/devops/regs_client/backend/post_backends_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package backend + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// NewPostBackendsParams creates a new PostBackendsParams object +// with the default values initialized. +func NewPostBackendsParams() *PostBackendsParams { + var () + return &PostBackendsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostBackendsParamsWithTimeout creates a new PostBackendsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostBackendsParamsWithTimeout(timeout time.Duration) *PostBackendsParams { + var () + return &PostBackendsParams{ + + timeout: timeout, + } +} + +// NewPostBackendsParamsWithContext creates a new PostBackendsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostBackendsParamsWithContext(ctx context.Context) *PostBackendsParams { + var () + return &PostBackendsParams{ + + Context: ctx, + } +} + +// NewPostBackendsParamsWithHTTPClient creates a new PostBackendsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostBackendsParamsWithHTTPClient(client *http.Client) *PostBackendsParams { + var () + return &PostBackendsParams{ + HTTPClient: client, + } +} + +/*PostBackendsParams contains all the parameters to send to the API endpoint +for the post backends operation typically these are written to a http.Request +*/ +type PostBackendsParams struct { + + /*BackendRequest + An array of new Backend records + + */ + BackendRequest *regs_models.BackendRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post backends params +func (o *PostBackendsParams) WithTimeout(timeout time.Duration) *PostBackendsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post backends params +func (o *PostBackendsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post backends params +func (o *PostBackendsParams) WithContext(ctx context.Context) *PostBackendsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post backends params +func (o *PostBackendsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post backends params +func (o *PostBackendsParams) WithHTTPClient(client *http.Client) *PostBackendsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post backends params +func (o *PostBackendsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBackendRequest adds the backendRequest to the post backends params +func (o *PostBackendsParams) WithBackendRequest(backendRequest *regs_models.BackendRequest) *PostBackendsParams { + o.SetBackendRequest(backendRequest) + return o +} + +// SetBackendRequest adds the backendRequest to the post backends params +func (o *PostBackendsParams) SetBackendRequest(backendRequest *regs_models.BackendRequest) { + o.BackendRequest = backendRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostBackendsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.BackendRequest != nil { + if err := r.SetBodyParam(o.BackendRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/backend/post_backends_responses.go b/api/devops/regs_client/backend/post_backends_responses.go new file mode 100644 index 0000000..b7ae19c --- /dev/null +++ b/api/devops/regs_client/backend/post_backends_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package backend + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// PostBackendsReader is a Reader for the PostBackends structure. +type PostBackendsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostBackendsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostBackendsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostBackendsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostBackendsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostBackendsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostBackendsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostBackendsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostBackendsOK creates a PostBackendsOK with default headers values +func NewPostBackendsOK() *PostBackendsOK { + return &PostBackendsOK{} +} + +/*PostBackendsOK handles this case with default header values. + +Taxnexus Response with an array of Backend Objects +*/ +type PostBackendsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *regs_models.BackendResponse +} + +func (o *PostBackendsOK) Error() string { + return fmt.Sprintf("[POST /backends][%d] postBackendsOK %+v", 200, o.Payload) +} + +func (o *PostBackendsOK) GetPayload() *regs_models.BackendResponse { + return o.Payload +} + +func (o *PostBackendsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(regs_models.BackendResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostBackendsUnauthorized creates a PostBackendsUnauthorized with default headers values +func NewPostBackendsUnauthorized() *PostBackendsUnauthorized { + return &PostBackendsUnauthorized{} +} + +/*PostBackendsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostBackendsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostBackendsUnauthorized) Error() string { + return fmt.Sprintf("[POST /backends][%d] postBackendsUnauthorized %+v", 401, o.Payload) +} + +func (o *PostBackendsUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostBackendsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostBackendsForbidden creates a PostBackendsForbidden with default headers values +func NewPostBackendsForbidden() *PostBackendsForbidden { + return &PostBackendsForbidden{} +} + +/*PostBackendsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostBackendsForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostBackendsForbidden) Error() string { + return fmt.Sprintf("[POST /backends][%d] postBackendsForbidden %+v", 403, o.Payload) +} + +func (o *PostBackendsForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostBackendsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostBackendsNotFound creates a PostBackendsNotFound with default headers values +func NewPostBackendsNotFound() *PostBackendsNotFound { + return &PostBackendsNotFound{} +} + +/*PostBackendsNotFound handles this case with default header values. + +Resource was not found +*/ +type PostBackendsNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostBackendsNotFound) Error() string { + return fmt.Sprintf("[POST /backends][%d] postBackendsNotFound %+v", 404, o.Payload) +} + +func (o *PostBackendsNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostBackendsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostBackendsUnprocessableEntity creates a PostBackendsUnprocessableEntity with default headers values +func NewPostBackendsUnprocessableEntity() *PostBackendsUnprocessableEntity { + return &PostBackendsUnprocessableEntity{} +} + +/*PostBackendsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostBackendsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostBackendsUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /backends][%d] postBackendsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostBackendsUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostBackendsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostBackendsInternalServerError creates a PostBackendsInternalServerError with default headers values +func NewPostBackendsInternalServerError() *PostBackendsInternalServerError { + return &PostBackendsInternalServerError{} +} + +/*PostBackendsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostBackendsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostBackendsInternalServerError) Error() string { + return fmt.Sprintf("[POST /backends][%d] postBackendsInternalServerError %+v", 500, o.Payload) +} + +func (o *PostBackendsInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostBackendsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/backend/put_backends_parameters.go b/api/devops/regs_client/backend/put_backends_parameters.go new file mode 100644 index 0000000..337a5f0 --- /dev/null +++ b/api/devops/regs_client/backend/put_backends_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package backend + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// NewPutBackendsParams creates a new PutBackendsParams object +// with the default values initialized. +func NewPutBackendsParams() *PutBackendsParams { + var () + return &PutBackendsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPutBackendsParamsWithTimeout creates a new PutBackendsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPutBackendsParamsWithTimeout(timeout time.Duration) *PutBackendsParams { + var () + return &PutBackendsParams{ + + timeout: timeout, + } +} + +// NewPutBackendsParamsWithContext creates a new PutBackendsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPutBackendsParamsWithContext(ctx context.Context) *PutBackendsParams { + var () + return &PutBackendsParams{ + + Context: ctx, + } +} + +// NewPutBackendsParamsWithHTTPClient creates a new PutBackendsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPutBackendsParamsWithHTTPClient(client *http.Client) *PutBackendsParams { + var () + return &PutBackendsParams{ + HTTPClient: client, + } +} + +/*PutBackendsParams contains all the parameters to send to the API endpoint +for the put backends operation typically these are written to a http.Request +*/ +type PutBackendsParams struct { + + /*BackendRequest + An array of new Backend records + + */ + BackendRequest *regs_models.BackendRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the put backends params +func (o *PutBackendsParams) WithTimeout(timeout time.Duration) *PutBackendsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the put backends params +func (o *PutBackendsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the put backends params +func (o *PutBackendsParams) WithContext(ctx context.Context) *PutBackendsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the put backends params +func (o *PutBackendsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the put backends params +func (o *PutBackendsParams) WithHTTPClient(client *http.Client) *PutBackendsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the put backends params +func (o *PutBackendsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBackendRequest adds the backendRequest to the put backends params +func (o *PutBackendsParams) WithBackendRequest(backendRequest *regs_models.BackendRequest) *PutBackendsParams { + o.SetBackendRequest(backendRequest) + return o +} + +// SetBackendRequest adds the backendRequest to the put backends params +func (o *PutBackendsParams) SetBackendRequest(backendRequest *regs_models.BackendRequest) { + o.BackendRequest = backendRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PutBackendsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.BackendRequest != nil { + if err := r.SetBodyParam(o.BackendRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/backend/put_backends_responses.go b/api/devops/regs_client/backend/put_backends_responses.go new file mode 100644 index 0000000..477f50f --- /dev/null +++ b/api/devops/regs_client/backend/put_backends_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package backend + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// PutBackendsReader is a Reader for the PutBackends structure. +type PutBackendsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PutBackendsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPutBackendsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPutBackendsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPutBackendsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPutBackendsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPutBackendsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPutBackendsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPutBackendsOK creates a PutBackendsOK with default headers values +func NewPutBackendsOK() *PutBackendsOK { + return &PutBackendsOK{} +} + +/*PutBackendsOK handles this case with default header values. + +Taxnexus Response with an array of Backend Objects +*/ +type PutBackendsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *regs_models.BackendResponse +} + +func (o *PutBackendsOK) Error() string { + return fmt.Sprintf("[PUT /backends][%d] putBackendsOK %+v", 200, o.Payload) +} + +func (o *PutBackendsOK) GetPayload() *regs_models.BackendResponse { + return o.Payload +} + +func (o *PutBackendsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(regs_models.BackendResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutBackendsUnauthorized creates a PutBackendsUnauthorized with default headers values +func NewPutBackendsUnauthorized() *PutBackendsUnauthorized { + return &PutBackendsUnauthorized{} +} + +/*PutBackendsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PutBackendsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutBackendsUnauthorized) Error() string { + return fmt.Sprintf("[PUT /backends][%d] putBackendsUnauthorized %+v", 401, o.Payload) +} + +func (o *PutBackendsUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutBackendsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutBackendsForbidden creates a PutBackendsForbidden with default headers values +func NewPutBackendsForbidden() *PutBackendsForbidden { + return &PutBackendsForbidden{} +} + +/*PutBackendsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PutBackendsForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutBackendsForbidden) Error() string { + return fmt.Sprintf("[PUT /backends][%d] putBackendsForbidden %+v", 403, o.Payload) +} + +func (o *PutBackendsForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutBackendsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutBackendsNotFound creates a PutBackendsNotFound with default headers values +func NewPutBackendsNotFound() *PutBackendsNotFound { + return &PutBackendsNotFound{} +} + +/*PutBackendsNotFound handles this case with default header values. + +Resource was not found +*/ +type PutBackendsNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutBackendsNotFound) Error() string { + return fmt.Sprintf("[PUT /backends][%d] putBackendsNotFound %+v", 404, o.Payload) +} + +func (o *PutBackendsNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutBackendsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutBackendsUnprocessableEntity creates a PutBackendsUnprocessableEntity with default headers values +func NewPutBackendsUnprocessableEntity() *PutBackendsUnprocessableEntity { + return &PutBackendsUnprocessableEntity{} +} + +/*PutBackendsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PutBackendsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutBackendsUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /backends][%d] putBackendsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutBackendsUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutBackendsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutBackendsInternalServerError creates a PutBackendsInternalServerError with default headers values +func NewPutBackendsInternalServerError() *PutBackendsInternalServerError { + return &PutBackendsInternalServerError{} +} + +/*PutBackendsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PutBackendsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutBackendsInternalServerError) Error() string { + return fmt.Sprintf("[PUT /backends][%d] putBackendsInternalServerError %+v", 500, o.Payload) +} + +func (o *PutBackendsInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutBackendsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/cors/authority_options_parameters.go b/api/devops/regs_client/cors/authority_options_parameters.go new file mode 100644 index 0000000..6b3b5bd --- /dev/null +++ b/api/devops/regs_client/cors/authority_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewAuthorityOptionsParams creates a new AuthorityOptionsParams object +// with the default values initialized. +func NewAuthorityOptionsParams() *AuthorityOptionsParams { + + return &AuthorityOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewAuthorityOptionsParamsWithTimeout creates a new AuthorityOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewAuthorityOptionsParamsWithTimeout(timeout time.Duration) *AuthorityOptionsParams { + + return &AuthorityOptionsParams{ + + timeout: timeout, + } +} + +// NewAuthorityOptionsParamsWithContext creates a new AuthorityOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewAuthorityOptionsParamsWithContext(ctx context.Context) *AuthorityOptionsParams { + + return &AuthorityOptionsParams{ + + Context: ctx, + } +} + +// NewAuthorityOptionsParamsWithHTTPClient creates a new AuthorityOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewAuthorityOptionsParamsWithHTTPClient(client *http.Client) *AuthorityOptionsParams { + + return &AuthorityOptionsParams{ + HTTPClient: client, + } +} + +/*AuthorityOptionsParams contains all the parameters to send to the API endpoint +for the authority options operation typically these are written to a http.Request +*/ +type AuthorityOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the authority options params +func (o *AuthorityOptionsParams) WithTimeout(timeout time.Duration) *AuthorityOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the authority options params +func (o *AuthorityOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the authority options params +func (o *AuthorityOptionsParams) WithContext(ctx context.Context) *AuthorityOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the authority options params +func (o *AuthorityOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the authority options params +func (o *AuthorityOptionsParams) WithHTTPClient(client *http.Client) *AuthorityOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the authority options params +func (o *AuthorityOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *AuthorityOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/cors/authority_options_responses.go b/api/devops/regs_client/cors/authority_options_responses.go new file mode 100644 index 0000000..8cb758a --- /dev/null +++ b/api/devops/regs_client/cors/authority_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// AuthorityOptionsReader is a Reader for the AuthorityOptions structure. +type AuthorityOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *AuthorityOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewAuthorityOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewAuthorityOptionsOK creates a AuthorityOptionsOK with default headers values +func NewAuthorityOptionsOK() *AuthorityOptionsOK { + return &AuthorityOptionsOK{} +} + +/*AuthorityOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type AuthorityOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *AuthorityOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /authorities][%d] authorityOptionsOK ", 200) +} + +func (o *AuthorityOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/devops/regs_client/cors/backend_options_parameters.go b/api/devops/regs_client/cors/backend_options_parameters.go new file mode 100644 index 0000000..034ac29 --- /dev/null +++ b/api/devops/regs_client/cors/backend_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewBackendOptionsParams creates a new BackendOptionsParams object +// with the default values initialized. +func NewBackendOptionsParams() *BackendOptionsParams { + + return &BackendOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewBackendOptionsParamsWithTimeout creates a new BackendOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewBackendOptionsParamsWithTimeout(timeout time.Duration) *BackendOptionsParams { + + return &BackendOptionsParams{ + + timeout: timeout, + } +} + +// NewBackendOptionsParamsWithContext creates a new BackendOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewBackendOptionsParamsWithContext(ctx context.Context) *BackendOptionsParams { + + return &BackendOptionsParams{ + + Context: ctx, + } +} + +// NewBackendOptionsParamsWithHTTPClient creates a new BackendOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewBackendOptionsParamsWithHTTPClient(client *http.Client) *BackendOptionsParams { + + return &BackendOptionsParams{ + HTTPClient: client, + } +} + +/*BackendOptionsParams contains all the parameters to send to the API endpoint +for the backend options operation typically these are written to a http.Request +*/ +type BackendOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the backend options params +func (o *BackendOptionsParams) WithTimeout(timeout time.Duration) *BackendOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the backend options params +func (o *BackendOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the backend options params +func (o *BackendOptionsParams) WithContext(ctx context.Context) *BackendOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the backend options params +func (o *BackendOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the backend options params +func (o *BackendOptionsParams) WithHTTPClient(client *http.Client) *BackendOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the backend options params +func (o *BackendOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *BackendOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/cors/backend_options_responses.go b/api/devops/regs_client/cors/backend_options_responses.go new file mode 100644 index 0000000..d1836d5 --- /dev/null +++ b/api/devops/regs_client/cors/backend_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// BackendOptionsReader is a Reader for the BackendOptions structure. +type BackendOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BackendOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBackendOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewBackendOptionsOK creates a BackendOptionsOK with default headers values +func NewBackendOptionsOK() *BackendOptionsOK { + return &BackendOptionsOK{} +} + +/*BackendOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type BackendOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *BackendOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /backends][%d] backendOptionsOK ", 200) +} + +func (o *BackendOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/devops/regs_client/cors/cors_client.go b/api/devops/regs_client/cors/cors_client.go new file mode 100644 index 0000000..7e0c134 --- /dev/null +++ b/api/devops/regs_client/cors/cors_client.go @@ -0,0 +1,436 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new cors API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for cors API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + AuthorityOptions(params *AuthorityOptionsParams) (*AuthorityOptionsOK, error) + + BackendOptions(params *BackendOptionsParams) (*BackendOptionsOK, error) + + FilingOptions(params *FilingOptionsParams) (*FilingOptionsOK, error) + + FilingTypeOptions(params *FilingTypeOptionsParams) (*FilingTypeOptionsOK, error) + + LicenseOptions(params *LicenseOptionsParams) (*LicenseOptionsOK, error) + + LicenseTypeOptions(params *LicenseTypeOptionsParams) (*LicenseTypeOptionsOK, error) + + NotebookOptions(params *NotebookOptionsParams) (*NotebookOptionsOK, error) + + RatingEngineOptions(params *RatingEngineOptionsParams) (*RatingEngineOptionsOK, error) + + SubmissionOptions(params *SubmissionOptionsParams) (*SubmissionOptionsOK, error) + + TaxTypeAccountOptions(params *TaxTypeAccountOptionsParams) (*TaxTypeAccountOptionsOK, error) + + TransactionOptions(params *TransactionOptionsParams) (*TransactionOptionsOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + AuthorityOptions CORS support +*/ +func (a *Client) AuthorityOptions(params *AuthorityOptionsParams) (*AuthorityOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewAuthorityOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "authorityOptions", + Method: "OPTIONS", + PathPattern: "/authorities", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &AuthorityOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*AuthorityOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for authorityOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + BackendOptions CORS support +*/ +func (a *Client) BackendOptions(params *BackendOptionsParams) (*BackendOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBackendOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "backendOptions", + Method: "OPTIONS", + PathPattern: "/backends", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &BackendOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*BackendOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for backendOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + FilingOptions CORS support +*/ +func (a *Client) FilingOptions(params *FilingOptionsParams) (*FilingOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFilingOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "filingOptions", + Method: "OPTIONS", + PathPattern: "/filings", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FilingOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FilingOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for filingOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + FilingTypeOptions CORS support +*/ +func (a *Client) FilingTypeOptions(params *FilingTypeOptionsParams) (*FilingTypeOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFilingTypeOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "filingTypeOptions", + Method: "OPTIONS", + PathPattern: "/filingtypes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FilingTypeOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FilingTypeOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for filingTypeOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + LicenseOptions CORS support +*/ +func (a *Client) LicenseOptions(params *LicenseOptionsParams) (*LicenseOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewLicenseOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "licenseOptions", + Method: "OPTIONS", + PathPattern: "/licenses", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &LicenseOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*LicenseOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for licenseOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + LicenseTypeOptions CORS support +*/ +func (a *Client) LicenseTypeOptions(params *LicenseTypeOptionsParams) (*LicenseTypeOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewLicenseTypeOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "licenseTypeOptions", + Method: "OPTIONS", + PathPattern: "/licensetypes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &LicenseTypeOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*LicenseTypeOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for licenseTypeOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + NotebookOptions CORS support +*/ +func (a *Client) NotebookOptions(params *NotebookOptionsParams) (*NotebookOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewNotebookOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "notebookOptions", + Method: "OPTIONS", + PathPattern: "/notebooks", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &NotebookOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*NotebookOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for notebookOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + RatingEngineOptions CORS support +*/ +func (a *Client) RatingEngineOptions(params *RatingEngineOptionsParams) (*RatingEngineOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewRatingEngineOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ratingEngineOptions", + Method: "OPTIONS", + PathPattern: "/ratingengines", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &RatingEngineOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*RatingEngineOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ratingEngineOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + SubmissionOptions CORS support +*/ +func (a *Client) SubmissionOptions(params *SubmissionOptionsParams) (*SubmissionOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewSubmissionOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "submissionOptions", + Method: "OPTIONS", + PathPattern: "/submissions", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &SubmissionOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*SubmissionOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for submissionOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TaxTypeAccountOptions CORS support +*/ +func (a *Client) TaxTypeAccountOptions(params *TaxTypeAccountOptionsParams) (*TaxTypeAccountOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTaxTypeAccountOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "taxTypeAccountOptions", + Method: "OPTIONS", + PathPattern: "/taxtypeaccounts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &TaxTypeAccountOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*TaxTypeAccountOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for taxTypeAccountOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TransactionOptions CORS support +*/ +func (a *Client) TransactionOptions(params *TransactionOptionsParams) (*TransactionOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTransactionOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "transactionOptions", + Method: "OPTIONS", + PathPattern: "/transactions", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &TransactionOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*TransactionOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for transactionOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/devops/regs_client/cors/filing_options_parameters.go b/api/devops/regs_client/cors/filing_options_parameters.go new file mode 100644 index 0000000..f6f8d60 --- /dev/null +++ b/api/devops/regs_client/cors/filing_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewFilingOptionsParams creates a new FilingOptionsParams object +// with the default values initialized. +func NewFilingOptionsParams() *FilingOptionsParams { + + return &FilingOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFilingOptionsParamsWithTimeout creates a new FilingOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFilingOptionsParamsWithTimeout(timeout time.Duration) *FilingOptionsParams { + + return &FilingOptionsParams{ + + timeout: timeout, + } +} + +// NewFilingOptionsParamsWithContext creates a new FilingOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFilingOptionsParamsWithContext(ctx context.Context) *FilingOptionsParams { + + return &FilingOptionsParams{ + + Context: ctx, + } +} + +// NewFilingOptionsParamsWithHTTPClient creates a new FilingOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFilingOptionsParamsWithHTTPClient(client *http.Client) *FilingOptionsParams { + + return &FilingOptionsParams{ + HTTPClient: client, + } +} + +/*FilingOptionsParams contains all the parameters to send to the API endpoint +for the filing options operation typically these are written to a http.Request +*/ +type FilingOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the filing options params +func (o *FilingOptionsParams) WithTimeout(timeout time.Duration) *FilingOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the filing options params +func (o *FilingOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the filing options params +func (o *FilingOptionsParams) WithContext(ctx context.Context) *FilingOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the filing options params +func (o *FilingOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the filing options params +func (o *FilingOptionsParams) WithHTTPClient(client *http.Client) *FilingOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the filing options params +func (o *FilingOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FilingOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/cors/filing_options_responses.go b/api/devops/regs_client/cors/filing_options_responses.go new file mode 100644 index 0000000..d36d64b --- /dev/null +++ b/api/devops/regs_client/cors/filing_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// FilingOptionsReader is a Reader for the FilingOptions structure. +type FilingOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FilingOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFilingOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewFilingOptionsOK creates a FilingOptionsOK with default headers values +func NewFilingOptionsOK() *FilingOptionsOK { + return &FilingOptionsOK{} +} + +/*FilingOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type FilingOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *FilingOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /filings][%d] filingOptionsOK ", 200) +} + +func (o *FilingOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/devops/regs_client/cors/filing_type_options_parameters.go b/api/devops/regs_client/cors/filing_type_options_parameters.go new file mode 100644 index 0000000..03d60e1 --- /dev/null +++ b/api/devops/regs_client/cors/filing_type_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewFilingTypeOptionsParams creates a new FilingTypeOptionsParams object +// with the default values initialized. +func NewFilingTypeOptionsParams() *FilingTypeOptionsParams { + + return &FilingTypeOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFilingTypeOptionsParamsWithTimeout creates a new FilingTypeOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFilingTypeOptionsParamsWithTimeout(timeout time.Duration) *FilingTypeOptionsParams { + + return &FilingTypeOptionsParams{ + + timeout: timeout, + } +} + +// NewFilingTypeOptionsParamsWithContext creates a new FilingTypeOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFilingTypeOptionsParamsWithContext(ctx context.Context) *FilingTypeOptionsParams { + + return &FilingTypeOptionsParams{ + + Context: ctx, + } +} + +// NewFilingTypeOptionsParamsWithHTTPClient creates a new FilingTypeOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFilingTypeOptionsParamsWithHTTPClient(client *http.Client) *FilingTypeOptionsParams { + + return &FilingTypeOptionsParams{ + HTTPClient: client, + } +} + +/*FilingTypeOptionsParams contains all the parameters to send to the API endpoint +for the filing type options operation typically these are written to a http.Request +*/ +type FilingTypeOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the filing type options params +func (o *FilingTypeOptionsParams) WithTimeout(timeout time.Duration) *FilingTypeOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the filing type options params +func (o *FilingTypeOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the filing type options params +func (o *FilingTypeOptionsParams) WithContext(ctx context.Context) *FilingTypeOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the filing type options params +func (o *FilingTypeOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the filing type options params +func (o *FilingTypeOptionsParams) WithHTTPClient(client *http.Client) *FilingTypeOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the filing type options params +func (o *FilingTypeOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FilingTypeOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/cors/filing_type_options_responses.go b/api/devops/regs_client/cors/filing_type_options_responses.go new file mode 100644 index 0000000..d53b675 --- /dev/null +++ b/api/devops/regs_client/cors/filing_type_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// FilingTypeOptionsReader is a Reader for the FilingTypeOptions structure. +type FilingTypeOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FilingTypeOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFilingTypeOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewFilingTypeOptionsOK creates a FilingTypeOptionsOK with default headers values +func NewFilingTypeOptionsOK() *FilingTypeOptionsOK { + return &FilingTypeOptionsOK{} +} + +/*FilingTypeOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type FilingTypeOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *FilingTypeOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /filingtypes][%d] filingTypeOptionsOK ", 200) +} + +func (o *FilingTypeOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/devops/regs_client/cors/license_options_parameters.go b/api/devops/regs_client/cors/license_options_parameters.go new file mode 100644 index 0000000..927ca39 --- /dev/null +++ b/api/devops/regs_client/cors/license_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewLicenseOptionsParams creates a new LicenseOptionsParams object +// with the default values initialized. +func NewLicenseOptionsParams() *LicenseOptionsParams { + + return &LicenseOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewLicenseOptionsParamsWithTimeout creates a new LicenseOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewLicenseOptionsParamsWithTimeout(timeout time.Duration) *LicenseOptionsParams { + + return &LicenseOptionsParams{ + + timeout: timeout, + } +} + +// NewLicenseOptionsParamsWithContext creates a new LicenseOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewLicenseOptionsParamsWithContext(ctx context.Context) *LicenseOptionsParams { + + return &LicenseOptionsParams{ + + Context: ctx, + } +} + +// NewLicenseOptionsParamsWithHTTPClient creates a new LicenseOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewLicenseOptionsParamsWithHTTPClient(client *http.Client) *LicenseOptionsParams { + + return &LicenseOptionsParams{ + HTTPClient: client, + } +} + +/*LicenseOptionsParams contains all the parameters to send to the API endpoint +for the license options operation typically these are written to a http.Request +*/ +type LicenseOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the license options params +func (o *LicenseOptionsParams) WithTimeout(timeout time.Duration) *LicenseOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the license options params +func (o *LicenseOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the license options params +func (o *LicenseOptionsParams) WithContext(ctx context.Context) *LicenseOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the license options params +func (o *LicenseOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the license options params +func (o *LicenseOptionsParams) WithHTTPClient(client *http.Client) *LicenseOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the license options params +func (o *LicenseOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *LicenseOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/cors/license_options_responses.go b/api/devops/regs_client/cors/license_options_responses.go new file mode 100644 index 0000000..582a813 --- /dev/null +++ b/api/devops/regs_client/cors/license_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// LicenseOptionsReader is a Reader for the LicenseOptions structure. +type LicenseOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *LicenseOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewLicenseOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewLicenseOptionsOK creates a LicenseOptionsOK with default headers values +func NewLicenseOptionsOK() *LicenseOptionsOK { + return &LicenseOptionsOK{} +} + +/*LicenseOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type LicenseOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *LicenseOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /licenses][%d] licenseOptionsOK ", 200) +} + +func (o *LicenseOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/devops/regs_client/cors/license_type_options_parameters.go b/api/devops/regs_client/cors/license_type_options_parameters.go new file mode 100644 index 0000000..7281f10 --- /dev/null +++ b/api/devops/regs_client/cors/license_type_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewLicenseTypeOptionsParams creates a new LicenseTypeOptionsParams object +// with the default values initialized. +func NewLicenseTypeOptionsParams() *LicenseTypeOptionsParams { + + return &LicenseTypeOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewLicenseTypeOptionsParamsWithTimeout creates a new LicenseTypeOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewLicenseTypeOptionsParamsWithTimeout(timeout time.Duration) *LicenseTypeOptionsParams { + + return &LicenseTypeOptionsParams{ + + timeout: timeout, + } +} + +// NewLicenseTypeOptionsParamsWithContext creates a new LicenseTypeOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewLicenseTypeOptionsParamsWithContext(ctx context.Context) *LicenseTypeOptionsParams { + + return &LicenseTypeOptionsParams{ + + Context: ctx, + } +} + +// NewLicenseTypeOptionsParamsWithHTTPClient creates a new LicenseTypeOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewLicenseTypeOptionsParamsWithHTTPClient(client *http.Client) *LicenseTypeOptionsParams { + + return &LicenseTypeOptionsParams{ + HTTPClient: client, + } +} + +/*LicenseTypeOptionsParams contains all the parameters to send to the API endpoint +for the license type options operation typically these are written to a http.Request +*/ +type LicenseTypeOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the license type options params +func (o *LicenseTypeOptionsParams) WithTimeout(timeout time.Duration) *LicenseTypeOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the license type options params +func (o *LicenseTypeOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the license type options params +func (o *LicenseTypeOptionsParams) WithContext(ctx context.Context) *LicenseTypeOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the license type options params +func (o *LicenseTypeOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the license type options params +func (o *LicenseTypeOptionsParams) WithHTTPClient(client *http.Client) *LicenseTypeOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the license type options params +func (o *LicenseTypeOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *LicenseTypeOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/cors/license_type_options_responses.go b/api/devops/regs_client/cors/license_type_options_responses.go new file mode 100644 index 0000000..a72a462 --- /dev/null +++ b/api/devops/regs_client/cors/license_type_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// LicenseTypeOptionsReader is a Reader for the LicenseTypeOptions structure. +type LicenseTypeOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *LicenseTypeOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewLicenseTypeOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewLicenseTypeOptionsOK creates a LicenseTypeOptionsOK with default headers values +func NewLicenseTypeOptionsOK() *LicenseTypeOptionsOK { + return &LicenseTypeOptionsOK{} +} + +/*LicenseTypeOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type LicenseTypeOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *LicenseTypeOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /licensetypes][%d] licenseTypeOptionsOK ", 200) +} + +func (o *LicenseTypeOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/devops/regs_client/cors/notebook_options_parameters.go b/api/devops/regs_client/cors/notebook_options_parameters.go new file mode 100644 index 0000000..1421951 --- /dev/null +++ b/api/devops/regs_client/cors/notebook_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewNotebookOptionsParams creates a new NotebookOptionsParams object +// with the default values initialized. +func NewNotebookOptionsParams() *NotebookOptionsParams { + + return &NotebookOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewNotebookOptionsParamsWithTimeout creates a new NotebookOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewNotebookOptionsParamsWithTimeout(timeout time.Duration) *NotebookOptionsParams { + + return &NotebookOptionsParams{ + + timeout: timeout, + } +} + +// NewNotebookOptionsParamsWithContext creates a new NotebookOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewNotebookOptionsParamsWithContext(ctx context.Context) *NotebookOptionsParams { + + return &NotebookOptionsParams{ + + Context: ctx, + } +} + +// NewNotebookOptionsParamsWithHTTPClient creates a new NotebookOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewNotebookOptionsParamsWithHTTPClient(client *http.Client) *NotebookOptionsParams { + + return &NotebookOptionsParams{ + HTTPClient: client, + } +} + +/*NotebookOptionsParams contains all the parameters to send to the API endpoint +for the notebook options operation typically these are written to a http.Request +*/ +type NotebookOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the notebook options params +func (o *NotebookOptionsParams) WithTimeout(timeout time.Duration) *NotebookOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the notebook options params +func (o *NotebookOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the notebook options params +func (o *NotebookOptionsParams) WithContext(ctx context.Context) *NotebookOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the notebook options params +func (o *NotebookOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the notebook options params +func (o *NotebookOptionsParams) WithHTTPClient(client *http.Client) *NotebookOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the notebook options params +func (o *NotebookOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *NotebookOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/cors/notebook_options_responses.go b/api/devops/regs_client/cors/notebook_options_responses.go new file mode 100644 index 0000000..8679011 --- /dev/null +++ b/api/devops/regs_client/cors/notebook_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// NotebookOptionsReader is a Reader for the NotebookOptions structure. +type NotebookOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *NotebookOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewNotebookOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewNotebookOptionsOK creates a NotebookOptionsOK with default headers values +func NewNotebookOptionsOK() *NotebookOptionsOK { + return &NotebookOptionsOK{} +} + +/*NotebookOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type NotebookOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *NotebookOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /notebooks][%d] notebookOptionsOK ", 200) +} + +func (o *NotebookOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/devops/regs_client/cors/rating_engine_options_parameters.go b/api/devops/regs_client/cors/rating_engine_options_parameters.go new file mode 100644 index 0000000..160e86e --- /dev/null +++ b/api/devops/regs_client/cors/rating_engine_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewRatingEngineOptionsParams creates a new RatingEngineOptionsParams object +// with the default values initialized. +func NewRatingEngineOptionsParams() *RatingEngineOptionsParams { + + return &RatingEngineOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewRatingEngineOptionsParamsWithTimeout creates a new RatingEngineOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewRatingEngineOptionsParamsWithTimeout(timeout time.Duration) *RatingEngineOptionsParams { + + return &RatingEngineOptionsParams{ + + timeout: timeout, + } +} + +// NewRatingEngineOptionsParamsWithContext creates a new RatingEngineOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewRatingEngineOptionsParamsWithContext(ctx context.Context) *RatingEngineOptionsParams { + + return &RatingEngineOptionsParams{ + + Context: ctx, + } +} + +// NewRatingEngineOptionsParamsWithHTTPClient creates a new RatingEngineOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewRatingEngineOptionsParamsWithHTTPClient(client *http.Client) *RatingEngineOptionsParams { + + return &RatingEngineOptionsParams{ + HTTPClient: client, + } +} + +/*RatingEngineOptionsParams contains all the parameters to send to the API endpoint +for the rating engine options operation typically these are written to a http.Request +*/ +type RatingEngineOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the rating engine options params +func (o *RatingEngineOptionsParams) WithTimeout(timeout time.Duration) *RatingEngineOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the rating engine options params +func (o *RatingEngineOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the rating engine options params +func (o *RatingEngineOptionsParams) WithContext(ctx context.Context) *RatingEngineOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the rating engine options params +func (o *RatingEngineOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the rating engine options params +func (o *RatingEngineOptionsParams) WithHTTPClient(client *http.Client) *RatingEngineOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the rating engine options params +func (o *RatingEngineOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *RatingEngineOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/cors/rating_engine_options_responses.go b/api/devops/regs_client/cors/rating_engine_options_responses.go new file mode 100644 index 0000000..9726241 --- /dev/null +++ b/api/devops/regs_client/cors/rating_engine_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// RatingEngineOptionsReader is a Reader for the RatingEngineOptions structure. +type RatingEngineOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *RatingEngineOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewRatingEngineOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewRatingEngineOptionsOK creates a RatingEngineOptionsOK with default headers values +func NewRatingEngineOptionsOK() *RatingEngineOptionsOK { + return &RatingEngineOptionsOK{} +} + +/*RatingEngineOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type RatingEngineOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *RatingEngineOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /ratingengines][%d] ratingEngineOptionsOK ", 200) +} + +func (o *RatingEngineOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/devops/regs_client/cors/submission_options_parameters.go b/api/devops/regs_client/cors/submission_options_parameters.go new file mode 100644 index 0000000..51bfc1c --- /dev/null +++ b/api/devops/regs_client/cors/submission_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewSubmissionOptionsParams creates a new SubmissionOptionsParams object +// with the default values initialized. +func NewSubmissionOptionsParams() *SubmissionOptionsParams { + + return &SubmissionOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewSubmissionOptionsParamsWithTimeout creates a new SubmissionOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewSubmissionOptionsParamsWithTimeout(timeout time.Duration) *SubmissionOptionsParams { + + return &SubmissionOptionsParams{ + + timeout: timeout, + } +} + +// NewSubmissionOptionsParamsWithContext creates a new SubmissionOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewSubmissionOptionsParamsWithContext(ctx context.Context) *SubmissionOptionsParams { + + return &SubmissionOptionsParams{ + + Context: ctx, + } +} + +// NewSubmissionOptionsParamsWithHTTPClient creates a new SubmissionOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewSubmissionOptionsParamsWithHTTPClient(client *http.Client) *SubmissionOptionsParams { + + return &SubmissionOptionsParams{ + HTTPClient: client, + } +} + +/*SubmissionOptionsParams contains all the parameters to send to the API endpoint +for the submission options operation typically these are written to a http.Request +*/ +type SubmissionOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the submission options params +func (o *SubmissionOptionsParams) WithTimeout(timeout time.Duration) *SubmissionOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the submission options params +func (o *SubmissionOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the submission options params +func (o *SubmissionOptionsParams) WithContext(ctx context.Context) *SubmissionOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the submission options params +func (o *SubmissionOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the submission options params +func (o *SubmissionOptionsParams) WithHTTPClient(client *http.Client) *SubmissionOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the submission options params +func (o *SubmissionOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *SubmissionOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/cors/submission_options_responses.go b/api/devops/regs_client/cors/submission_options_responses.go new file mode 100644 index 0000000..c20aaff --- /dev/null +++ b/api/devops/regs_client/cors/submission_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// SubmissionOptionsReader is a Reader for the SubmissionOptions structure. +type SubmissionOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *SubmissionOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewSubmissionOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewSubmissionOptionsOK creates a SubmissionOptionsOK with default headers values +func NewSubmissionOptionsOK() *SubmissionOptionsOK { + return &SubmissionOptionsOK{} +} + +/*SubmissionOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type SubmissionOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *SubmissionOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /submissions][%d] submissionOptionsOK ", 200) +} + +func (o *SubmissionOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/devops/regs_client/cors/tax_type_account_options_parameters.go b/api/devops/regs_client/cors/tax_type_account_options_parameters.go new file mode 100644 index 0000000..510ffd3 --- /dev/null +++ b/api/devops/regs_client/cors/tax_type_account_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewTaxTypeAccountOptionsParams creates a new TaxTypeAccountOptionsParams object +// with the default values initialized. +func NewTaxTypeAccountOptionsParams() *TaxTypeAccountOptionsParams { + + return &TaxTypeAccountOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewTaxTypeAccountOptionsParamsWithTimeout creates a new TaxTypeAccountOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewTaxTypeAccountOptionsParamsWithTimeout(timeout time.Duration) *TaxTypeAccountOptionsParams { + + return &TaxTypeAccountOptionsParams{ + + timeout: timeout, + } +} + +// NewTaxTypeAccountOptionsParamsWithContext creates a new TaxTypeAccountOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewTaxTypeAccountOptionsParamsWithContext(ctx context.Context) *TaxTypeAccountOptionsParams { + + return &TaxTypeAccountOptionsParams{ + + Context: ctx, + } +} + +// NewTaxTypeAccountOptionsParamsWithHTTPClient creates a new TaxTypeAccountOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewTaxTypeAccountOptionsParamsWithHTTPClient(client *http.Client) *TaxTypeAccountOptionsParams { + + return &TaxTypeAccountOptionsParams{ + HTTPClient: client, + } +} + +/*TaxTypeAccountOptionsParams contains all the parameters to send to the API endpoint +for the tax type account options operation typically these are written to a http.Request +*/ +type TaxTypeAccountOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the tax type account options params +func (o *TaxTypeAccountOptionsParams) WithTimeout(timeout time.Duration) *TaxTypeAccountOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tax type account options params +func (o *TaxTypeAccountOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tax type account options params +func (o *TaxTypeAccountOptionsParams) WithContext(ctx context.Context) *TaxTypeAccountOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tax type account options params +func (o *TaxTypeAccountOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tax type account options params +func (o *TaxTypeAccountOptionsParams) WithHTTPClient(client *http.Client) *TaxTypeAccountOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tax type account options params +func (o *TaxTypeAccountOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *TaxTypeAccountOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/cors/tax_type_account_options_responses.go b/api/devops/regs_client/cors/tax_type_account_options_responses.go new file mode 100644 index 0000000..a2e5448 --- /dev/null +++ b/api/devops/regs_client/cors/tax_type_account_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// TaxTypeAccountOptionsReader is a Reader for the TaxTypeAccountOptions structure. +type TaxTypeAccountOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TaxTypeAccountOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewTaxTypeAccountOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewTaxTypeAccountOptionsOK creates a TaxTypeAccountOptionsOK with default headers values +func NewTaxTypeAccountOptionsOK() *TaxTypeAccountOptionsOK { + return &TaxTypeAccountOptionsOK{} +} + +/*TaxTypeAccountOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type TaxTypeAccountOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *TaxTypeAccountOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /taxtypeaccounts][%d] taxTypeAccountOptionsOK ", 200) +} + +func (o *TaxTypeAccountOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/devops/regs_client/cors/transaction_options_parameters.go b/api/devops/regs_client/cors/transaction_options_parameters.go new file mode 100644 index 0000000..638c7cb --- /dev/null +++ b/api/devops/regs_client/cors/transaction_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewTransactionOptionsParams creates a new TransactionOptionsParams object +// with the default values initialized. +func NewTransactionOptionsParams() *TransactionOptionsParams { + + return &TransactionOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewTransactionOptionsParamsWithTimeout creates a new TransactionOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewTransactionOptionsParamsWithTimeout(timeout time.Duration) *TransactionOptionsParams { + + return &TransactionOptionsParams{ + + timeout: timeout, + } +} + +// NewTransactionOptionsParamsWithContext creates a new TransactionOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewTransactionOptionsParamsWithContext(ctx context.Context) *TransactionOptionsParams { + + return &TransactionOptionsParams{ + + Context: ctx, + } +} + +// NewTransactionOptionsParamsWithHTTPClient creates a new TransactionOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewTransactionOptionsParamsWithHTTPClient(client *http.Client) *TransactionOptionsParams { + + return &TransactionOptionsParams{ + HTTPClient: client, + } +} + +/*TransactionOptionsParams contains all the parameters to send to the API endpoint +for the transaction options operation typically these are written to a http.Request +*/ +type TransactionOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the transaction options params +func (o *TransactionOptionsParams) WithTimeout(timeout time.Duration) *TransactionOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the transaction options params +func (o *TransactionOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the transaction options params +func (o *TransactionOptionsParams) WithContext(ctx context.Context) *TransactionOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the transaction options params +func (o *TransactionOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the transaction options params +func (o *TransactionOptionsParams) WithHTTPClient(client *http.Client) *TransactionOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the transaction options params +func (o *TransactionOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *TransactionOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/cors/transaction_options_responses.go b/api/devops/regs_client/cors/transaction_options_responses.go new file mode 100644 index 0000000..17a3521 --- /dev/null +++ b/api/devops/regs_client/cors/transaction_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// TransactionOptionsReader is a Reader for the TransactionOptions structure. +type TransactionOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TransactionOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewTransactionOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewTransactionOptionsOK creates a TransactionOptionsOK with default headers values +func NewTransactionOptionsOK() *TransactionOptionsOK { + return &TransactionOptionsOK{} +} + +/*TransactionOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type TransactionOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *TransactionOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /transactions][%d] transactionOptionsOK ", 200) +} + +func (o *TransactionOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/devops/regs_client/filing/filing_client.go b/api/devops/regs_client/filing/filing_client.go new file mode 100644 index 0000000..e138521 --- /dev/null +++ b/api/devops/regs_client/filing/filing_client.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package filing + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new filing API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for filing API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetFilings(params *GetFilingsParams, authInfo runtime.ClientAuthInfoWriter) (*GetFilingsOK, error) + + PostFilings(params *PostFilingsParams, authInfo runtime.ClientAuthInfoWriter) (*PostFilingsOK, error) + + PutFilings(params *PutFilingsParams, authInfo runtime.ClientAuthInfoWriter) (*PutFilingsOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetFilings gets a list of filings + + Return a list of available Regulatory Filings +*/ +func (a *Client) GetFilings(params *GetFilingsParams, authInfo runtime.ClientAuthInfoWriter) (*GetFilingsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetFilingsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getFilings", + Method: "GET", + PathPattern: "/filings", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetFilingsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetFilingsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getFilings: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostFilings creates new filings + + Create new Filings +*/ +func (a *Client) PostFilings(params *PostFilingsParams, authInfo runtime.ClientAuthInfoWriter) (*PostFilingsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostFilingsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postFilings", + Method: "POST", + PathPattern: "/filings", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostFilingsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostFilingsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postFilings: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PutFilings updates a filing + + Update all the fields in a Filing record identified by Taxnexus ID +*/ +func (a *Client) PutFilings(params *PutFilingsParams, authInfo runtime.ClientAuthInfoWriter) (*PutFilingsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPutFilingsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "putFilings", + Method: "PUT", + PathPattern: "/filings", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PutFilingsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PutFilingsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for putFilings: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/devops/regs_client/filing/get_filings_parameters.go b/api/devops/regs_client/filing/get_filings_parameters.go new file mode 100644 index 0000000..1293c6b --- /dev/null +++ b/api/devops/regs_client/filing/get_filings_parameters.go @@ -0,0 +1,279 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package filing + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetFilingsParams creates a new GetFilingsParams object +// with the default values initialized. +func NewGetFilingsParams() *GetFilingsParams { + var () + return &GetFilingsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetFilingsParamsWithTimeout creates a new GetFilingsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetFilingsParamsWithTimeout(timeout time.Duration) *GetFilingsParams { + var () + return &GetFilingsParams{ + + timeout: timeout, + } +} + +// NewGetFilingsParamsWithContext creates a new GetFilingsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetFilingsParamsWithContext(ctx context.Context) *GetFilingsParams { + var () + return &GetFilingsParams{ + + Context: ctx, + } +} + +// NewGetFilingsParamsWithHTTPClient creates a new GetFilingsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetFilingsParamsWithHTTPClient(client *http.Client) *GetFilingsParams { + var () + return &GetFilingsParams{ + HTTPClient: client, + } +} + +/*GetFilingsParams contains all the parameters to send to the API endpoint +for the get filings operation typically these are written to a http.Request +*/ +type GetFilingsParams struct { + + /*CompanyID + Taxnexus Record Id of a Company + + */ + CompanyID *string + /*FilingID + Taxnexus Record Id of a Filing + + */ + FilingID *string + /*ID + Taxnexus Id of the record to be retrieved + + */ + ID *string + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get filings params +func (o *GetFilingsParams) WithTimeout(timeout time.Duration) *GetFilingsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get filings params +func (o *GetFilingsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get filings params +func (o *GetFilingsParams) WithContext(ctx context.Context) *GetFilingsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get filings params +func (o *GetFilingsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get filings params +func (o *GetFilingsParams) WithHTTPClient(client *http.Client) *GetFilingsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get filings params +func (o *GetFilingsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCompanyID adds the companyID to the get filings params +func (o *GetFilingsParams) WithCompanyID(companyID *string) *GetFilingsParams { + o.SetCompanyID(companyID) + return o +} + +// SetCompanyID adds the companyId to the get filings params +func (o *GetFilingsParams) SetCompanyID(companyID *string) { + o.CompanyID = companyID +} + +// WithFilingID adds the filingID to the get filings params +func (o *GetFilingsParams) WithFilingID(filingID *string) *GetFilingsParams { + o.SetFilingID(filingID) + return o +} + +// SetFilingID adds the filingId to the get filings params +func (o *GetFilingsParams) SetFilingID(filingID *string) { + o.FilingID = filingID +} + +// WithID adds the id to the get filings params +func (o *GetFilingsParams) WithID(id *string) *GetFilingsParams { + o.SetID(id) + return o +} + +// SetID adds the id to the get filings params +func (o *GetFilingsParams) SetID(id *string) { + o.ID = id +} + +// WithLimit adds the limit to the get filings params +func (o *GetFilingsParams) WithLimit(limit *int64) *GetFilingsParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get filings params +func (o *GetFilingsParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get filings params +func (o *GetFilingsParams) WithOffset(offset *int64) *GetFilingsParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get filings params +func (o *GetFilingsParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *GetFilingsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CompanyID != nil { + + // query param companyId + var qrCompanyID string + if o.CompanyID != nil { + qrCompanyID = *o.CompanyID + } + qCompanyID := qrCompanyID + if qCompanyID != "" { + if err := r.SetQueryParam("companyId", qCompanyID); err != nil { + return err + } + } + + } + + if o.FilingID != nil { + + // query param filingId + var qrFilingID string + if o.FilingID != nil { + qrFilingID = *o.FilingID + } + qFilingID := qrFilingID + if qFilingID != "" { + if err := r.SetQueryParam("filingId", qFilingID); err != nil { + return err + } + } + + } + + if o.ID != nil { + + // query param id + var qrID string + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/filing/get_filings_responses.go b/api/devops/regs_client/filing/get_filings_responses.go new file mode 100644 index 0000000..49095f1 --- /dev/null +++ b/api/devops/regs_client/filing/get_filings_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package filing + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// GetFilingsReader is a Reader for the GetFilings structure. +type GetFilingsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetFilingsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetFilingsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetFilingsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetFilingsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetFilingsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetFilingsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetFilingsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetFilingsOK creates a GetFilingsOK with default headers values +func NewGetFilingsOK() *GetFilingsOK { + return &GetFilingsOK{} +} + +/*GetFilingsOK handles this case with default header values. + +Taxnexus Response with an array of Filing objects +*/ +type GetFilingsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *regs_models.FilingResponse +} + +func (o *GetFilingsOK) Error() string { + return fmt.Sprintf("[GET /filings][%d] getFilingsOK %+v", 200, o.Payload) +} + +func (o *GetFilingsOK) GetPayload() *regs_models.FilingResponse { + return o.Payload +} + +func (o *GetFilingsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(regs_models.FilingResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetFilingsUnauthorized creates a GetFilingsUnauthorized with default headers values +func NewGetFilingsUnauthorized() *GetFilingsUnauthorized { + return &GetFilingsUnauthorized{} +} + +/*GetFilingsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetFilingsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetFilingsUnauthorized) Error() string { + return fmt.Sprintf("[GET /filings][%d] getFilingsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetFilingsUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetFilingsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetFilingsForbidden creates a GetFilingsForbidden with default headers values +func NewGetFilingsForbidden() *GetFilingsForbidden { + return &GetFilingsForbidden{} +} + +/*GetFilingsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetFilingsForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetFilingsForbidden) Error() string { + return fmt.Sprintf("[GET /filings][%d] getFilingsForbidden %+v", 403, o.Payload) +} + +func (o *GetFilingsForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetFilingsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetFilingsNotFound creates a GetFilingsNotFound with default headers values +func NewGetFilingsNotFound() *GetFilingsNotFound { + return &GetFilingsNotFound{} +} + +/*GetFilingsNotFound handles this case with default header values. + +Resource was not found +*/ +type GetFilingsNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetFilingsNotFound) Error() string { + return fmt.Sprintf("[GET /filings][%d] getFilingsNotFound %+v", 404, o.Payload) +} + +func (o *GetFilingsNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetFilingsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetFilingsUnprocessableEntity creates a GetFilingsUnprocessableEntity with default headers values +func NewGetFilingsUnprocessableEntity() *GetFilingsUnprocessableEntity { + return &GetFilingsUnprocessableEntity{} +} + +/*GetFilingsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetFilingsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetFilingsUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /filings][%d] getFilingsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetFilingsUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetFilingsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetFilingsInternalServerError creates a GetFilingsInternalServerError with default headers values +func NewGetFilingsInternalServerError() *GetFilingsInternalServerError { + return &GetFilingsInternalServerError{} +} + +/*GetFilingsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetFilingsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetFilingsInternalServerError) Error() string { + return fmt.Sprintf("[GET /filings][%d] getFilingsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetFilingsInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetFilingsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/filing/post_filings_parameters.go b/api/devops/regs_client/filing/post_filings_parameters.go new file mode 100644 index 0000000..3bb54e1 --- /dev/null +++ b/api/devops/regs_client/filing/post_filings_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package filing + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// NewPostFilingsParams creates a new PostFilingsParams object +// with the default values initialized. +func NewPostFilingsParams() *PostFilingsParams { + var () + return &PostFilingsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostFilingsParamsWithTimeout creates a new PostFilingsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostFilingsParamsWithTimeout(timeout time.Duration) *PostFilingsParams { + var () + return &PostFilingsParams{ + + timeout: timeout, + } +} + +// NewPostFilingsParamsWithContext creates a new PostFilingsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostFilingsParamsWithContext(ctx context.Context) *PostFilingsParams { + var () + return &PostFilingsParams{ + + Context: ctx, + } +} + +// NewPostFilingsParamsWithHTTPClient creates a new PostFilingsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostFilingsParamsWithHTTPClient(client *http.Client) *PostFilingsParams { + var () + return &PostFilingsParams{ + HTTPClient: client, + } +} + +/*PostFilingsParams contains all the parameters to send to the API endpoint +for the post filings operation typically these are written to a http.Request +*/ +type PostFilingsParams struct { + + /*FilingRequest + A request with an array of Filing Objects + + */ + FilingRequest *regs_models.FilingRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post filings params +func (o *PostFilingsParams) WithTimeout(timeout time.Duration) *PostFilingsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post filings params +func (o *PostFilingsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post filings params +func (o *PostFilingsParams) WithContext(ctx context.Context) *PostFilingsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post filings params +func (o *PostFilingsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post filings params +func (o *PostFilingsParams) WithHTTPClient(client *http.Client) *PostFilingsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post filings params +func (o *PostFilingsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithFilingRequest adds the filingRequest to the post filings params +func (o *PostFilingsParams) WithFilingRequest(filingRequest *regs_models.FilingRequest) *PostFilingsParams { + o.SetFilingRequest(filingRequest) + return o +} + +// SetFilingRequest adds the filingRequest to the post filings params +func (o *PostFilingsParams) SetFilingRequest(filingRequest *regs_models.FilingRequest) { + o.FilingRequest = filingRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostFilingsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.FilingRequest != nil { + if err := r.SetBodyParam(o.FilingRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/filing/post_filings_responses.go b/api/devops/regs_client/filing/post_filings_responses.go new file mode 100644 index 0000000..8c52c25 --- /dev/null +++ b/api/devops/regs_client/filing/post_filings_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package filing + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// PostFilingsReader is a Reader for the PostFilings structure. +type PostFilingsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostFilingsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostFilingsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostFilingsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostFilingsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostFilingsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostFilingsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostFilingsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostFilingsOK creates a PostFilingsOK with default headers values +func NewPostFilingsOK() *PostFilingsOK { + return &PostFilingsOK{} +} + +/*PostFilingsOK handles this case with default header values. + +Taxnexus Response with an array of Filing objects +*/ +type PostFilingsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *regs_models.FilingResponse +} + +func (o *PostFilingsOK) Error() string { + return fmt.Sprintf("[POST /filings][%d] postFilingsOK %+v", 200, o.Payload) +} + +func (o *PostFilingsOK) GetPayload() *regs_models.FilingResponse { + return o.Payload +} + +func (o *PostFilingsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(regs_models.FilingResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostFilingsUnauthorized creates a PostFilingsUnauthorized with default headers values +func NewPostFilingsUnauthorized() *PostFilingsUnauthorized { + return &PostFilingsUnauthorized{} +} + +/*PostFilingsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostFilingsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostFilingsUnauthorized) Error() string { + return fmt.Sprintf("[POST /filings][%d] postFilingsUnauthorized %+v", 401, o.Payload) +} + +func (o *PostFilingsUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostFilingsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostFilingsForbidden creates a PostFilingsForbidden with default headers values +func NewPostFilingsForbidden() *PostFilingsForbidden { + return &PostFilingsForbidden{} +} + +/*PostFilingsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostFilingsForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostFilingsForbidden) Error() string { + return fmt.Sprintf("[POST /filings][%d] postFilingsForbidden %+v", 403, o.Payload) +} + +func (o *PostFilingsForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostFilingsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostFilingsNotFound creates a PostFilingsNotFound with default headers values +func NewPostFilingsNotFound() *PostFilingsNotFound { + return &PostFilingsNotFound{} +} + +/*PostFilingsNotFound handles this case with default header values. + +Resource was not found +*/ +type PostFilingsNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostFilingsNotFound) Error() string { + return fmt.Sprintf("[POST /filings][%d] postFilingsNotFound %+v", 404, o.Payload) +} + +func (o *PostFilingsNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostFilingsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostFilingsUnprocessableEntity creates a PostFilingsUnprocessableEntity with default headers values +func NewPostFilingsUnprocessableEntity() *PostFilingsUnprocessableEntity { + return &PostFilingsUnprocessableEntity{} +} + +/*PostFilingsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostFilingsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostFilingsUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /filings][%d] postFilingsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostFilingsUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostFilingsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostFilingsInternalServerError creates a PostFilingsInternalServerError with default headers values +func NewPostFilingsInternalServerError() *PostFilingsInternalServerError { + return &PostFilingsInternalServerError{} +} + +/*PostFilingsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostFilingsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostFilingsInternalServerError) Error() string { + return fmt.Sprintf("[POST /filings][%d] postFilingsInternalServerError %+v", 500, o.Payload) +} + +func (o *PostFilingsInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostFilingsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/filing/put_filings_parameters.go b/api/devops/regs_client/filing/put_filings_parameters.go new file mode 100644 index 0000000..f71db2c --- /dev/null +++ b/api/devops/regs_client/filing/put_filings_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package filing + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// NewPutFilingsParams creates a new PutFilingsParams object +// with the default values initialized. +func NewPutFilingsParams() *PutFilingsParams { + var () + return &PutFilingsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPutFilingsParamsWithTimeout creates a new PutFilingsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPutFilingsParamsWithTimeout(timeout time.Duration) *PutFilingsParams { + var () + return &PutFilingsParams{ + + timeout: timeout, + } +} + +// NewPutFilingsParamsWithContext creates a new PutFilingsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPutFilingsParamsWithContext(ctx context.Context) *PutFilingsParams { + var () + return &PutFilingsParams{ + + Context: ctx, + } +} + +// NewPutFilingsParamsWithHTTPClient creates a new PutFilingsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPutFilingsParamsWithHTTPClient(client *http.Client) *PutFilingsParams { + var () + return &PutFilingsParams{ + HTTPClient: client, + } +} + +/*PutFilingsParams contains all the parameters to send to the API endpoint +for the put filings operation typically these are written to a http.Request +*/ +type PutFilingsParams struct { + + /*FilingRequest + A request with an array of Filing Objects + + */ + FilingRequest *regs_models.FilingRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the put filings params +func (o *PutFilingsParams) WithTimeout(timeout time.Duration) *PutFilingsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the put filings params +func (o *PutFilingsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the put filings params +func (o *PutFilingsParams) WithContext(ctx context.Context) *PutFilingsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the put filings params +func (o *PutFilingsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the put filings params +func (o *PutFilingsParams) WithHTTPClient(client *http.Client) *PutFilingsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the put filings params +func (o *PutFilingsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithFilingRequest adds the filingRequest to the put filings params +func (o *PutFilingsParams) WithFilingRequest(filingRequest *regs_models.FilingRequest) *PutFilingsParams { + o.SetFilingRequest(filingRequest) + return o +} + +// SetFilingRequest adds the filingRequest to the put filings params +func (o *PutFilingsParams) SetFilingRequest(filingRequest *regs_models.FilingRequest) { + o.FilingRequest = filingRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PutFilingsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.FilingRequest != nil { + if err := r.SetBodyParam(o.FilingRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/filing/put_filings_responses.go b/api/devops/regs_client/filing/put_filings_responses.go new file mode 100644 index 0000000..f36ea5e --- /dev/null +++ b/api/devops/regs_client/filing/put_filings_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package filing + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// PutFilingsReader is a Reader for the PutFilings structure. +type PutFilingsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PutFilingsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPutFilingsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPutFilingsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPutFilingsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPutFilingsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPutFilingsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPutFilingsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPutFilingsOK creates a PutFilingsOK with default headers values +func NewPutFilingsOK() *PutFilingsOK { + return &PutFilingsOK{} +} + +/*PutFilingsOK handles this case with default header values. + +Taxnexus Response with an array of Filing objects +*/ +type PutFilingsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *regs_models.FilingResponse +} + +func (o *PutFilingsOK) Error() string { + return fmt.Sprintf("[PUT /filings][%d] putFilingsOK %+v", 200, o.Payload) +} + +func (o *PutFilingsOK) GetPayload() *regs_models.FilingResponse { + return o.Payload +} + +func (o *PutFilingsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(regs_models.FilingResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutFilingsUnauthorized creates a PutFilingsUnauthorized with default headers values +func NewPutFilingsUnauthorized() *PutFilingsUnauthorized { + return &PutFilingsUnauthorized{} +} + +/*PutFilingsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PutFilingsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutFilingsUnauthorized) Error() string { + return fmt.Sprintf("[PUT /filings][%d] putFilingsUnauthorized %+v", 401, o.Payload) +} + +func (o *PutFilingsUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutFilingsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutFilingsForbidden creates a PutFilingsForbidden with default headers values +func NewPutFilingsForbidden() *PutFilingsForbidden { + return &PutFilingsForbidden{} +} + +/*PutFilingsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PutFilingsForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutFilingsForbidden) Error() string { + return fmt.Sprintf("[PUT /filings][%d] putFilingsForbidden %+v", 403, o.Payload) +} + +func (o *PutFilingsForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutFilingsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutFilingsNotFound creates a PutFilingsNotFound with default headers values +func NewPutFilingsNotFound() *PutFilingsNotFound { + return &PutFilingsNotFound{} +} + +/*PutFilingsNotFound handles this case with default header values. + +Resource was not found +*/ +type PutFilingsNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutFilingsNotFound) Error() string { + return fmt.Sprintf("[PUT /filings][%d] putFilingsNotFound %+v", 404, o.Payload) +} + +func (o *PutFilingsNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutFilingsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutFilingsUnprocessableEntity creates a PutFilingsUnprocessableEntity with default headers values +func NewPutFilingsUnprocessableEntity() *PutFilingsUnprocessableEntity { + return &PutFilingsUnprocessableEntity{} +} + +/*PutFilingsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PutFilingsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutFilingsUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /filings][%d] putFilingsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutFilingsUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutFilingsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutFilingsInternalServerError creates a PutFilingsInternalServerError with default headers values +func NewPutFilingsInternalServerError() *PutFilingsInternalServerError { + return &PutFilingsInternalServerError{} +} + +/*PutFilingsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PutFilingsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutFilingsInternalServerError) Error() string { + return fmt.Sprintf("[PUT /filings][%d] putFilingsInternalServerError %+v", 500, o.Payload) +} + +func (o *PutFilingsInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutFilingsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/filing_type/filing_type_client.go b/api/devops/regs_client/filing_type/filing_type_client.go new file mode 100644 index 0000000..cf8e74b --- /dev/null +++ b/api/devops/regs_client/filing_type/filing_type_client.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package filing_type + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new filing type API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for filing type API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetFilingTypes(params *GetFilingTypesParams, authInfo runtime.ClientAuthInfoWriter) (*GetFilingTypesOK, error) + + PostFilingTypes(params *PostFilingTypesParams, authInfo runtime.ClientAuthInfoWriter) (*PostFilingTypesOK, error) + + PutFilingTypes(params *PutFilingTypesParams, authInfo runtime.ClientAuthInfoWriter) (*PutFilingTypesOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetFilingTypes gets a list of filing types + + Return a list of available Regulatory FilingTypes +*/ +func (a *Client) GetFilingTypes(params *GetFilingTypesParams, authInfo runtime.ClientAuthInfoWriter) (*GetFilingTypesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetFilingTypesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getFilingTypes", + Method: "GET", + PathPattern: "/filingtypes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetFilingTypesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetFilingTypesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getFilingTypes: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostFilingTypes creates new filing types + + Create new FilingTypes +*/ +func (a *Client) PostFilingTypes(params *PostFilingTypesParams, authInfo runtime.ClientAuthInfoWriter) (*PostFilingTypesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostFilingTypesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postFilingTypes", + Method: "POST", + PathPattern: "/filingtypes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostFilingTypesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostFilingTypesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postFilingTypes: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PutFilingTypes updates a filing type + + Update all the fields in a FilingType record identified by Taxnexus ID +*/ +func (a *Client) PutFilingTypes(params *PutFilingTypesParams, authInfo runtime.ClientAuthInfoWriter) (*PutFilingTypesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPutFilingTypesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "putFilingTypes", + Method: "PUT", + PathPattern: "/filingtypes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PutFilingTypesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PutFilingTypesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for putFilingTypes: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/devops/regs_client/filing_type/get_filing_types_parameters.go b/api/devops/regs_client/filing_type/get_filing_types_parameters.go new file mode 100644 index 0000000..04dc0fc --- /dev/null +++ b/api/devops/regs_client/filing_type/get_filing_types_parameters.go @@ -0,0 +1,215 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package filing_type + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetFilingTypesParams creates a new GetFilingTypesParams object +// with the default values initialized. +func NewGetFilingTypesParams() *GetFilingTypesParams { + var () + return &GetFilingTypesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetFilingTypesParamsWithTimeout creates a new GetFilingTypesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetFilingTypesParamsWithTimeout(timeout time.Duration) *GetFilingTypesParams { + var () + return &GetFilingTypesParams{ + + timeout: timeout, + } +} + +// NewGetFilingTypesParamsWithContext creates a new GetFilingTypesParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetFilingTypesParamsWithContext(ctx context.Context) *GetFilingTypesParams { + var () + return &GetFilingTypesParams{ + + Context: ctx, + } +} + +// NewGetFilingTypesParamsWithHTTPClient creates a new GetFilingTypesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetFilingTypesParamsWithHTTPClient(client *http.Client) *GetFilingTypesParams { + var () + return &GetFilingTypesParams{ + HTTPClient: client, + } +} + +/*GetFilingTypesParams contains all the parameters to send to the API endpoint +for the get filing types operation typically these are written to a http.Request +*/ +type GetFilingTypesParams struct { + + /*FilingTypeID + Taxnexus Record Id of a Filing + + */ + FilingTypeID *string + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get filing types params +func (o *GetFilingTypesParams) WithTimeout(timeout time.Duration) *GetFilingTypesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get filing types params +func (o *GetFilingTypesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get filing types params +func (o *GetFilingTypesParams) WithContext(ctx context.Context) *GetFilingTypesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get filing types params +func (o *GetFilingTypesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get filing types params +func (o *GetFilingTypesParams) WithHTTPClient(client *http.Client) *GetFilingTypesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get filing types params +func (o *GetFilingTypesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithFilingTypeID adds the filingTypeID to the get filing types params +func (o *GetFilingTypesParams) WithFilingTypeID(filingTypeID *string) *GetFilingTypesParams { + o.SetFilingTypeID(filingTypeID) + return o +} + +// SetFilingTypeID adds the filingTypeId to the get filing types params +func (o *GetFilingTypesParams) SetFilingTypeID(filingTypeID *string) { + o.FilingTypeID = filingTypeID +} + +// WithLimit adds the limit to the get filing types params +func (o *GetFilingTypesParams) WithLimit(limit *int64) *GetFilingTypesParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get filing types params +func (o *GetFilingTypesParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get filing types params +func (o *GetFilingTypesParams) WithOffset(offset *int64) *GetFilingTypesParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get filing types params +func (o *GetFilingTypesParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *GetFilingTypesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.FilingTypeID != nil { + + // query param filingTypeId + var qrFilingTypeID string + if o.FilingTypeID != nil { + qrFilingTypeID = *o.FilingTypeID + } + qFilingTypeID := qrFilingTypeID + if qFilingTypeID != "" { + if err := r.SetQueryParam("filingTypeId", qFilingTypeID); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/filing_type/get_filing_types_responses.go b/api/devops/regs_client/filing_type/get_filing_types_responses.go new file mode 100644 index 0000000..0884817 --- /dev/null +++ b/api/devops/regs_client/filing_type/get_filing_types_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package filing_type + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// GetFilingTypesReader is a Reader for the GetFilingTypes structure. +type GetFilingTypesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetFilingTypesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetFilingTypesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetFilingTypesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetFilingTypesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetFilingTypesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetFilingTypesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetFilingTypesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetFilingTypesOK creates a GetFilingTypesOK with default headers values +func NewGetFilingTypesOK() *GetFilingTypesOK { + return &GetFilingTypesOK{} +} + +/*GetFilingTypesOK handles this case with default header values. + +Taxnexus Response with an array of FilingType objects +*/ +type GetFilingTypesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *regs_models.FilingTypeResponse +} + +func (o *GetFilingTypesOK) Error() string { + return fmt.Sprintf("[GET /filingtypes][%d] getFilingTypesOK %+v", 200, o.Payload) +} + +func (o *GetFilingTypesOK) GetPayload() *regs_models.FilingTypeResponse { + return o.Payload +} + +func (o *GetFilingTypesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(regs_models.FilingTypeResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetFilingTypesUnauthorized creates a GetFilingTypesUnauthorized with default headers values +func NewGetFilingTypesUnauthorized() *GetFilingTypesUnauthorized { + return &GetFilingTypesUnauthorized{} +} + +/*GetFilingTypesUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetFilingTypesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetFilingTypesUnauthorized) Error() string { + return fmt.Sprintf("[GET /filingtypes][%d] getFilingTypesUnauthorized %+v", 401, o.Payload) +} + +func (o *GetFilingTypesUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetFilingTypesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetFilingTypesForbidden creates a GetFilingTypesForbidden with default headers values +func NewGetFilingTypesForbidden() *GetFilingTypesForbidden { + return &GetFilingTypesForbidden{} +} + +/*GetFilingTypesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetFilingTypesForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetFilingTypesForbidden) Error() string { + return fmt.Sprintf("[GET /filingtypes][%d] getFilingTypesForbidden %+v", 403, o.Payload) +} + +func (o *GetFilingTypesForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetFilingTypesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetFilingTypesNotFound creates a GetFilingTypesNotFound with default headers values +func NewGetFilingTypesNotFound() *GetFilingTypesNotFound { + return &GetFilingTypesNotFound{} +} + +/*GetFilingTypesNotFound handles this case with default header values. + +Resource was not found +*/ +type GetFilingTypesNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetFilingTypesNotFound) Error() string { + return fmt.Sprintf("[GET /filingtypes][%d] getFilingTypesNotFound %+v", 404, o.Payload) +} + +func (o *GetFilingTypesNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetFilingTypesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetFilingTypesUnprocessableEntity creates a GetFilingTypesUnprocessableEntity with default headers values +func NewGetFilingTypesUnprocessableEntity() *GetFilingTypesUnprocessableEntity { + return &GetFilingTypesUnprocessableEntity{} +} + +/*GetFilingTypesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetFilingTypesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetFilingTypesUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /filingtypes][%d] getFilingTypesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetFilingTypesUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetFilingTypesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetFilingTypesInternalServerError creates a GetFilingTypesInternalServerError with default headers values +func NewGetFilingTypesInternalServerError() *GetFilingTypesInternalServerError { + return &GetFilingTypesInternalServerError{} +} + +/*GetFilingTypesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetFilingTypesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetFilingTypesInternalServerError) Error() string { + return fmt.Sprintf("[GET /filingtypes][%d] getFilingTypesInternalServerError %+v", 500, o.Payload) +} + +func (o *GetFilingTypesInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetFilingTypesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/filing_type/post_filing_types_parameters.go b/api/devops/regs_client/filing_type/post_filing_types_parameters.go new file mode 100644 index 0000000..38f97c6 --- /dev/null +++ b/api/devops/regs_client/filing_type/post_filing_types_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package filing_type + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// NewPostFilingTypesParams creates a new PostFilingTypesParams object +// with the default values initialized. +func NewPostFilingTypesParams() *PostFilingTypesParams { + var () + return &PostFilingTypesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostFilingTypesParamsWithTimeout creates a new PostFilingTypesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostFilingTypesParamsWithTimeout(timeout time.Duration) *PostFilingTypesParams { + var () + return &PostFilingTypesParams{ + + timeout: timeout, + } +} + +// NewPostFilingTypesParamsWithContext creates a new PostFilingTypesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostFilingTypesParamsWithContext(ctx context.Context) *PostFilingTypesParams { + var () + return &PostFilingTypesParams{ + + Context: ctx, + } +} + +// NewPostFilingTypesParamsWithHTTPClient creates a new PostFilingTypesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostFilingTypesParamsWithHTTPClient(client *http.Client) *PostFilingTypesParams { + var () + return &PostFilingTypesParams{ + HTTPClient: client, + } +} + +/*PostFilingTypesParams contains all the parameters to send to the API endpoint +for the post filing types operation typically these are written to a http.Request +*/ +type PostFilingTypesParams struct { + + /*FilingTypeRequest + A request with an array of FilingType Objects + + */ + FilingTypeRequest *regs_models.FilingTypeRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post filing types params +func (o *PostFilingTypesParams) WithTimeout(timeout time.Duration) *PostFilingTypesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post filing types params +func (o *PostFilingTypesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post filing types params +func (o *PostFilingTypesParams) WithContext(ctx context.Context) *PostFilingTypesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post filing types params +func (o *PostFilingTypesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post filing types params +func (o *PostFilingTypesParams) WithHTTPClient(client *http.Client) *PostFilingTypesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post filing types params +func (o *PostFilingTypesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithFilingTypeRequest adds the filingTypeRequest to the post filing types params +func (o *PostFilingTypesParams) WithFilingTypeRequest(filingTypeRequest *regs_models.FilingTypeRequest) *PostFilingTypesParams { + o.SetFilingTypeRequest(filingTypeRequest) + return o +} + +// SetFilingTypeRequest adds the filingTypeRequest to the post filing types params +func (o *PostFilingTypesParams) SetFilingTypeRequest(filingTypeRequest *regs_models.FilingTypeRequest) { + o.FilingTypeRequest = filingTypeRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostFilingTypesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.FilingTypeRequest != nil { + if err := r.SetBodyParam(o.FilingTypeRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/filing_type/post_filing_types_responses.go b/api/devops/regs_client/filing_type/post_filing_types_responses.go new file mode 100644 index 0000000..42c05e0 --- /dev/null +++ b/api/devops/regs_client/filing_type/post_filing_types_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package filing_type + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// PostFilingTypesReader is a Reader for the PostFilingTypes structure. +type PostFilingTypesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostFilingTypesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostFilingTypesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostFilingTypesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostFilingTypesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostFilingTypesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostFilingTypesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostFilingTypesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostFilingTypesOK creates a PostFilingTypesOK with default headers values +func NewPostFilingTypesOK() *PostFilingTypesOK { + return &PostFilingTypesOK{} +} + +/*PostFilingTypesOK handles this case with default header values. + +Taxnexus Response with an array of FilingType objects +*/ +type PostFilingTypesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *regs_models.FilingTypeResponse +} + +func (o *PostFilingTypesOK) Error() string { + return fmt.Sprintf("[POST /filingtypes][%d] postFilingTypesOK %+v", 200, o.Payload) +} + +func (o *PostFilingTypesOK) GetPayload() *regs_models.FilingTypeResponse { + return o.Payload +} + +func (o *PostFilingTypesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(regs_models.FilingTypeResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostFilingTypesUnauthorized creates a PostFilingTypesUnauthorized with default headers values +func NewPostFilingTypesUnauthorized() *PostFilingTypesUnauthorized { + return &PostFilingTypesUnauthorized{} +} + +/*PostFilingTypesUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostFilingTypesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostFilingTypesUnauthorized) Error() string { + return fmt.Sprintf("[POST /filingtypes][%d] postFilingTypesUnauthorized %+v", 401, o.Payload) +} + +func (o *PostFilingTypesUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostFilingTypesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostFilingTypesForbidden creates a PostFilingTypesForbidden with default headers values +func NewPostFilingTypesForbidden() *PostFilingTypesForbidden { + return &PostFilingTypesForbidden{} +} + +/*PostFilingTypesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostFilingTypesForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostFilingTypesForbidden) Error() string { + return fmt.Sprintf("[POST /filingtypes][%d] postFilingTypesForbidden %+v", 403, o.Payload) +} + +func (o *PostFilingTypesForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostFilingTypesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostFilingTypesNotFound creates a PostFilingTypesNotFound with default headers values +func NewPostFilingTypesNotFound() *PostFilingTypesNotFound { + return &PostFilingTypesNotFound{} +} + +/*PostFilingTypesNotFound handles this case with default header values. + +Resource was not found +*/ +type PostFilingTypesNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostFilingTypesNotFound) Error() string { + return fmt.Sprintf("[POST /filingtypes][%d] postFilingTypesNotFound %+v", 404, o.Payload) +} + +func (o *PostFilingTypesNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostFilingTypesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostFilingTypesUnprocessableEntity creates a PostFilingTypesUnprocessableEntity with default headers values +func NewPostFilingTypesUnprocessableEntity() *PostFilingTypesUnprocessableEntity { + return &PostFilingTypesUnprocessableEntity{} +} + +/*PostFilingTypesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostFilingTypesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostFilingTypesUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /filingtypes][%d] postFilingTypesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostFilingTypesUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostFilingTypesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostFilingTypesInternalServerError creates a PostFilingTypesInternalServerError with default headers values +func NewPostFilingTypesInternalServerError() *PostFilingTypesInternalServerError { + return &PostFilingTypesInternalServerError{} +} + +/*PostFilingTypesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostFilingTypesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostFilingTypesInternalServerError) Error() string { + return fmt.Sprintf("[POST /filingtypes][%d] postFilingTypesInternalServerError %+v", 500, o.Payload) +} + +func (o *PostFilingTypesInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostFilingTypesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/filing_type/put_filing_types_parameters.go b/api/devops/regs_client/filing_type/put_filing_types_parameters.go new file mode 100644 index 0000000..23505c9 --- /dev/null +++ b/api/devops/regs_client/filing_type/put_filing_types_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package filing_type + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// NewPutFilingTypesParams creates a new PutFilingTypesParams object +// with the default values initialized. +func NewPutFilingTypesParams() *PutFilingTypesParams { + var () + return &PutFilingTypesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPutFilingTypesParamsWithTimeout creates a new PutFilingTypesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPutFilingTypesParamsWithTimeout(timeout time.Duration) *PutFilingTypesParams { + var () + return &PutFilingTypesParams{ + + timeout: timeout, + } +} + +// NewPutFilingTypesParamsWithContext creates a new PutFilingTypesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPutFilingTypesParamsWithContext(ctx context.Context) *PutFilingTypesParams { + var () + return &PutFilingTypesParams{ + + Context: ctx, + } +} + +// NewPutFilingTypesParamsWithHTTPClient creates a new PutFilingTypesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPutFilingTypesParamsWithHTTPClient(client *http.Client) *PutFilingTypesParams { + var () + return &PutFilingTypesParams{ + HTTPClient: client, + } +} + +/*PutFilingTypesParams contains all the parameters to send to the API endpoint +for the put filing types operation typically these are written to a http.Request +*/ +type PutFilingTypesParams struct { + + /*FilingTypeRequest + A request with an array of FilingType Objects + + */ + FilingTypeRequest *regs_models.FilingTypeRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the put filing types params +func (o *PutFilingTypesParams) WithTimeout(timeout time.Duration) *PutFilingTypesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the put filing types params +func (o *PutFilingTypesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the put filing types params +func (o *PutFilingTypesParams) WithContext(ctx context.Context) *PutFilingTypesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the put filing types params +func (o *PutFilingTypesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the put filing types params +func (o *PutFilingTypesParams) WithHTTPClient(client *http.Client) *PutFilingTypesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the put filing types params +func (o *PutFilingTypesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithFilingTypeRequest adds the filingTypeRequest to the put filing types params +func (o *PutFilingTypesParams) WithFilingTypeRequest(filingTypeRequest *regs_models.FilingTypeRequest) *PutFilingTypesParams { + o.SetFilingTypeRequest(filingTypeRequest) + return o +} + +// SetFilingTypeRequest adds the filingTypeRequest to the put filing types params +func (o *PutFilingTypesParams) SetFilingTypeRequest(filingTypeRequest *regs_models.FilingTypeRequest) { + o.FilingTypeRequest = filingTypeRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PutFilingTypesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.FilingTypeRequest != nil { + if err := r.SetBodyParam(o.FilingTypeRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/filing_type/put_filing_types_responses.go b/api/devops/regs_client/filing_type/put_filing_types_responses.go new file mode 100644 index 0000000..0d4bfa0 --- /dev/null +++ b/api/devops/regs_client/filing_type/put_filing_types_responses.go @@ -0,0 +1,259 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package filing_type + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// PutFilingTypesReader is a Reader for the PutFilingTypes structure. +type PutFilingTypesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PutFilingTypesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPutFilingTypesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPutFilingTypesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPutFilingTypesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPutFilingTypesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPutFilingTypesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPutFilingTypesOK creates a PutFilingTypesOK with default headers values +func NewPutFilingTypesOK() *PutFilingTypesOK { + return &PutFilingTypesOK{} +} + +/*PutFilingTypesOK handles this case with default header values. + +Taxnexus Response with an array of FilingType objects +*/ +type PutFilingTypesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *regs_models.FilingTypeResponse +} + +func (o *PutFilingTypesOK) Error() string { + return fmt.Sprintf("[PUT /filingtypes][%d] putFilingTypesOK %+v", 200, o.Payload) +} + +func (o *PutFilingTypesOK) GetPayload() *regs_models.FilingTypeResponse { + return o.Payload +} + +func (o *PutFilingTypesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(regs_models.FilingTypeResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutFilingTypesUnauthorized creates a PutFilingTypesUnauthorized with default headers values +func NewPutFilingTypesUnauthorized() *PutFilingTypesUnauthorized { + return &PutFilingTypesUnauthorized{} +} + +/*PutFilingTypesUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PutFilingTypesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutFilingTypesUnauthorized) Error() string { + return fmt.Sprintf("[PUT /filingtypes][%d] putFilingTypesUnauthorized %+v", 401, o.Payload) +} + +func (o *PutFilingTypesUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutFilingTypesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutFilingTypesForbidden creates a PutFilingTypesForbidden with default headers values +func NewPutFilingTypesForbidden() *PutFilingTypesForbidden { + return &PutFilingTypesForbidden{} +} + +/*PutFilingTypesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PutFilingTypesForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutFilingTypesForbidden) Error() string { + return fmt.Sprintf("[PUT /filingtypes][%d] putFilingTypesForbidden %+v", 403, o.Payload) +} + +func (o *PutFilingTypesForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutFilingTypesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutFilingTypesNotFound creates a PutFilingTypesNotFound with default headers values +func NewPutFilingTypesNotFound() *PutFilingTypesNotFound { + return &PutFilingTypesNotFound{} +} + +/*PutFilingTypesNotFound handles this case with default header values. + +Resource was not found +*/ +type PutFilingTypesNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutFilingTypesNotFound) Error() string { + return fmt.Sprintf("[PUT /filingtypes][%d] putFilingTypesNotFound %+v", 404, o.Payload) +} + +func (o *PutFilingTypesNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutFilingTypesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutFilingTypesInternalServerError creates a PutFilingTypesInternalServerError with default headers values +func NewPutFilingTypesInternalServerError() *PutFilingTypesInternalServerError { + return &PutFilingTypesInternalServerError{} +} + +/*PutFilingTypesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PutFilingTypesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutFilingTypesInternalServerError) Error() string { + return fmt.Sprintf("[PUT /filingtypes][%d] putFilingTypesInternalServerError %+v", 500, o.Payload) +} + +func (o *PutFilingTypesInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutFilingTypesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/license/get_licenses_parameters.go b/api/devops/regs_client/license/get_licenses_parameters.go new file mode 100644 index 0000000..d57feb1 --- /dev/null +++ b/api/devops/regs_client/license/get_licenses_parameters.go @@ -0,0 +1,311 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package license + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetLicensesParams creates a new GetLicensesParams object +// with the default values initialized. +func NewGetLicensesParams() *GetLicensesParams { + var () + return &GetLicensesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetLicensesParamsWithTimeout creates a new GetLicensesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetLicensesParamsWithTimeout(timeout time.Duration) *GetLicensesParams { + var () + return &GetLicensesParams{ + + timeout: timeout, + } +} + +// NewGetLicensesParamsWithContext creates a new GetLicensesParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetLicensesParamsWithContext(ctx context.Context) *GetLicensesParams { + var () + return &GetLicensesParams{ + + Context: ctx, + } +} + +// NewGetLicensesParamsWithHTTPClient creates a new GetLicensesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetLicensesParamsWithHTTPClient(client *http.Client) *GetLicensesParams { + var () + return &GetLicensesParams{ + HTTPClient: client, + } +} + +/*GetLicensesParams contains all the parameters to send to the API endpoint +for the get licenses operation typically these are written to a http.Request +*/ +type GetLicensesParams struct { + + /*AccountID + Taxnexus Record Id of an Account + + */ + AccountID *string + /*CompanyID + Taxnexus Record Id of a Company + + */ + CompanyID *string + /*ID + Taxnexus Id of the record to be retrieved + + */ + ID *string + /*LicenseID + Taxnexus Record Id of a License + + */ + LicenseID *string + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get licenses params +func (o *GetLicensesParams) WithTimeout(timeout time.Duration) *GetLicensesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get licenses params +func (o *GetLicensesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get licenses params +func (o *GetLicensesParams) WithContext(ctx context.Context) *GetLicensesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get licenses params +func (o *GetLicensesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get licenses params +func (o *GetLicensesParams) WithHTTPClient(client *http.Client) *GetLicensesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get licenses params +func (o *GetLicensesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAccountID adds the accountID to the get licenses params +func (o *GetLicensesParams) WithAccountID(accountID *string) *GetLicensesParams { + o.SetAccountID(accountID) + return o +} + +// SetAccountID adds the accountId to the get licenses params +func (o *GetLicensesParams) SetAccountID(accountID *string) { + o.AccountID = accountID +} + +// WithCompanyID adds the companyID to the get licenses params +func (o *GetLicensesParams) WithCompanyID(companyID *string) *GetLicensesParams { + o.SetCompanyID(companyID) + return o +} + +// SetCompanyID adds the companyId to the get licenses params +func (o *GetLicensesParams) SetCompanyID(companyID *string) { + o.CompanyID = companyID +} + +// WithID adds the id to the get licenses params +func (o *GetLicensesParams) WithID(id *string) *GetLicensesParams { + o.SetID(id) + return o +} + +// SetID adds the id to the get licenses params +func (o *GetLicensesParams) SetID(id *string) { + o.ID = id +} + +// WithLicenseID adds the licenseID to the get licenses params +func (o *GetLicensesParams) WithLicenseID(licenseID *string) *GetLicensesParams { + o.SetLicenseID(licenseID) + return o +} + +// SetLicenseID adds the licenseId to the get licenses params +func (o *GetLicensesParams) SetLicenseID(licenseID *string) { + o.LicenseID = licenseID +} + +// WithLimit adds the limit to the get licenses params +func (o *GetLicensesParams) WithLimit(limit *int64) *GetLicensesParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get licenses params +func (o *GetLicensesParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get licenses params +func (o *GetLicensesParams) WithOffset(offset *int64) *GetLicensesParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get licenses params +func (o *GetLicensesParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *GetLicensesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AccountID != nil { + + // query param accountId + var qrAccountID string + if o.AccountID != nil { + qrAccountID = *o.AccountID + } + qAccountID := qrAccountID + if qAccountID != "" { + if err := r.SetQueryParam("accountId", qAccountID); err != nil { + return err + } + } + + } + + if o.CompanyID != nil { + + // query param companyId + var qrCompanyID string + if o.CompanyID != nil { + qrCompanyID = *o.CompanyID + } + qCompanyID := qrCompanyID + if qCompanyID != "" { + if err := r.SetQueryParam("companyId", qCompanyID); err != nil { + return err + } + } + + } + + if o.ID != nil { + + // query param id + var qrID string + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + + } + + if o.LicenseID != nil { + + // query param licenseId + var qrLicenseID string + if o.LicenseID != nil { + qrLicenseID = *o.LicenseID + } + qLicenseID := qrLicenseID + if qLicenseID != "" { + if err := r.SetQueryParam("licenseId", qLicenseID); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/license/get_licenses_responses.go b/api/devops/regs_client/license/get_licenses_responses.go new file mode 100644 index 0000000..d59d7f9 --- /dev/null +++ b/api/devops/regs_client/license/get_licenses_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package license + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// GetLicensesReader is a Reader for the GetLicenses structure. +type GetLicensesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetLicensesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetLicensesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetLicensesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetLicensesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetLicensesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetLicensesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetLicensesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetLicensesOK creates a GetLicensesOK with default headers values +func NewGetLicensesOK() *GetLicensesOK { + return &GetLicensesOK{} +} + +/*GetLicensesOK handles this case with default header values. + +Taxnexus Response with License objects +*/ +type GetLicensesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *regs_models.LicenseResponse +} + +func (o *GetLicensesOK) Error() string { + return fmt.Sprintf("[GET /licenses][%d] getLicensesOK %+v", 200, o.Payload) +} + +func (o *GetLicensesOK) GetPayload() *regs_models.LicenseResponse { + return o.Payload +} + +func (o *GetLicensesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(regs_models.LicenseResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetLicensesUnauthorized creates a GetLicensesUnauthorized with default headers values +func NewGetLicensesUnauthorized() *GetLicensesUnauthorized { + return &GetLicensesUnauthorized{} +} + +/*GetLicensesUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetLicensesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetLicensesUnauthorized) Error() string { + return fmt.Sprintf("[GET /licenses][%d] getLicensesUnauthorized %+v", 401, o.Payload) +} + +func (o *GetLicensesUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetLicensesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetLicensesForbidden creates a GetLicensesForbidden with default headers values +func NewGetLicensesForbidden() *GetLicensesForbidden { + return &GetLicensesForbidden{} +} + +/*GetLicensesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetLicensesForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetLicensesForbidden) Error() string { + return fmt.Sprintf("[GET /licenses][%d] getLicensesForbidden %+v", 403, o.Payload) +} + +func (o *GetLicensesForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetLicensesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetLicensesNotFound creates a GetLicensesNotFound with default headers values +func NewGetLicensesNotFound() *GetLicensesNotFound { + return &GetLicensesNotFound{} +} + +/*GetLicensesNotFound handles this case with default header values. + +Resource was not found +*/ +type GetLicensesNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetLicensesNotFound) Error() string { + return fmt.Sprintf("[GET /licenses][%d] getLicensesNotFound %+v", 404, o.Payload) +} + +func (o *GetLicensesNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetLicensesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetLicensesUnprocessableEntity creates a GetLicensesUnprocessableEntity with default headers values +func NewGetLicensesUnprocessableEntity() *GetLicensesUnprocessableEntity { + return &GetLicensesUnprocessableEntity{} +} + +/*GetLicensesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetLicensesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetLicensesUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /licenses][%d] getLicensesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetLicensesUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetLicensesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetLicensesInternalServerError creates a GetLicensesInternalServerError with default headers values +func NewGetLicensesInternalServerError() *GetLicensesInternalServerError { + return &GetLicensesInternalServerError{} +} + +/*GetLicensesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetLicensesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetLicensesInternalServerError) Error() string { + return fmt.Sprintf("[GET /licenses][%d] getLicensesInternalServerError %+v", 500, o.Payload) +} + +func (o *GetLicensesInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetLicensesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/license/license_client.go b/api/devops/regs_client/license/license_client.go new file mode 100644 index 0000000..bcbaaeb --- /dev/null +++ b/api/devops/regs_client/license/license_client.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package license + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new license API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for license API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetLicenses(params *GetLicensesParams, authInfo runtime.ClientAuthInfoWriter) (*GetLicensesOK, error) + + PostLicenses(params *PostLicensesParams, authInfo runtime.ClientAuthInfoWriter) (*PostLicensesOK, error) + + PutLicenses(params *PutLicensesParams, authInfo runtime.ClientAuthInfoWriter) (*PutLicensesOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetLicenses retrieves licenses + + Retrieve all licenses, filter with parameters +*/ +func (a *Client) GetLicenses(params *GetLicensesParams, authInfo runtime.ClientAuthInfoWriter) (*GetLicensesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetLicensesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getLicenses", + Method: "GET", + PathPattern: "/licenses", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetLicensesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetLicensesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getLicenses: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostLicenses creates new licenses + + Create new Licenses +*/ +func (a *Client) PostLicenses(params *PostLicensesParams, authInfo runtime.ClientAuthInfoWriter) (*PostLicensesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostLicensesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postLicenses", + Method: "POST", + PathPattern: "/licenses", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostLicensesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostLicensesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postLicenses: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PutLicenses upserts a license + + Add or update licenses +*/ +func (a *Client) PutLicenses(params *PutLicensesParams, authInfo runtime.ClientAuthInfoWriter) (*PutLicensesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPutLicensesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "putLicenses", + Method: "PUT", + PathPattern: "/licenses", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PutLicensesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PutLicensesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for putLicenses: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/devops/regs_client/license/post_licenses_parameters.go b/api/devops/regs_client/license/post_licenses_parameters.go new file mode 100644 index 0000000..8c2c623 --- /dev/null +++ b/api/devops/regs_client/license/post_licenses_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package license + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// NewPostLicensesParams creates a new PostLicensesParams object +// with the default values initialized. +func NewPostLicensesParams() *PostLicensesParams { + var () + return &PostLicensesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostLicensesParamsWithTimeout creates a new PostLicensesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostLicensesParamsWithTimeout(timeout time.Duration) *PostLicensesParams { + var () + return &PostLicensesParams{ + + timeout: timeout, + } +} + +// NewPostLicensesParamsWithContext creates a new PostLicensesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostLicensesParamsWithContext(ctx context.Context) *PostLicensesParams { + var () + return &PostLicensesParams{ + + Context: ctx, + } +} + +// NewPostLicensesParamsWithHTTPClient creates a new PostLicensesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostLicensesParamsWithHTTPClient(client *http.Client) *PostLicensesParams { + var () + return &PostLicensesParams{ + HTTPClient: client, + } +} + +/*PostLicensesParams contains all the parameters to send to the API endpoint +for the post licenses operation typically these are written to a http.Request +*/ +type PostLicensesParams struct { + + /*LicenseRequest + The new licenses + + */ + LicenseRequest *regs_models.LicenseRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post licenses params +func (o *PostLicensesParams) WithTimeout(timeout time.Duration) *PostLicensesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post licenses params +func (o *PostLicensesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post licenses params +func (o *PostLicensesParams) WithContext(ctx context.Context) *PostLicensesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post licenses params +func (o *PostLicensesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post licenses params +func (o *PostLicensesParams) WithHTTPClient(client *http.Client) *PostLicensesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post licenses params +func (o *PostLicensesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithLicenseRequest adds the licenseRequest to the post licenses params +func (o *PostLicensesParams) WithLicenseRequest(licenseRequest *regs_models.LicenseRequest) *PostLicensesParams { + o.SetLicenseRequest(licenseRequest) + return o +} + +// SetLicenseRequest adds the licenseRequest to the post licenses params +func (o *PostLicensesParams) SetLicenseRequest(licenseRequest *regs_models.LicenseRequest) { + o.LicenseRequest = licenseRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostLicensesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.LicenseRequest != nil { + if err := r.SetBodyParam(o.LicenseRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/license/post_licenses_responses.go b/api/devops/regs_client/license/post_licenses_responses.go new file mode 100644 index 0000000..b0e1158 --- /dev/null +++ b/api/devops/regs_client/license/post_licenses_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package license + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// PostLicensesReader is a Reader for the PostLicenses structure. +type PostLicensesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostLicensesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostLicensesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostLicensesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostLicensesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostLicensesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostLicensesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostLicensesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostLicensesOK creates a PostLicensesOK with default headers values +func NewPostLicensesOK() *PostLicensesOK { + return &PostLicensesOK{} +} + +/*PostLicensesOK handles this case with default header values. + +Taxnexus Response with License objects +*/ +type PostLicensesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *regs_models.LicenseResponse +} + +func (o *PostLicensesOK) Error() string { + return fmt.Sprintf("[POST /licenses][%d] postLicensesOK %+v", 200, o.Payload) +} + +func (o *PostLicensesOK) GetPayload() *regs_models.LicenseResponse { + return o.Payload +} + +func (o *PostLicensesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(regs_models.LicenseResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostLicensesUnauthorized creates a PostLicensesUnauthorized with default headers values +func NewPostLicensesUnauthorized() *PostLicensesUnauthorized { + return &PostLicensesUnauthorized{} +} + +/*PostLicensesUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostLicensesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostLicensesUnauthorized) Error() string { + return fmt.Sprintf("[POST /licenses][%d] postLicensesUnauthorized %+v", 401, o.Payload) +} + +func (o *PostLicensesUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostLicensesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostLicensesForbidden creates a PostLicensesForbidden with default headers values +func NewPostLicensesForbidden() *PostLicensesForbidden { + return &PostLicensesForbidden{} +} + +/*PostLicensesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostLicensesForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostLicensesForbidden) Error() string { + return fmt.Sprintf("[POST /licenses][%d] postLicensesForbidden %+v", 403, o.Payload) +} + +func (o *PostLicensesForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostLicensesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostLicensesNotFound creates a PostLicensesNotFound with default headers values +func NewPostLicensesNotFound() *PostLicensesNotFound { + return &PostLicensesNotFound{} +} + +/*PostLicensesNotFound handles this case with default header values. + +Resource was not found +*/ +type PostLicensesNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostLicensesNotFound) Error() string { + return fmt.Sprintf("[POST /licenses][%d] postLicensesNotFound %+v", 404, o.Payload) +} + +func (o *PostLicensesNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostLicensesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostLicensesUnprocessableEntity creates a PostLicensesUnprocessableEntity with default headers values +func NewPostLicensesUnprocessableEntity() *PostLicensesUnprocessableEntity { + return &PostLicensesUnprocessableEntity{} +} + +/*PostLicensesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostLicensesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostLicensesUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /licenses][%d] postLicensesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostLicensesUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostLicensesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostLicensesInternalServerError creates a PostLicensesInternalServerError with default headers values +func NewPostLicensesInternalServerError() *PostLicensesInternalServerError { + return &PostLicensesInternalServerError{} +} + +/*PostLicensesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostLicensesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostLicensesInternalServerError) Error() string { + return fmt.Sprintf("[POST /licenses][%d] postLicensesInternalServerError %+v", 500, o.Payload) +} + +func (o *PostLicensesInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostLicensesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/license/put_licenses_parameters.go b/api/devops/regs_client/license/put_licenses_parameters.go new file mode 100644 index 0000000..0ced830 --- /dev/null +++ b/api/devops/regs_client/license/put_licenses_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package license + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// NewPutLicensesParams creates a new PutLicensesParams object +// with the default values initialized. +func NewPutLicensesParams() *PutLicensesParams { + var () + return &PutLicensesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPutLicensesParamsWithTimeout creates a new PutLicensesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPutLicensesParamsWithTimeout(timeout time.Duration) *PutLicensesParams { + var () + return &PutLicensesParams{ + + timeout: timeout, + } +} + +// NewPutLicensesParamsWithContext creates a new PutLicensesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPutLicensesParamsWithContext(ctx context.Context) *PutLicensesParams { + var () + return &PutLicensesParams{ + + Context: ctx, + } +} + +// NewPutLicensesParamsWithHTTPClient creates a new PutLicensesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPutLicensesParamsWithHTTPClient(client *http.Client) *PutLicensesParams { + var () + return &PutLicensesParams{ + HTTPClient: client, + } +} + +/*PutLicensesParams contains all the parameters to send to the API endpoint +for the put licenses operation typically these are written to a http.Request +*/ +type PutLicensesParams struct { + + /*LicenseRequest + The updated licenses + + */ + LicenseRequest *regs_models.LicenseRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the put licenses params +func (o *PutLicensesParams) WithTimeout(timeout time.Duration) *PutLicensesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the put licenses params +func (o *PutLicensesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the put licenses params +func (o *PutLicensesParams) WithContext(ctx context.Context) *PutLicensesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the put licenses params +func (o *PutLicensesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the put licenses params +func (o *PutLicensesParams) WithHTTPClient(client *http.Client) *PutLicensesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the put licenses params +func (o *PutLicensesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithLicenseRequest adds the licenseRequest to the put licenses params +func (o *PutLicensesParams) WithLicenseRequest(licenseRequest *regs_models.LicenseRequest) *PutLicensesParams { + o.SetLicenseRequest(licenseRequest) + return o +} + +// SetLicenseRequest adds the licenseRequest to the put licenses params +func (o *PutLicensesParams) SetLicenseRequest(licenseRequest *regs_models.LicenseRequest) { + o.LicenseRequest = licenseRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PutLicensesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.LicenseRequest != nil { + if err := r.SetBodyParam(o.LicenseRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/license/put_licenses_responses.go b/api/devops/regs_client/license/put_licenses_responses.go new file mode 100644 index 0000000..9dbb772 --- /dev/null +++ b/api/devops/regs_client/license/put_licenses_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package license + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// PutLicensesReader is a Reader for the PutLicenses structure. +type PutLicensesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PutLicensesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPutLicensesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPutLicensesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPutLicensesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPutLicensesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPutLicensesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPutLicensesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPutLicensesOK creates a PutLicensesOK with default headers values +func NewPutLicensesOK() *PutLicensesOK { + return &PutLicensesOK{} +} + +/*PutLicensesOK handles this case with default header values. + +Taxnexus Response with License objects +*/ +type PutLicensesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *regs_models.LicenseResponse +} + +func (o *PutLicensesOK) Error() string { + return fmt.Sprintf("[PUT /licenses][%d] putLicensesOK %+v", 200, o.Payload) +} + +func (o *PutLicensesOK) GetPayload() *regs_models.LicenseResponse { + return o.Payload +} + +func (o *PutLicensesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(regs_models.LicenseResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutLicensesUnauthorized creates a PutLicensesUnauthorized with default headers values +func NewPutLicensesUnauthorized() *PutLicensesUnauthorized { + return &PutLicensesUnauthorized{} +} + +/*PutLicensesUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PutLicensesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutLicensesUnauthorized) Error() string { + return fmt.Sprintf("[PUT /licenses][%d] putLicensesUnauthorized %+v", 401, o.Payload) +} + +func (o *PutLicensesUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutLicensesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutLicensesForbidden creates a PutLicensesForbidden with default headers values +func NewPutLicensesForbidden() *PutLicensesForbidden { + return &PutLicensesForbidden{} +} + +/*PutLicensesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PutLicensesForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutLicensesForbidden) Error() string { + return fmt.Sprintf("[PUT /licenses][%d] putLicensesForbidden %+v", 403, o.Payload) +} + +func (o *PutLicensesForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutLicensesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutLicensesNotFound creates a PutLicensesNotFound with default headers values +func NewPutLicensesNotFound() *PutLicensesNotFound { + return &PutLicensesNotFound{} +} + +/*PutLicensesNotFound handles this case with default header values. + +Resource was not found +*/ +type PutLicensesNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutLicensesNotFound) Error() string { + return fmt.Sprintf("[PUT /licenses][%d] putLicensesNotFound %+v", 404, o.Payload) +} + +func (o *PutLicensesNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutLicensesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutLicensesUnprocessableEntity creates a PutLicensesUnprocessableEntity with default headers values +func NewPutLicensesUnprocessableEntity() *PutLicensesUnprocessableEntity { + return &PutLicensesUnprocessableEntity{} +} + +/*PutLicensesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PutLicensesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutLicensesUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /licenses][%d] putLicensesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutLicensesUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutLicensesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutLicensesInternalServerError creates a PutLicensesInternalServerError with default headers values +func NewPutLicensesInternalServerError() *PutLicensesInternalServerError { + return &PutLicensesInternalServerError{} +} + +/*PutLicensesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PutLicensesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutLicensesInternalServerError) Error() string { + return fmt.Sprintf("[PUT /licenses][%d] putLicensesInternalServerError %+v", 500, o.Payload) +} + +func (o *PutLicensesInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutLicensesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/license_type/get_license_types_parameters.go b/api/devops/regs_client/license_type/get_license_types_parameters.go new file mode 100644 index 0000000..e5be45e --- /dev/null +++ b/api/devops/regs_client/license_type/get_license_types_parameters.go @@ -0,0 +1,279 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package license_type + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetLicenseTypesParams creates a new GetLicenseTypesParams object +// with the default values initialized. +func NewGetLicenseTypesParams() *GetLicenseTypesParams { + var () + return &GetLicenseTypesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetLicenseTypesParamsWithTimeout creates a new GetLicenseTypesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetLicenseTypesParamsWithTimeout(timeout time.Duration) *GetLicenseTypesParams { + var () + return &GetLicenseTypesParams{ + + timeout: timeout, + } +} + +// NewGetLicenseTypesParamsWithContext creates a new GetLicenseTypesParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetLicenseTypesParamsWithContext(ctx context.Context) *GetLicenseTypesParams { + var () + return &GetLicenseTypesParams{ + + Context: ctx, + } +} + +// NewGetLicenseTypesParamsWithHTTPClient creates a new GetLicenseTypesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetLicenseTypesParamsWithHTTPClient(client *http.Client) *GetLicenseTypesParams { + var () + return &GetLicenseTypesParams{ + HTTPClient: client, + } +} + +/*GetLicenseTypesParams contains all the parameters to send to the API endpoint +for the get license types operation typically these are written to a http.Request +*/ +type GetLicenseTypesParams struct { + + /*CompanyID + Taxnexus Record Id of a Company + + */ + CompanyID *string + /*ID + Taxnexus Id of the record to be retrieved + + */ + ID *string + /*LicensetypeID + Taxnexus Record Id of a License Type + + */ + LicensetypeID *string + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get license types params +func (o *GetLicenseTypesParams) WithTimeout(timeout time.Duration) *GetLicenseTypesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get license types params +func (o *GetLicenseTypesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get license types params +func (o *GetLicenseTypesParams) WithContext(ctx context.Context) *GetLicenseTypesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get license types params +func (o *GetLicenseTypesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get license types params +func (o *GetLicenseTypesParams) WithHTTPClient(client *http.Client) *GetLicenseTypesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get license types params +func (o *GetLicenseTypesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCompanyID adds the companyID to the get license types params +func (o *GetLicenseTypesParams) WithCompanyID(companyID *string) *GetLicenseTypesParams { + o.SetCompanyID(companyID) + return o +} + +// SetCompanyID adds the companyId to the get license types params +func (o *GetLicenseTypesParams) SetCompanyID(companyID *string) { + o.CompanyID = companyID +} + +// WithID adds the id to the get license types params +func (o *GetLicenseTypesParams) WithID(id *string) *GetLicenseTypesParams { + o.SetID(id) + return o +} + +// SetID adds the id to the get license types params +func (o *GetLicenseTypesParams) SetID(id *string) { + o.ID = id +} + +// WithLicensetypeID adds the licensetypeID to the get license types params +func (o *GetLicenseTypesParams) WithLicensetypeID(licensetypeID *string) *GetLicenseTypesParams { + o.SetLicensetypeID(licensetypeID) + return o +} + +// SetLicensetypeID adds the licensetypeId to the get license types params +func (o *GetLicenseTypesParams) SetLicensetypeID(licensetypeID *string) { + o.LicensetypeID = licensetypeID +} + +// WithLimit adds the limit to the get license types params +func (o *GetLicenseTypesParams) WithLimit(limit *int64) *GetLicenseTypesParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get license types params +func (o *GetLicenseTypesParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get license types params +func (o *GetLicenseTypesParams) WithOffset(offset *int64) *GetLicenseTypesParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get license types params +func (o *GetLicenseTypesParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *GetLicenseTypesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CompanyID != nil { + + // query param companyId + var qrCompanyID string + if o.CompanyID != nil { + qrCompanyID = *o.CompanyID + } + qCompanyID := qrCompanyID + if qCompanyID != "" { + if err := r.SetQueryParam("companyId", qCompanyID); err != nil { + return err + } + } + + } + + if o.ID != nil { + + // query param id + var qrID string + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + + } + + if o.LicensetypeID != nil { + + // query param licensetypeId + var qrLicensetypeID string + if o.LicensetypeID != nil { + qrLicensetypeID = *o.LicensetypeID + } + qLicensetypeID := qrLicensetypeID + if qLicensetypeID != "" { + if err := r.SetQueryParam("licensetypeId", qLicensetypeID); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/license_type/get_license_types_responses.go b/api/devops/regs_client/license_type/get_license_types_responses.go new file mode 100644 index 0000000..1ed3906 --- /dev/null +++ b/api/devops/regs_client/license_type/get_license_types_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package license_type + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// GetLicenseTypesReader is a Reader for the GetLicenseTypes structure. +type GetLicenseTypesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetLicenseTypesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetLicenseTypesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetLicenseTypesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetLicenseTypesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetLicenseTypesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetLicenseTypesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetLicenseTypesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetLicenseTypesOK creates a GetLicenseTypesOK with default headers values +func NewGetLicenseTypesOK() *GetLicenseTypesOK { + return &GetLicenseTypesOK{} +} + +/*GetLicenseTypesOK handles this case with default header values. + +Taxnexus Response with License objects +*/ +type GetLicenseTypesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *regs_models.LicenseTypeResponse +} + +func (o *GetLicenseTypesOK) Error() string { + return fmt.Sprintf("[GET /licensetypes][%d] getLicenseTypesOK %+v", 200, o.Payload) +} + +func (o *GetLicenseTypesOK) GetPayload() *regs_models.LicenseTypeResponse { + return o.Payload +} + +func (o *GetLicenseTypesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(regs_models.LicenseTypeResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetLicenseTypesUnauthorized creates a GetLicenseTypesUnauthorized with default headers values +func NewGetLicenseTypesUnauthorized() *GetLicenseTypesUnauthorized { + return &GetLicenseTypesUnauthorized{} +} + +/*GetLicenseTypesUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetLicenseTypesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetLicenseTypesUnauthorized) Error() string { + return fmt.Sprintf("[GET /licensetypes][%d] getLicenseTypesUnauthorized %+v", 401, o.Payload) +} + +func (o *GetLicenseTypesUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetLicenseTypesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetLicenseTypesForbidden creates a GetLicenseTypesForbidden with default headers values +func NewGetLicenseTypesForbidden() *GetLicenseTypesForbidden { + return &GetLicenseTypesForbidden{} +} + +/*GetLicenseTypesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetLicenseTypesForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetLicenseTypesForbidden) Error() string { + return fmt.Sprintf("[GET /licensetypes][%d] getLicenseTypesForbidden %+v", 403, o.Payload) +} + +func (o *GetLicenseTypesForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetLicenseTypesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetLicenseTypesNotFound creates a GetLicenseTypesNotFound with default headers values +func NewGetLicenseTypesNotFound() *GetLicenseTypesNotFound { + return &GetLicenseTypesNotFound{} +} + +/*GetLicenseTypesNotFound handles this case with default header values. + +Resource was not found +*/ +type GetLicenseTypesNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetLicenseTypesNotFound) Error() string { + return fmt.Sprintf("[GET /licensetypes][%d] getLicenseTypesNotFound %+v", 404, o.Payload) +} + +func (o *GetLicenseTypesNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetLicenseTypesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetLicenseTypesUnprocessableEntity creates a GetLicenseTypesUnprocessableEntity with default headers values +func NewGetLicenseTypesUnprocessableEntity() *GetLicenseTypesUnprocessableEntity { + return &GetLicenseTypesUnprocessableEntity{} +} + +/*GetLicenseTypesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetLicenseTypesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetLicenseTypesUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /licensetypes][%d] getLicenseTypesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetLicenseTypesUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetLicenseTypesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetLicenseTypesInternalServerError creates a GetLicenseTypesInternalServerError with default headers values +func NewGetLicenseTypesInternalServerError() *GetLicenseTypesInternalServerError { + return &GetLicenseTypesInternalServerError{} +} + +/*GetLicenseTypesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetLicenseTypesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetLicenseTypesInternalServerError) Error() string { + return fmt.Sprintf("[GET /licensetypes][%d] getLicenseTypesInternalServerError %+v", 500, o.Payload) +} + +func (o *GetLicenseTypesInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetLicenseTypesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/license_type/license_type_client.go b/api/devops/regs_client/license_type/license_type_client.go new file mode 100644 index 0000000..78f9157 --- /dev/null +++ b/api/devops/regs_client/license_type/license_type_client.go @@ -0,0 +1,118 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package license_type + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new license type API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for license type API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetLicenseTypes(params *GetLicenseTypesParams, authInfo runtime.ClientAuthInfoWriter) (*GetLicenseTypesOK, error) + + PostLicenseTypes(params *PostLicenseTypesParams, authInfo runtime.ClientAuthInfoWriter) (*PostLicenseTypesOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetLicenseTypes retrieves license type records + + Retrieve LicenseType records +*/ +func (a *Client) GetLicenseTypes(params *GetLicenseTypesParams, authInfo runtime.ClientAuthInfoWriter) (*GetLicenseTypesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetLicenseTypesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getLicenseTypes", + Method: "GET", + PathPattern: "/licensetypes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetLicenseTypesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetLicenseTypesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getLicenseTypes: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostLicenseTypes creates new licensetypes + + Create new LicenseType +*/ +func (a *Client) PostLicenseTypes(params *PostLicenseTypesParams, authInfo runtime.ClientAuthInfoWriter) (*PostLicenseTypesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostLicenseTypesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postLicenseTypes", + Method: "POST", + PathPattern: "/licensetypes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostLicenseTypesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostLicenseTypesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postLicenseTypes: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/devops/regs_client/license_type/post_license_types_parameters.go b/api/devops/regs_client/license_type/post_license_types_parameters.go new file mode 100644 index 0000000..1417c52 --- /dev/null +++ b/api/devops/regs_client/license_type/post_license_types_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package license_type + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// NewPostLicenseTypesParams creates a new PostLicenseTypesParams object +// with the default values initialized. +func NewPostLicenseTypesParams() *PostLicenseTypesParams { + var () + return &PostLicenseTypesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostLicenseTypesParamsWithTimeout creates a new PostLicenseTypesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostLicenseTypesParamsWithTimeout(timeout time.Duration) *PostLicenseTypesParams { + var () + return &PostLicenseTypesParams{ + + timeout: timeout, + } +} + +// NewPostLicenseTypesParamsWithContext creates a new PostLicenseTypesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostLicenseTypesParamsWithContext(ctx context.Context) *PostLicenseTypesParams { + var () + return &PostLicenseTypesParams{ + + Context: ctx, + } +} + +// NewPostLicenseTypesParamsWithHTTPClient creates a new PostLicenseTypesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostLicenseTypesParamsWithHTTPClient(client *http.Client) *PostLicenseTypesParams { + var () + return &PostLicenseTypesParams{ + HTTPClient: client, + } +} + +/*PostLicenseTypesParams contains all the parameters to send to the API endpoint +for the post license types operation typically these are written to a http.Request +*/ +type PostLicenseTypesParams struct { + + /*LicenseTypeRequest + The new license types + + */ + LicenseTypeRequest *regs_models.LicenseTypeRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post license types params +func (o *PostLicenseTypesParams) WithTimeout(timeout time.Duration) *PostLicenseTypesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post license types params +func (o *PostLicenseTypesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post license types params +func (o *PostLicenseTypesParams) WithContext(ctx context.Context) *PostLicenseTypesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post license types params +func (o *PostLicenseTypesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post license types params +func (o *PostLicenseTypesParams) WithHTTPClient(client *http.Client) *PostLicenseTypesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post license types params +func (o *PostLicenseTypesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithLicenseTypeRequest adds the licenseTypeRequest to the post license types params +func (o *PostLicenseTypesParams) WithLicenseTypeRequest(licenseTypeRequest *regs_models.LicenseTypeRequest) *PostLicenseTypesParams { + o.SetLicenseTypeRequest(licenseTypeRequest) + return o +} + +// SetLicenseTypeRequest adds the licenseTypeRequest to the post license types params +func (o *PostLicenseTypesParams) SetLicenseTypeRequest(licenseTypeRequest *regs_models.LicenseTypeRequest) { + o.LicenseTypeRequest = licenseTypeRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostLicenseTypesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.LicenseTypeRequest != nil { + if err := r.SetBodyParam(o.LicenseTypeRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/license_type/post_license_types_responses.go b/api/devops/regs_client/license_type/post_license_types_responses.go new file mode 100644 index 0000000..fb1c252 --- /dev/null +++ b/api/devops/regs_client/license_type/post_license_types_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package license_type + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// PostLicenseTypesReader is a Reader for the PostLicenseTypes structure. +type PostLicenseTypesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostLicenseTypesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostLicenseTypesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostLicenseTypesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostLicenseTypesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostLicenseTypesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostLicenseTypesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostLicenseTypesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostLicenseTypesOK creates a PostLicenseTypesOK with default headers values +func NewPostLicenseTypesOK() *PostLicenseTypesOK { + return &PostLicenseTypesOK{} +} + +/*PostLicenseTypesOK handles this case with default header values. + +Taxnexus Response with License objects +*/ +type PostLicenseTypesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *regs_models.LicenseTypeResponse +} + +func (o *PostLicenseTypesOK) Error() string { + return fmt.Sprintf("[POST /licensetypes][%d] postLicenseTypesOK %+v", 200, o.Payload) +} + +func (o *PostLicenseTypesOK) GetPayload() *regs_models.LicenseTypeResponse { + return o.Payload +} + +func (o *PostLicenseTypesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(regs_models.LicenseTypeResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostLicenseTypesUnauthorized creates a PostLicenseTypesUnauthorized with default headers values +func NewPostLicenseTypesUnauthorized() *PostLicenseTypesUnauthorized { + return &PostLicenseTypesUnauthorized{} +} + +/*PostLicenseTypesUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostLicenseTypesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostLicenseTypesUnauthorized) Error() string { + return fmt.Sprintf("[POST /licensetypes][%d] postLicenseTypesUnauthorized %+v", 401, o.Payload) +} + +func (o *PostLicenseTypesUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostLicenseTypesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostLicenseTypesForbidden creates a PostLicenseTypesForbidden with default headers values +func NewPostLicenseTypesForbidden() *PostLicenseTypesForbidden { + return &PostLicenseTypesForbidden{} +} + +/*PostLicenseTypesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostLicenseTypesForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostLicenseTypesForbidden) Error() string { + return fmt.Sprintf("[POST /licensetypes][%d] postLicenseTypesForbidden %+v", 403, o.Payload) +} + +func (o *PostLicenseTypesForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostLicenseTypesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostLicenseTypesNotFound creates a PostLicenseTypesNotFound with default headers values +func NewPostLicenseTypesNotFound() *PostLicenseTypesNotFound { + return &PostLicenseTypesNotFound{} +} + +/*PostLicenseTypesNotFound handles this case with default header values. + +Resource was not found +*/ +type PostLicenseTypesNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostLicenseTypesNotFound) Error() string { + return fmt.Sprintf("[POST /licensetypes][%d] postLicenseTypesNotFound %+v", 404, o.Payload) +} + +func (o *PostLicenseTypesNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostLicenseTypesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostLicenseTypesUnprocessableEntity creates a PostLicenseTypesUnprocessableEntity with default headers values +func NewPostLicenseTypesUnprocessableEntity() *PostLicenseTypesUnprocessableEntity { + return &PostLicenseTypesUnprocessableEntity{} +} + +/*PostLicenseTypesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostLicenseTypesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostLicenseTypesUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /licensetypes][%d] postLicenseTypesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostLicenseTypesUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostLicenseTypesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostLicenseTypesInternalServerError creates a PostLicenseTypesInternalServerError with default headers values +func NewPostLicenseTypesInternalServerError() *PostLicenseTypesInternalServerError { + return &PostLicenseTypesInternalServerError{} +} + +/*PostLicenseTypesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostLicenseTypesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostLicenseTypesInternalServerError) Error() string { + return fmt.Sprintf("[POST /licensetypes][%d] postLicenseTypesInternalServerError %+v", 500, o.Payload) +} + +func (o *PostLicenseTypesInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostLicenseTypesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/notebook/get_notebooks_parameters.go b/api/devops/regs_client/notebook/get_notebooks_parameters.go new file mode 100644 index 0000000..6e612aa --- /dev/null +++ b/api/devops/regs_client/notebook/get_notebooks_parameters.go @@ -0,0 +1,215 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package notebook + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetNotebooksParams creates a new GetNotebooksParams object +// with the default values initialized. +func NewGetNotebooksParams() *GetNotebooksParams { + var () + return &GetNotebooksParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetNotebooksParamsWithTimeout creates a new GetNotebooksParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetNotebooksParamsWithTimeout(timeout time.Duration) *GetNotebooksParams { + var () + return &GetNotebooksParams{ + + timeout: timeout, + } +} + +// NewGetNotebooksParamsWithContext creates a new GetNotebooksParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetNotebooksParamsWithContext(ctx context.Context) *GetNotebooksParams { + var () + return &GetNotebooksParams{ + + Context: ctx, + } +} + +// NewGetNotebooksParamsWithHTTPClient creates a new GetNotebooksParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetNotebooksParamsWithHTTPClient(client *http.Client) *GetNotebooksParams { + var () + return &GetNotebooksParams{ + HTTPClient: client, + } +} + +/*GetNotebooksParams contains all the parameters to send to the API endpoint +for the get notebooks operation typically these are written to a http.Request +*/ +type GetNotebooksParams struct { + + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*NotebookID + Template ID + + */ + NotebookID *string + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get notebooks params +func (o *GetNotebooksParams) WithTimeout(timeout time.Duration) *GetNotebooksParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get notebooks params +func (o *GetNotebooksParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get notebooks params +func (o *GetNotebooksParams) WithContext(ctx context.Context) *GetNotebooksParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get notebooks params +func (o *GetNotebooksParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get notebooks params +func (o *GetNotebooksParams) WithHTTPClient(client *http.Client) *GetNotebooksParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get notebooks params +func (o *GetNotebooksParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithLimit adds the limit to the get notebooks params +func (o *GetNotebooksParams) WithLimit(limit *int64) *GetNotebooksParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get notebooks params +func (o *GetNotebooksParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithNotebookID adds the notebookID to the get notebooks params +func (o *GetNotebooksParams) WithNotebookID(notebookID *string) *GetNotebooksParams { + o.SetNotebookID(notebookID) + return o +} + +// SetNotebookID adds the notebookId to the get notebooks params +func (o *GetNotebooksParams) SetNotebookID(notebookID *string) { + o.NotebookID = notebookID +} + +// WithOffset adds the offset to the get notebooks params +func (o *GetNotebooksParams) WithOffset(offset *int64) *GetNotebooksParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get notebooks params +func (o *GetNotebooksParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *GetNotebooksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.NotebookID != nil { + + // query param notebookId + var qrNotebookID string + if o.NotebookID != nil { + qrNotebookID = *o.NotebookID + } + qNotebookID := qrNotebookID + if qNotebookID != "" { + if err := r.SetQueryParam("notebookId", qNotebookID); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/notebook/get_notebooks_responses.go b/api/devops/regs_client/notebook/get_notebooks_responses.go new file mode 100644 index 0000000..6a62a71 --- /dev/null +++ b/api/devops/regs_client/notebook/get_notebooks_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package notebook + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// GetNotebooksReader is a Reader for the GetNotebooks structure. +type GetNotebooksReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetNotebooksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetNotebooksOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetNotebooksUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetNotebooksForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetNotebooksNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetNotebooksUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetNotebooksInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetNotebooksOK creates a GetNotebooksOK with default headers values +func NewGetNotebooksOK() *GetNotebooksOK { + return &GetNotebooksOK{} +} + +/*GetNotebooksOK handles this case with default header values. + +Taxnexus Response with Notebook objects +*/ +type GetNotebooksOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *regs_models.NotebookResponse +} + +func (o *GetNotebooksOK) Error() string { + return fmt.Sprintf("[GET /notebooks][%d] getNotebooksOK %+v", 200, o.Payload) +} + +func (o *GetNotebooksOK) GetPayload() *regs_models.NotebookResponse { + return o.Payload +} + +func (o *GetNotebooksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(regs_models.NotebookResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetNotebooksUnauthorized creates a GetNotebooksUnauthorized with default headers values +func NewGetNotebooksUnauthorized() *GetNotebooksUnauthorized { + return &GetNotebooksUnauthorized{} +} + +/*GetNotebooksUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetNotebooksUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetNotebooksUnauthorized) Error() string { + return fmt.Sprintf("[GET /notebooks][%d] getNotebooksUnauthorized %+v", 401, o.Payload) +} + +func (o *GetNotebooksUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetNotebooksUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetNotebooksForbidden creates a GetNotebooksForbidden with default headers values +func NewGetNotebooksForbidden() *GetNotebooksForbidden { + return &GetNotebooksForbidden{} +} + +/*GetNotebooksForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetNotebooksForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetNotebooksForbidden) Error() string { + return fmt.Sprintf("[GET /notebooks][%d] getNotebooksForbidden %+v", 403, o.Payload) +} + +func (o *GetNotebooksForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetNotebooksForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetNotebooksNotFound creates a GetNotebooksNotFound with default headers values +func NewGetNotebooksNotFound() *GetNotebooksNotFound { + return &GetNotebooksNotFound{} +} + +/*GetNotebooksNotFound handles this case with default header values. + +Resource was not found +*/ +type GetNotebooksNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetNotebooksNotFound) Error() string { + return fmt.Sprintf("[GET /notebooks][%d] getNotebooksNotFound %+v", 404, o.Payload) +} + +func (o *GetNotebooksNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetNotebooksNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetNotebooksUnprocessableEntity creates a GetNotebooksUnprocessableEntity with default headers values +func NewGetNotebooksUnprocessableEntity() *GetNotebooksUnprocessableEntity { + return &GetNotebooksUnprocessableEntity{} +} + +/*GetNotebooksUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetNotebooksUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetNotebooksUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /notebooks][%d] getNotebooksUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetNotebooksUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetNotebooksUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetNotebooksInternalServerError creates a GetNotebooksInternalServerError with default headers values +func NewGetNotebooksInternalServerError() *GetNotebooksInternalServerError { + return &GetNotebooksInternalServerError{} +} + +/*GetNotebooksInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetNotebooksInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetNotebooksInternalServerError) Error() string { + return fmt.Sprintf("[GET /notebooks][%d] getNotebooksInternalServerError %+v", 500, o.Payload) +} + +func (o *GetNotebooksInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetNotebooksInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/notebook/notebook_client.go b/api/devops/regs_client/notebook/notebook_client.go new file mode 100644 index 0000000..3edbb75 --- /dev/null +++ b/api/devops/regs_client/notebook/notebook_client.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package notebook + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new notebook API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for notebook API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetNotebooks(params *GetNotebooksParams, authInfo runtime.ClientAuthInfoWriter) (*GetNotebooksOK, error) + + PostNotebooks(params *PostNotebooksParams, authInfo runtime.ClientAuthInfoWriter) (*PostNotebooksOK, error) + + PutNotebooks(params *PutNotebooksParams, authInfo runtime.ClientAuthInfoWriter) (*PutNotebooksOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetNotebooks gets a list of notebooks + + Return a list of Notebook records from the datastore +*/ +func (a *Client) GetNotebooks(params *GetNotebooksParams, authInfo runtime.ClientAuthInfoWriter) (*GetNotebooksOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetNotebooksParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getNotebooks", + Method: "GET", + PathPattern: "/notebooks", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetNotebooksReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetNotebooksOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getNotebooks: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostNotebooks creates new notebooka + + Create Notebooks in Taxnexus +*/ +func (a *Client) PostNotebooks(params *PostNotebooksParams, authInfo runtime.ClientAuthInfoWriter) (*PostNotebooksOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostNotebooksParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postNotebooks", + Method: "POST", + PathPattern: "/notebooks", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostNotebooksReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostNotebooksOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postNotebooks: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PutNotebooks updates notebooks + + Update Notebooks in Taxnexus +*/ +func (a *Client) PutNotebooks(params *PutNotebooksParams, authInfo runtime.ClientAuthInfoWriter) (*PutNotebooksOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPutNotebooksParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "putNotebooks", + Method: "PUT", + PathPattern: "/notebooks", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PutNotebooksReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PutNotebooksOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for putNotebooks: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/devops/regs_client/notebook/post_notebooks_parameters.go b/api/devops/regs_client/notebook/post_notebooks_parameters.go new file mode 100644 index 0000000..5fed9c3 --- /dev/null +++ b/api/devops/regs_client/notebook/post_notebooks_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package notebook + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// NewPostNotebooksParams creates a new PostNotebooksParams object +// with the default values initialized. +func NewPostNotebooksParams() *PostNotebooksParams { + var () + return &PostNotebooksParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostNotebooksParamsWithTimeout creates a new PostNotebooksParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostNotebooksParamsWithTimeout(timeout time.Duration) *PostNotebooksParams { + var () + return &PostNotebooksParams{ + + timeout: timeout, + } +} + +// NewPostNotebooksParamsWithContext creates a new PostNotebooksParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostNotebooksParamsWithContext(ctx context.Context) *PostNotebooksParams { + var () + return &PostNotebooksParams{ + + Context: ctx, + } +} + +// NewPostNotebooksParamsWithHTTPClient creates a new PostNotebooksParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostNotebooksParamsWithHTTPClient(client *http.Client) *PostNotebooksParams { + var () + return &PostNotebooksParams{ + HTTPClient: client, + } +} + +/*PostNotebooksParams contains all the parameters to send to the API endpoint +for the post notebooks operation typically these are written to a http.Request +*/ +type PostNotebooksParams struct { + + /*NotebookRequest + An array of Notebook records + + */ + NotebookRequest *regs_models.NotebookRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post notebooks params +func (o *PostNotebooksParams) WithTimeout(timeout time.Duration) *PostNotebooksParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post notebooks params +func (o *PostNotebooksParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post notebooks params +func (o *PostNotebooksParams) WithContext(ctx context.Context) *PostNotebooksParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post notebooks params +func (o *PostNotebooksParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post notebooks params +func (o *PostNotebooksParams) WithHTTPClient(client *http.Client) *PostNotebooksParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post notebooks params +func (o *PostNotebooksParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithNotebookRequest adds the notebookRequest to the post notebooks params +func (o *PostNotebooksParams) WithNotebookRequest(notebookRequest *regs_models.NotebookRequest) *PostNotebooksParams { + o.SetNotebookRequest(notebookRequest) + return o +} + +// SetNotebookRequest adds the notebookRequest to the post notebooks params +func (o *PostNotebooksParams) SetNotebookRequest(notebookRequest *regs_models.NotebookRequest) { + o.NotebookRequest = notebookRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostNotebooksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.NotebookRequest != nil { + if err := r.SetBodyParam(o.NotebookRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/notebook/post_notebooks_responses.go b/api/devops/regs_client/notebook/post_notebooks_responses.go new file mode 100644 index 0000000..087dc49 --- /dev/null +++ b/api/devops/regs_client/notebook/post_notebooks_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package notebook + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// PostNotebooksReader is a Reader for the PostNotebooks structure. +type PostNotebooksReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostNotebooksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostNotebooksOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostNotebooksUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostNotebooksForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostNotebooksNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostNotebooksUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostNotebooksInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostNotebooksOK creates a PostNotebooksOK with default headers values +func NewPostNotebooksOK() *PostNotebooksOK { + return &PostNotebooksOK{} +} + +/*PostNotebooksOK handles this case with default header values. + +Taxnexus Response with Notebook objects +*/ +type PostNotebooksOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *regs_models.NotebookResponse +} + +func (o *PostNotebooksOK) Error() string { + return fmt.Sprintf("[POST /notebooks][%d] postNotebooksOK %+v", 200, o.Payload) +} + +func (o *PostNotebooksOK) GetPayload() *regs_models.NotebookResponse { + return o.Payload +} + +func (o *PostNotebooksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(regs_models.NotebookResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostNotebooksUnauthorized creates a PostNotebooksUnauthorized with default headers values +func NewPostNotebooksUnauthorized() *PostNotebooksUnauthorized { + return &PostNotebooksUnauthorized{} +} + +/*PostNotebooksUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostNotebooksUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostNotebooksUnauthorized) Error() string { + return fmt.Sprintf("[POST /notebooks][%d] postNotebooksUnauthorized %+v", 401, o.Payload) +} + +func (o *PostNotebooksUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostNotebooksUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostNotebooksForbidden creates a PostNotebooksForbidden with default headers values +func NewPostNotebooksForbidden() *PostNotebooksForbidden { + return &PostNotebooksForbidden{} +} + +/*PostNotebooksForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostNotebooksForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostNotebooksForbidden) Error() string { + return fmt.Sprintf("[POST /notebooks][%d] postNotebooksForbidden %+v", 403, o.Payload) +} + +func (o *PostNotebooksForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostNotebooksForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostNotebooksNotFound creates a PostNotebooksNotFound with default headers values +func NewPostNotebooksNotFound() *PostNotebooksNotFound { + return &PostNotebooksNotFound{} +} + +/*PostNotebooksNotFound handles this case with default header values. + +Resource was not found +*/ +type PostNotebooksNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostNotebooksNotFound) Error() string { + return fmt.Sprintf("[POST /notebooks][%d] postNotebooksNotFound %+v", 404, o.Payload) +} + +func (o *PostNotebooksNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostNotebooksNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostNotebooksUnprocessableEntity creates a PostNotebooksUnprocessableEntity with default headers values +func NewPostNotebooksUnprocessableEntity() *PostNotebooksUnprocessableEntity { + return &PostNotebooksUnprocessableEntity{} +} + +/*PostNotebooksUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostNotebooksUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostNotebooksUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /notebooks][%d] postNotebooksUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostNotebooksUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostNotebooksUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostNotebooksInternalServerError creates a PostNotebooksInternalServerError with default headers values +func NewPostNotebooksInternalServerError() *PostNotebooksInternalServerError { + return &PostNotebooksInternalServerError{} +} + +/*PostNotebooksInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostNotebooksInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostNotebooksInternalServerError) Error() string { + return fmt.Sprintf("[POST /notebooks][%d] postNotebooksInternalServerError %+v", 500, o.Payload) +} + +func (o *PostNotebooksInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostNotebooksInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/notebook/put_notebooks_parameters.go b/api/devops/regs_client/notebook/put_notebooks_parameters.go new file mode 100644 index 0000000..1a037be --- /dev/null +++ b/api/devops/regs_client/notebook/put_notebooks_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package notebook + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// NewPutNotebooksParams creates a new PutNotebooksParams object +// with the default values initialized. +func NewPutNotebooksParams() *PutNotebooksParams { + var () + return &PutNotebooksParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPutNotebooksParamsWithTimeout creates a new PutNotebooksParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPutNotebooksParamsWithTimeout(timeout time.Duration) *PutNotebooksParams { + var () + return &PutNotebooksParams{ + + timeout: timeout, + } +} + +// NewPutNotebooksParamsWithContext creates a new PutNotebooksParams object +// with the default values initialized, and the ability to set a context for a request +func NewPutNotebooksParamsWithContext(ctx context.Context) *PutNotebooksParams { + var () + return &PutNotebooksParams{ + + Context: ctx, + } +} + +// NewPutNotebooksParamsWithHTTPClient creates a new PutNotebooksParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPutNotebooksParamsWithHTTPClient(client *http.Client) *PutNotebooksParams { + var () + return &PutNotebooksParams{ + HTTPClient: client, + } +} + +/*PutNotebooksParams contains all the parameters to send to the API endpoint +for the put notebooks operation typically these are written to a http.Request +*/ +type PutNotebooksParams struct { + + /*NotebookRequest + An array of Notebook records + + */ + NotebookRequest *regs_models.NotebookRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the put notebooks params +func (o *PutNotebooksParams) WithTimeout(timeout time.Duration) *PutNotebooksParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the put notebooks params +func (o *PutNotebooksParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the put notebooks params +func (o *PutNotebooksParams) WithContext(ctx context.Context) *PutNotebooksParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the put notebooks params +func (o *PutNotebooksParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the put notebooks params +func (o *PutNotebooksParams) WithHTTPClient(client *http.Client) *PutNotebooksParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the put notebooks params +func (o *PutNotebooksParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithNotebookRequest adds the notebookRequest to the put notebooks params +func (o *PutNotebooksParams) WithNotebookRequest(notebookRequest *regs_models.NotebookRequest) *PutNotebooksParams { + o.SetNotebookRequest(notebookRequest) + return o +} + +// SetNotebookRequest adds the notebookRequest to the put notebooks params +func (o *PutNotebooksParams) SetNotebookRequest(notebookRequest *regs_models.NotebookRequest) { + o.NotebookRequest = notebookRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PutNotebooksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.NotebookRequest != nil { + if err := r.SetBodyParam(o.NotebookRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/notebook/put_notebooks_responses.go b/api/devops/regs_client/notebook/put_notebooks_responses.go new file mode 100644 index 0000000..8e4c77c --- /dev/null +++ b/api/devops/regs_client/notebook/put_notebooks_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package notebook + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// PutNotebooksReader is a Reader for the PutNotebooks structure. +type PutNotebooksReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PutNotebooksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPutNotebooksOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPutNotebooksUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPutNotebooksForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPutNotebooksNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPutNotebooksUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPutNotebooksInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPutNotebooksOK creates a PutNotebooksOK with default headers values +func NewPutNotebooksOK() *PutNotebooksOK { + return &PutNotebooksOK{} +} + +/*PutNotebooksOK handles this case with default header values. + +Taxnexus Response with Notebook objects +*/ +type PutNotebooksOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *regs_models.NotebookResponse +} + +func (o *PutNotebooksOK) Error() string { + return fmt.Sprintf("[PUT /notebooks][%d] putNotebooksOK %+v", 200, o.Payload) +} + +func (o *PutNotebooksOK) GetPayload() *regs_models.NotebookResponse { + return o.Payload +} + +func (o *PutNotebooksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(regs_models.NotebookResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutNotebooksUnauthorized creates a PutNotebooksUnauthorized with default headers values +func NewPutNotebooksUnauthorized() *PutNotebooksUnauthorized { + return &PutNotebooksUnauthorized{} +} + +/*PutNotebooksUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PutNotebooksUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutNotebooksUnauthorized) Error() string { + return fmt.Sprintf("[PUT /notebooks][%d] putNotebooksUnauthorized %+v", 401, o.Payload) +} + +func (o *PutNotebooksUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutNotebooksUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutNotebooksForbidden creates a PutNotebooksForbidden with default headers values +func NewPutNotebooksForbidden() *PutNotebooksForbidden { + return &PutNotebooksForbidden{} +} + +/*PutNotebooksForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PutNotebooksForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutNotebooksForbidden) Error() string { + return fmt.Sprintf("[PUT /notebooks][%d] putNotebooksForbidden %+v", 403, o.Payload) +} + +func (o *PutNotebooksForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutNotebooksForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutNotebooksNotFound creates a PutNotebooksNotFound with default headers values +func NewPutNotebooksNotFound() *PutNotebooksNotFound { + return &PutNotebooksNotFound{} +} + +/*PutNotebooksNotFound handles this case with default header values. + +Resource was not found +*/ +type PutNotebooksNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutNotebooksNotFound) Error() string { + return fmt.Sprintf("[PUT /notebooks][%d] putNotebooksNotFound %+v", 404, o.Payload) +} + +func (o *PutNotebooksNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutNotebooksNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutNotebooksUnprocessableEntity creates a PutNotebooksUnprocessableEntity with default headers values +func NewPutNotebooksUnprocessableEntity() *PutNotebooksUnprocessableEntity { + return &PutNotebooksUnprocessableEntity{} +} + +/*PutNotebooksUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PutNotebooksUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutNotebooksUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /notebooks][%d] putNotebooksUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutNotebooksUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutNotebooksUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutNotebooksInternalServerError creates a PutNotebooksInternalServerError with default headers values +func NewPutNotebooksInternalServerError() *PutNotebooksInternalServerError { + return &PutNotebooksInternalServerError{} +} + +/*PutNotebooksInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PutNotebooksInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutNotebooksInternalServerError) Error() string { + return fmt.Sprintf("[PUT /notebooks][%d] putNotebooksInternalServerError %+v", 500, o.Payload) +} + +func (o *PutNotebooksInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutNotebooksInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/rating_engine/delete_rating_engine_parameters.go b/api/devops/regs_client/rating_engine/delete_rating_engine_parameters.go new file mode 100644 index 0000000..301e673 --- /dev/null +++ b/api/devops/regs_client/rating_engine/delete_rating_engine_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package rating_engine + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewDeleteRatingEngineParams creates a new DeleteRatingEngineParams object +// with the default values initialized. +func NewDeleteRatingEngineParams() *DeleteRatingEngineParams { + var () + return &DeleteRatingEngineParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewDeleteRatingEngineParamsWithTimeout creates a new DeleteRatingEngineParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewDeleteRatingEngineParamsWithTimeout(timeout time.Duration) *DeleteRatingEngineParams { + var () + return &DeleteRatingEngineParams{ + + timeout: timeout, + } +} + +// NewDeleteRatingEngineParamsWithContext creates a new DeleteRatingEngineParams object +// with the default values initialized, and the ability to set a context for a request +func NewDeleteRatingEngineParamsWithContext(ctx context.Context) *DeleteRatingEngineParams { + var () + return &DeleteRatingEngineParams{ + + Context: ctx, + } +} + +// NewDeleteRatingEngineParamsWithHTTPClient creates a new DeleteRatingEngineParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewDeleteRatingEngineParamsWithHTTPClient(client *http.Client) *DeleteRatingEngineParams { + var () + return &DeleteRatingEngineParams{ + HTTPClient: client, + } +} + +/*DeleteRatingEngineParams contains all the parameters to send to the API endpoint +for the delete rating engine operation typically these are written to a http.Request +*/ +type DeleteRatingEngineParams struct { + + /*ID + Taxnexus Id of the Record to be retrieved + + */ + ID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the delete rating engine params +func (o *DeleteRatingEngineParams) WithTimeout(timeout time.Duration) *DeleteRatingEngineParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the delete rating engine params +func (o *DeleteRatingEngineParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the delete rating engine params +func (o *DeleteRatingEngineParams) WithContext(ctx context.Context) *DeleteRatingEngineParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the delete rating engine params +func (o *DeleteRatingEngineParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the delete rating engine params +func (o *DeleteRatingEngineParams) WithHTTPClient(client *http.Client) *DeleteRatingEngineParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the delete rating engine params +func (o *DeleteRatingEngineParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the delete rating engine params +func (o *DeleteRatingEngineParams) WithID(id *string) *DeleteRatingEngineParams { + o.SetID(id) + return o +} + +// SetID adds the id to the delete rating engine params +func (o *DeleteRatingEngineParams) SetID(id *string) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DeleteRatingEngineParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ID != nil { + + // query param id + var qrID string + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/rating_engine/delete_rating_engine_responses.go b/api/devops/regs_client/rating_engine/delete_rating_engine_responses.go new file mode 100644 index 0000000..d0729a1 --- /dev/null +++ b/api/devops/regs_client/rating_engine/delete_rating_engine_responses.go @@ -0,0 +1,298 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package rating_engine + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// DeleteRatingEngineReader is a Reader for the DeleteRatingEngine structure. +type DeleteRatingEngineReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DeleteRatingEngineReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDeleteRatingEngineOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewDeleteRatingEngineUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewDeleteRatingEngineForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewDeleteRatingEngineNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewDeleteRatingEngineUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewDeleteRatingEngineInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewDeleteRatingEngineOK creates a DeleteRatingEngineOK with default headers values +func NewDeleteRatingEngineOK() *DeleteRatingEngineOK { + return &DeleteRatingEngineOK{} +} + +/*DeleteRatingEngineOK handles this case with default header values. + +Taxnexus Response with Message Objects with Delete Status +*/ +type DeleteRatingEngineOK struct { + AccessControlAllowOrigin string + + Payload *regs_models.DeleteResponse +} + +func (o *DeleteRatingEngineOK) Error() string { + return fmt.Sprintf("[DELETE /ratingengines][%d] deleteRatingEngineOK %+v", 200, o.Payload) +} + +func (o *DeleteRatingEngineOK) GetPayload() *regs_models.DeleteResponse { + return o.Payload +} + +func (o *DeleteRatingEngineOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.DeleteResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteRatingEngineUnauthorized creates a DeleteRatingEngineUnauthorized with default headers values +func NewDeleteRatingEngineUnauthorized() *DeleteRatingEngineUnauthorized { + return &DeleteRatingEngineUnauthorized{} +} + +/*DeleteRatingEngineUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type DeleteRatingEngineUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *DeleteRatingEngineUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /ratingengines][%d] deleteRatingEngineUnauthorized %+v", 401, o.Payload) +} + +func (o *DeleteRatingEngineUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *DeleteRatingEngineUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteRatingEngineForbidden creates a DeleteRatingEngineForbidden with default headers values +func NewDeleteRatingEngineForbidden() *DeleteRatingEngineForbidden { + return &DeleteRatingEngineForbidden{} +} + +/*DeleteRatingEngineForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type DeleteRatingEngineForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *DeleteRatingEngineForbidden) Error() string { + return fmt.Sprintf("[DELETE /ratingengines][%d] deleteRatingEngineForbidden %+v", 403, o.Payload) +} + +func (o *DeleteRatingEngineForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *DeleteRatingEngineForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteRatingEngineNotFound creates a DeleteRatingEngineNotFound with default headers values +func NewDeleteRatingEngineNotFound() *DeleteRatingEngineNotFound { + return &DeleteRatingEngineNotFound{} +} + +/*DeleteRatingEngineNotFound handles this case with default header values. + +Resource was not found +*/ +type DeleteRatingEngineNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *DeleteRatingEngineNotFound) Error() string { + return fmt.Sprintf("[DELETE /ratingengines][%d] deleteRatingEngineNotFound %+v", 404, o.Payload) +} + +func (o *DeleteRatingEngineNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *DeleteRatingEngineNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteRatingEngineUnprocessableEntity creates a DeleteRatingEngineUnprocessableEntity with default headers values +func NewDeleteRatingEngineUnprocessableEntity() *DeleteRatingEngineUnprocessableEntity { + return &DeleteRatingEngineUnprocessableEntity{} +} + +/*DeleteRatingEngineUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type DeleteRatingEngineUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *DeleteRatingEngineUnprocessableEntity) Error() string { + return fmt.Sprintf("[DELETE /ratingengines][%d] deleteRatingEngineUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *DeleteRatingEngineUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *DeleteRatingEngineUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteRatingEngineInternalServerError creates a DeleteRatingEngineInternalServerError with default headers values +func NewDeleteRatingEngineInternalServerError() *DeleteRatingEngineInternalServerError { + return &DeleteRatingEngineInternalServerError{} +} + +/*DeleteRatingEngineInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type DeleteRatingEngineInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *DeleteRatingEngineInternalServerError) Error() string { + return fmt.Sprintf("[DELETE /ratingengines][%d] deleteRatingEngineInternalServerError %+v", 500, o.Payload) +} + +func (o *DeleteRatingEngineInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *DeleteRatingEngineInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/rating_engine/get_rating_engines_parameters.go b/api/devops/regs_client/rating_engine/get_rating_engines_parameters.go new file mode 100644 index 0000000..32f9d2d --- /dev/null +++ b/api/devops/regs_client/rating_engine/get_rating_engines_parameters.go @@ -0,0 +1,375 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package rating_engine + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetRatingEnginesParams creates a new GetRatingEnginesParams object +// with the default values initialized. +func NewGetRatingEnginesParams() *GetRatingEnginesParams { + var () + return &GetRatingEnginesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetRatingEnginesParamsWithTimeout creates a new GetRatingEnginesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetRatingEnginesParamsWithTimeout(timeout time.Duration) *GetRatingEnginesParams { + var () + return &GetRatingEnginesParams{ + + timeout: timeout, + } +} + +// NewGetRatingEnginesParamsWithContext creates a new GetRatingEnginesParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetRatingEnginesParamsWithContext(ctx context.Context) *GetRatingEnginesParams { + var () + return &GetRatingEnginesParams{ + + Context: ctx, + } +} + +// NewGetRatingEnginesParamsWithHTTPClient creates a new GetRatingEnginesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetRatingEnginesParamsWithHTTPClient(client *http.Client) *GetRatingEnginesParams { + var () + return &GetRatingEnginesParams{ + HTTPClient: client, + } +} + +/*GetRatingEnginesParams contains all the parameters to send to the API endpoint +for the get rating engines operation typically these are written to a http.Request +*/ +type GetRatingEnginesParams struct { + + /*AccountID + Taxnexus Record Id of an Account + + */ + AccountID *string + /*AccountNumber + The Taxnexus Account Number of the Account to be used a record retrieval + + */ + AccountNumber *string + /*BackendID + Taxnexus Id of the Backend to be retrieved + + */ + BackendID *string + /*CompanyID + Taxnexus Record Id of a Company + + */ + CompanyID *string + /*ID + Taxnexus Id of the record to be retrieved + + */ + ID *string + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Name + The Name of this Object + + */ + Name *string + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get rating engines params +func (o *GetRatingEnginesParams) WithTimeout(timeout time.Duration) *GetRatingEnginesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get rating engines params +func (o *GetRatingEnginesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get rating engines params +func (o *GetRatingEnginesParams) WithContext(ctx context.Context) *GetRatingEnginesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get rating engines params +func (o *GetRatingEnginesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get rating engines params +func (o *GetRatingEnginesParams) WithHTTPClient(client *http.Client) *GetRatingEnginesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get rating engines params +func (o *GetRatingEnginesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAccountID adds the accountID to the get rating engines params +func (o *GetRatingEnginesParams) WithAccountID(accountID *string) *GetRatingEnginesParams { + o.SetAccountID(accountID) + return o +} + +// SetAccountID adds the accountId to the get rating engines params +func (o *GetRatingEnginesParams) SetAccountID(accountID *string) { + o.AccountID = accountID +} + +// WithAccountNumber adds the accountNumber to the get rating engines params +func (o *GetRatingEnginesParams) WithAccountNumber(accountNumber *string) *GetRatingEnginesParams { + o.SetAccountNumber(accountNumber) + return o +} + +// SetAccountNumber adds the accountNumber to the get rating engines params +func (o *GetRatingEnginesParams) SetAccountNumber(accountNumber *string) { + o.AccountNumber = accountNumber +} + +// WithBackendID adds the backendID to the get rating engines params +func (o *GetRatingEnginesParams) WithBackendID(backendID *string) *GetRatingEnginesParams { + o.SetBackendID(backendID) + return o +} + +// SetBackendID adds the backendId to the get rating engines params +func (o *GetRatingEnginesParams) SetBackendID(backendID *string) { + o.BackendID = backendID +} + +// WithCompanyID adds the companyID to the get rating engines params +func (o *GetRatingEnginesParams) WithCompanyID(companyID *string) *GetRatingEnginesParams { + o.SetCompanyID(companyID) + return o +} + +// SetCompanyID adds the companyId to the get rating engines params +func (o *GetRatingEnginesParams) SetCompanyID(companyID *string) { + o.CompanyID = companyID +} + +// WithID adds the id to the get rating engines params +func (o *GetRatingEnginesParams) WithID(id *string) *GetRatingEnginesParams { + o.SetID(id) + return o +} + +// SetID adds the id to the get rating engines params +func (o *GetRatingEnginesParams) SetID(id *string) { + o.ID = id +} + +// WithLimit adds the limit to the get rating engines params +func (o *GetRatingEnginesParams) WithLimit(limit *int64) *GetRatingEnginesParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get rating engines params +func (o *GetRatingEnginesParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithName adds the name to the get rating engines params +func (o *GetRatingEnginesParams) WithName(name *string) *GetRatingEnginesParams { + o.SetName(name) + return o +} + +// SetName adds the name to the get rating engines params +func (o *GetRatingEnginesParams) SetName(name *string) { + o.Name = name +} + +// WithOffset adds the offset to the get rating engines params +func (o *GetRatingEnginesParams) WithOffset(offset *int64) *GetRatingEnginesParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get rating engines params +func (o *GetRatingEnginesParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *GetRatingEnginesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AccountID != nil { + + // query param accountId + var qrAccountID string + if o.AccountID != nil { + qrAccountID = *o.AccountID + } + qAccountID := qrAccountID + if qAccountID != "" { + if err := r.SetQueryParam("accountId", qAccountID); err != nil { + return err + } + } + + } + + if o.AccountNumber != nil { + + // query param accountNumber + var qrAccountNumber string + if o.AccountNumber != nil { + qrAccountNumber = *o.AccountNumber + } + qAccountNumber := qrAccountNumber + if qAccountNumber != "" { + if err := r.SetQueryParam("accountNumber", qAccountNumber); err != nil { + return err + } + } + + } + + if o.BackendID != nil { + + // query param backendId + var qrBackendID string + if o.BackendID != nil { + qrBackendID = *o.BackendID + } + qBackendID := qrBackendID + if qBackendID != "" { + if err := r.SetQueryParam("backendId", qBackendID); err != nil { + return err + } + } + + } + + if o.CompanyID != nil { + + // query param companyId + var qrCompanyID string + if o.CompanyID != nil { + qrCompanyID = *o.CompanyID + } + qCompanyID := qrCompanyID + if qCompanyID != "" { + if err := r.SetQueryParam("companyId", qCompanyID); err != nil { + return err + } + } + + } + + if o.ID != nil { + + // query param id + var qrID string + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Name != nil { + + // query param name + var qrName string + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/rating_engine/get_rating_engines_responses.go b/api/devops/regs_client/rating_engine/get_rating_engines_responses.go new file mode 100644 index 0000000..d1b7add --- /dev/null +++ b/api/devops/regs_client/rating_engine/get_rating_engines_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package rating_engine + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// GetRatingEnginesReader is a Reader for the GetRatingEngines structure. +type GetRatingEnginesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetRatingEnginesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetRatingEnginesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetRatingEnginesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetRatingEnginesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetRatingEnginesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetRatingEnginesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetRatingEnginesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetRatingEnginesOK creates a GetRatingEnginesOK with default headers values +func NewGetRatingEnginesOK() *GetRatingEnginesOK { + return &GetRatingEnginesOK{} +} + +/*GetRatingEnginesOK handles this case with default header values. + +Taxnexus Response with Rating Engine objects +*/ +type GetRatingEnginesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *regs_models.RatingEngineResponse +} + +func (o *GetRatingEnginesOK) Error() string { + return fmt.Sprintf("[GET /ratingengines][%d] getRatingEnginesOK %+v", 200, o.Payload) +} + +func (o *GetRatingEnginesOK) GetPayload() *regs_models.RatingEngineResponse { + return o.Payload +} + +func (o *GetRatingEnginesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(regs_models.RatingEngineResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetRatingEnginesUnauthorized creates a GetRatingEnginesUnauthorized with default headers values +func NewGetRatingEnginesUnauthorized() *GetRatingEnginesUnauthorized { + return &GetRatingEnginesUnauthorized{} +} + +/*GetRatingEnginesUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetRatingEnginesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetRatingEnginesUnauthorized) Error() string { + return fmt.Sprintf("[GET /ratingengines][%d] getRatingEnginesUnauthorized %+v", 401, o.Payload) +} + +func (o *GetRatingEnginesUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetRatingEnginesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetRatingEnginesForbidden creates a GetRatingEnginesForbidden with default headers values +func NewGetRatingEnginesForbidden() *GetRatingEnginesForbidden { + return &GetRatingEnginesForbidden{} +} + +/*GetRatingEnginesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetRatingEnginesForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetRatingEnginesForbidden) Error() string { + return fmt.Sprintf("[GET /ratingengines][%d] getRatingEnginesForbidden %+v", 403, o.Payload) +} + +func (o *GetRatingEnginesForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetRatingEnginesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetRatingEnginesNotFound creates a GetRatingEnginesNotFound with default headers values +func NewGetRatingEnginesNotFound() *GetRatingEnginesNotFound { + return &GetRatingEnginesNotFound{} +} + +/*GetRatingEnginesNotFound handles this case with default header values. + +Resource was not found +*/ +type GetRatingEnginesNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetRatingEnginesNotFound) Error() string { + return fmt.Sprintf("[GET /ratingengines][%d] getRatingEnginesNotFound %+v", 404, o.Payload) +} + +func (o *GetRatingEnginesNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetRatingEnginesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetRatingEnginesUnprocessableEntity creates a GetRatingEnginesUnprocessableEntity with default headers values +func NewGetRatingEnginesUnprocessableEntity() *GetRatingEnginesUnprocessableEntity { + return &GetRatingEnginesUnprocessableEntity{} +} + +/*GetRatingEnginesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetRatingEnginesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetRatingEnginesUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /ratingengines][%d] getRatingEnginesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetRatingEnginesUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetRatingEnginesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetRatingEnginesInternalServerError creates a GetRatingEnginesInternalServerError with default headers values +func NewGetRatingEnginesInternalServerError() *GetRatingEnginesInternalServerError { + return &GetRatingEnginesInternalServerError{} +} + +/*GetRatingEnginesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetRatingEnginesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetRatingEnginesInternalServerError) Error() string { + return fmt.Sprintf("[GET /ratingengines][%d] getRatingEnginesInternalServerError %+v", 500, o.Payload) +} + +func (o *GetRatingEnginesInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetRatingEnginesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/rating_engine/post_rating_engines_parameters.go b/api/devops/regs_client/rating_engine/post_rating_engines_parameters.go new file mode 100644 index 0000000..73df81e --- /dev/null +++ b/api/devops/regs_client/rating_engine/post_rating_engines_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package rating_engine + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// NewPostRatingEnginesParams creates a new PostRatingEnginesParams object +// with the default values initialized. +func NewPostRatingEnginesParams() *PostRatingEnginesParams { + var () + return &PostRatingEnginesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostRatingEnginesParamsWithTimeout creates a new PostRatingEnginesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostRatingEnginesParamsWithTimeout(timeout time.Duration) *PostRatingEnginesParams { + var () + return &PostRatingEnginesParams{ + + timeout: timeout, + } +} + +// NewPostRatingEnginesParamsWithContext creates a new PostRatingEnginesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostRatingEnginesParamsWithContext(ctx context.Context) *PostRatingEnginesParams { + var () + return &PostRatingEnginesParams{ + + Context: ctx, + } +} + +// NewPostRatingEnginesParamsWithHTTPClient creates a new PostRatingEnginesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostRatingEnginesParamsWithHTTPClient(client *http.Client) *PostRatingEnginesParams { + var () + return &PostRatingEnginesParams{ + HTTPClient: client, + } +} + +/*PostRatingEnginesParams contains all the parameters to send to the API endpoint +for the post rating engines operation typically these are written to a http.Request +*/ +type PostRatingEnginesParams struct { + + /*RatingEngineRequest + An array of new Submission records + + */ + RatingEngineRequest *regs_models.RatingEngineRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post rating engines params +func (o *PostRatingEnginesParams) WithTimeout(timeout time.Duration) *PostRatingEnginesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post rating engines params +func (o *PostRatingEnginesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post rating engines params +func (o *PostRatingEnginesParams) WithContext(ctx context.Context) *PostRatingEnginesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post rating engines params +func (o *PostRatingEnginesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post rating engines params +func (o *PostRatingEnginesParams) WithHTTPClient(client *http.Client) *PostRatingEnginesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post rating engines params +func (o *PostRatingEnginesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithRatingEngineRequest adds the ratingEngineRequest to the post rating engines params +func (o *PostRatingEnginesParams) WithRatingEngineRequest(ratingEngineRequest *regs_models.RatingEngineRequest) *PostRatingEnginesParams { + o.SetRatingEngineRequest(ratingEngineRequest) + return o +} + +// SetRatingEngineRequest adds the ratingEngineRequest to the post rating engines params +func (o *PostRatingEnginesParams) SetRatingEngineRequest(ratingEngineRequest *regs_models.RatingEngineRequest) { + o.RatingEngineRequest = ratingEngineRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostRatingEnginesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.RatingEngineRequest != nil { + if err := r.SetBodyParam(o.RatingEngineRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/rating_engine/post_rating_engines_responses.go b/api/devops/regs_client/rating_engine/post_rating_engines_responses.go new file mode 100644 index 0000000..5dbe876 --- /dev/null +++ b/api/devops/regs_client/rating_engine/post_rating_engines_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package rating_engine + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// PostRatingEnginesReader is a Reader for the PostRatingEngines structure. +type PostRatingEnginesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostRatingEnginesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostRatingEnginesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostRatingEnginesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostRatingEnginesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostRatingEnginesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostRatingEnginesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostRatingEnginesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostRatingEnginesOK creates a PostRatingEnginesOK with default headers values +func NewPostRatingEnginesOK() *PostRatingEnginesOK { + return &PostRatingEnginesOK{} +} + +/*PostRatingEnginesOK handles this case with default header values. + +Taxnexus Response with License objects +*/ +type PostRatingEnginesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *regs_models.LicenseTypeResponse +} + +func (o *PostRatingEnginesOK) Error() string { + return fmt.Sprintf("[POST /ratingengines][%d] postRatingEnginesOK %+v", 200, o.Payload) +} + +func (o *PostRatingEnginesOK) GetPayload() *regs_models.LicenseTypeResponse { + return o.Payload +} + +func (o *PostRatingEnginesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(regs_models.LicenseTypeResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostRatingEnginesUnauthorized creates a PostRatingEnginesUnauthorized with default headers values +func NewPostRatingEnginesUnauthorized() *PostRatingEnginesUnauthorized { + return &PostRatingEnginesUnauthorized{} +} + +/*PostRatingEnginesUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostRatingEnginesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostRatingEnginesUnauthorized) Error() string { + return fmt.Sprintf("[POST /ratingengines][%d] postRatingEnginesUnauthorized %+v", 401, o.Payload) +} + +func (o *PostRatingEnginesUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostRatingEnginesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostRatingEnginesForbidden creates a PostRatingEnginesForbidden with default headers values +func NewPostRatingEnginesForbidden() *PostRatingEnginesForbidden { + return &PostRatingEnginesForbidden{} +} + +/*PostRatingEnginesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostRatingEnginesForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostRatingEnginesForbidden) Error() string { + return fmt.Sprintf("[POST /ratingengines][%d] postRatingEnginesForbidden %+v", 403, o.Payload) +} + +func (o *PostRatingEnginesForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostRatingEnginesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostRatingEnginesNotFound creates a PostRatingEnginesNotFound with default headers values +func NewPostRatingEnginesNotFound() *PostRatingEnginesNotFound { + return &PostRatingEnginesNotFound{} +} + +/*PostRatingEnginesNotFound handles this case with default header values. + +Resource was not found +*/ +type PostRatingEnginesNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostRatingEnginesNotFound) Error() string { + return fmt.Sprintf("[POST /ratingengines][%d] postRatingEnginesNotFound %+v", 404, o.Payload) +} + +func (o *PostRatingEnginesNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostRatingEnginesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostRatingEnginesUnprocessableEntity creates a PostRatingEnginesUnprocessableEntity with default headers values +func NewPostRatingEnginesUnprocessableEntity() *PostRatingEnginesUnprocessableEntity { + return &PostRatingEnginesUnprocessableEntity{} +} + +/*PostRatingEnginesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostRatingEnginesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostRatingEnginesUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /ratingengines][%d] postRatingEnginesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostRatingEnginesUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostRatingEnginesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostRatingEnginesInternalServerError creates a PostRatingEnginesInternalServerError with default headers values +func NewPostRatingEnginesInternalServerError() *PostRatingEnginesInternalServerError { + return &PostRatingEnginesInternalServerError{} +} + +/*PostRatingEnginesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostRatingEnginesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostRatingEnginesInternalServerError) Error() string { + return fmt.Sprintf("[POST /ratingengines][%d] postRatingEnginesInternalServerError %+v", 500, o.Payload) +} + +func (o *PostRatingEnginesInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostRatingEnginesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/rating_engine/put_rating_engines_parameters.go b/api/devops/regs_client/rating_engine/put_rating_engines_parameters.go new file mode 100644 index 0000000..3f1467e --- /dev/null +++ b/api/devops/regs_client/rating_engine/put_rating_engines_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package rating_engine + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// NewPutRatingEnginesParams creates a new PutRatingEnginesParams object +// with the default values initialized. +func NewPutRatingEnginesParams() *PutRatingEnginesParams { + var () + return &PutRatingEnginesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPutRatingEnginesParamsWithTimeout creates a new PutRatingEnginesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPutRatingEnginesParamsWithTimeout(timeout time.Duration) *PutRatingEnginesParams { + var () + return &PutRatingEnginesParams{ + + timeout: timeout, + } +} + +// NewPutRatingEnginesParamsWithContext creates a new PutRatingEnginesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPutRatingEnginesParamsWithContext(ctx context.Context) *PutRatingEnginesParams { + var () + return &PutRatingEnginesParams{ + + Context: ctx, + } +} + +// NewPutRatingEnginesParamsWithHTTPClient creates a new PutRatingEnginesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPutRatingEnginesParamsWithHTTPClient(client *http.Client) *PutRatingEnginesParams { + var () + return &PutRatingEnginesParams{ + HTTPClient: client, + } +} + +/*PutRatingEnginesParams contains all the parameters to send to the API endpoint +for the put rating engines operation typically these are written to a http.Request +*/ +type PutRatingEnginesParams struct { + + /*RatingEngineRequest + An array of new Submission records + + */ + RatingEngineRequest *regs_models.RatingEngineRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the put rating engines params +func (o *PutRatingEnginesParams) WithTimeout(timeout time.Duration) *PutRatingEnginesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the put rating engines params +func (o *PutRatingEnginesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the put rating engines params +func (o *PutRatingEnginesParams) WithContext(ctx context.Context) *PutRatingEnginesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the put rating engines params +func (o *PutRatingEnginesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the put rating engines params +func (o *PutRatingEnginesParams) WithHTTPClient(client *http.Client) *PutRatingEnginesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the put rating engines params +func (o *PutRatingEnginesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithRatingEngineRequest adds the ratingEngineRequest to the put rating engines params +func (o *PutRatingEnginesParams) WithRatingEngineRequest(ratingEngineRequest *regs_models.RatingEngineRequest) *PutRatingEnginesParams { + o.SetRatingEngineRequest(ratingEngineRequest) + return o +} + +// SetRatingEngineRequest adds the ratingEngineRequest to the put rating engines params +func (o *PutRatingEnginesParams) SetRatingEngineRequest(ratingEngineRequest *regs_models.RatingEngineRequest) { + o.RatingEngineRequest = ratingEngineRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PutRatingEnginesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.RatingEngineRequest != nil { + if err := r.SetBodyParam(o.RatingEngineRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/rating_engine/put_rating_engines_responses.go b/api/devops/regs_client/rating_engine/put_rating_engines_responses.go new file mode 100644 index 0000000..8d9ea60 --- /dev/null +++ b/api/devops/regs_client/rating_engine/put_rating_engines_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package rating_engine + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// PutRatingEnginesReader is a Reader for the PutRatingEngines structure. +type PutRatingEnginesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PutRatingEnginesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPutRatingEnginesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPutRatingEnginesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPutRatingEnginesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPutRatingEnginesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPutRatingEnginesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPutRatingEnginesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPutRatingEnginesOK creates a PutRatingEnginesOK with default headers values +func NewPutRatingEnginesOK() *PutRatingEnginesOK { + return &PutRatingEnginesOK{} +} + +/*PutRatingEnginesOK handles this case with default header values. + +Taxnexus Response with License objects +*/ +type PutRatingEnginesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *regs_models.LicenseTypeResponse +} + +func (o *PutRatingEnginesOK) Error() string { + return fmt.Sprintf("[PUT /ratingengines][%d] putRatingEnginesOK %+v", 200, o.Payload) +} + +func (o *PutRatingEnginesOK) GetPayload() *regs_models.LicenseTypeResponse { + return o.Payload +} + +func (o *PutRatingEnginesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(regs_models.LicenseTypeResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutRatingEnginesUnauthorized creates a PutRatingEnginesUnauthorized with default headers values +func NewPutRatingEnginesUnauthorized() *PutRatingEnginesUnauthorized { + return &PutRatingEnginesUnauthorized{} +} + +/*PutRatingEnginesUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PutRatingEnginesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutRatingEnginesUnauthorized) Error() string { + return fmt.Sprintf("[PUT /ratingengines][%d] putRatingEnginesUnauthorized %+v", 401, o.Payload) +} + +func (o *PutRatingEnginesUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutRatingEnginesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutRatingEnginesForbidden creates a PutRatingEnginesForbidden with default headers values +func NewPutRatingEnginesForbidden() *PutRatingEnginesForbidden { + return &PutRatingEnginesForbidden{} +} + +/*PutRatingEnginesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PutRatingEnginesForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutRatingEnginesForbidden) Error() string { + return fmt.Sprintf("[PUT /ratingengines][%d] putRatingEnginesForbidden %+v", 403, o.Payload) +} + +func (o *PutRatingEnginesForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutRatingEnginesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutRatingEnginesNotFound creates a PutRatingEnginesNotFound with default headers values +func NewPutRatingEnginesNotFound() *PutRatingEnginesNotFound { + return &PutRatingEnginesNotFound{} +} + +/*PutRatingEnginesNotFound handles this case with default header values. + +Resource was not found +*/ +type PutRatingEnginesNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutRatingEnginesNotFound) Error() string { + return fmt.Sprintf("[PUT /ratingengines][%d] putRatingEnginesNotFound %+v", 404, o.Payload) +} + +func (o *PutRatingEnginesNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutRatingEnginesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutRatingEnginesUnprocessableEntity creates a PutRatingEnginesUnprocessableEntity with default headers values +func NewPutRatingEnginesUnprocessableEntity() *PutRatingEnginesUnprocessableEntity { + return &PutRatingEnginesUnprocessableEntity{} +} + +/*PutRatingEnginesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PutRatingEnginesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutRatingEnginesUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /ratingengines][%d] putRatingEnginesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutRatingEnginesUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutRatingEnginesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutRatingEnginesInternalServerError creates a PutRatingEnginesInternalServerError with default headers values +func NewPutRatingEnginesInternalServerError() *PutRatingEnginesInternalServerError { + return &PutRatingEnginesInternalServerError{} +} + +/*PutRatingEnginesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PutRatingEnginesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutRatingEnginesInternalServerError) Error() string { + return fmt.Sprintf("[PUT /ratingengines][%d] putRatingEnginesInternalServerError %+v", 500, o.Payload) +} + +func (o *PutRatingEnginesInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutRatingEnginesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/rating_engine/rating_engine_client.go b/api/devops/regs_client/rating_engine/rating_engine_client.go new file mode 100644 index 0000000..df9974f --- /dev/null +++ b/api/devops/regs_client/rating_engine/rating_engine_client.go @@ -0,0 +1,196 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package rating_engine + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new rating engine API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for rating engine API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + DeleteRatingEngine(params *DeleteRatingEngineParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteRatingEngineOK, error) + + GetRatingEngines(params *GetRatingEnginesParams, authInfo runtime.ClientAuthInfoWriter) (*GetRatingEnginesOK, error) + + PostRatingEngines(params *PostRatingEnginesParams, authInfo runtime.ClientAuthInfoWriter) (*PostRatingEnginesOK, error) + + PutRatingEngines(params *PutRatingEnginesParams, authInfo runtime.ClientAuthInfoWriter) (*PutRatingEnginesOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + DeleteRatingEngine deletes a rating engine + + Delete Taxnexus Backend record +*/ +func (a *Client) DeleteRatingEngine(params *DeleteRatingEngineParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteRatingEngineOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDeleteRatingEngineParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "deleteRatingEngine", + Method: "DELETE", + PathPattern: "/ratingengines", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &DeleteRatingEngineReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*DeleteRatingEngineOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for deleteRatingEngine: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetRatingEngines gets a list of rating engines + + Return a list of Rating Engines +*/ +func (a *Client) GetRatingEngines(params *GetRatingEnginesParams, authInfo runtime.ClientAuthInfoWriter) (*GetRatingEnginesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetRatingEnginesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getRatingEngines", + Method: "GET", + PathPattern: "/ratingengines", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetRatingEnginesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetRatingEnginesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getRatingEngines: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostRatingEngines adds rating engine + + Rating Engine records to be added +*/ +func (a *Client) PostRatingEngines(params *PostRatingEnginesParams, authInfo runtime.ClientAuthInfoWriter) (*PostRatingEnginesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostRatingEnginesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postRatingEngines", + Method: "POST", + PathPattern: "/ratingengines", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostRatingEnginesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostRatingEnginesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postRatingEngines: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PutRatingEngines updates rating engine + + Update Rating Engine records +*/ +func (a *Client) PutRatingEngines(params *PutRatingEnginesParams, authInfo runtime.ClientAuthInfoWriter) (*PutRatingEnginesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPutRatingEnginesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "putRatingEngines", + Method: "PUT", + PathPattern: "/ratingengines", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PutRatingEnginesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PutRatingEnginesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for putRatingEngines: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/devops/regs_client/regs_client.go b/api/devops/regs_client/regs_client.go new file mode 100644 index 0000000..45cc579 --- /dev/null +++ b/api/devops/regs_client/regs_client.go @@ -0,0 +1,171 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_client + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_client/authority" + "github.com/taxnexus/lib/api/regs/regs_client/backend" + "github.com/taxnexus/lib/api/regs/regs_client/cors" + "github.com/taxnexus/lib/api/regs/regs_client/filing" + "github.com/taxnexus/lib/api/regs/regs_client/filing_type" + "github.com/taxnexus/lib/api/regs/regs_client/license" + "github.com/taxnexus/lib/api/regs/regs_client/license_type" + "github.com/taxnexus/lib/api/regs/regs_client/notebook" + "github.com/taxnexus/lib/api/regs/regs_client/rating_engine" + "github.com/taxnexus/lib/api/regs/regs_client/submission" + "github.com/taxnexus/lib/api/regs/regs_client/tax_type_account" + "github.com/taxnexus/lib/api/regs/regs_client/transaction" +) + +// Default regs HTTP client. +var Default = NewHTTPClient(nil) + +const ( + // DefaultHost is the default Host + // found in Meta (info) section of spec file + DefaultHost string = "regs.fabric.tnxs.net:8080" + // DefaultBasePath is the default BasePath + // found in Meta (info) section of spec file + DefaultBasePath string = "/v1" +) + +// DefaultSchemes are the default schemes found in Meta (info) section of spec file +var DefaultSchemes = []string{"http"} + +// NewHTTPClient creates a new regs HTTP client. +func NewHTTPClient(formats strfmt.Registry) *Regs { + return NewHTTPClientWithConfig(formats, nil) +} + +// NewHTTPClientWithConfig creates a new regs HTTP client, +// using a customizable transport config. +func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *Regs { + // ensure nullable parameters have default + if cfg == nil { + cfg = DefaultTransportConfig() + } + + // create transport and client + transport := httptransport.New(cfg.Host, cfg.BasePath, cfg.Schemes) + return New(transport, formats) +} + +// New creates a new regs client +func New(transport runtime.ClientTransport, formats strfmt.Registry) *Regs { + // ensure nullable parameters have default + if formats == nil { + formats = strfmt.Default + } + + cli := new(Regs) + cli.Transport = transport + cli.Authority = authority.New(transport, formats) + cli.Backend = backend.New(transport, formats) + cli.Cors = cors.New(transport, formats) + cli.Filing = filing.New(transport, formats) + cli.FilingType = filing_type.New(transport, formats) + cli.License = license.New(transport, formats) + cli.LicenseType = license_type.New(transport, formats) + cli.Notebook = notebook.New(transport, formats) + cli.RatingEngine = rating_engine.New(transport, formats) + cli.Submission = submission.New(transport, formats) + cli.TaxTypeAccount = tax_type_account.New(transport, formats) + cli.Transaction = transaction.New(transport, formats) + return cli +} + +// DefaultTransportConfig creates a TransportConfig with the +// default settings taken from the meta section of the spec file. +func DefaultTransportConfig() *TransportConfig { + return &TransportConfig{ + Host: DefaultHost, + BasePath: DefaultBasePath, + Schemes: DefaultSchemes, + } +} + +// TransportConfig contains the transport related info, +// found in the meta section of the spec file. +type TransportConfig struct { + Host string + BasePath string + Schemes []string +} + +// WithHost overrides the default host, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithHost(host string) *TransportConfig { + cfg.Host = host + return cfg +} + +// WithBasePath overrides the default basePath, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithBasePath(basePath string) *TransportConfig { + cfg.BasePath = basePath + return cfg +} + +// WithSchemes overrides the default schemes, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { + cfg.Schemes = schemes + return cfg +} + +// Regs is a client for regs +type Regs struct { + Authority authority.ClientService + + Backend backend.ClientService + + Cors cors.ClientService + + Filing filing.ClientService + + FilingType filing_type.ClientService + + License license.ClientService + + LicenseType license_type.ClientService + + Notebook notebook.ClientService + + RatingEngine rating_engine.ClientService + + Submission submission.ClientService + + TaxTypeAccount tax_type_account.ClientService + + Transaction transaction.ClientService + + Transport runtime.ClientTransport +} + +// SetTransport changes the transport on the client and all its subresources +func (c *Regs) SetTransport(transport runtime.ClientTransport) { + c.Transport = transport + c.Authority.SetTransport(transport) + c.Backend.SetTransport(transport) + c.Cors.SetTransport(transport) + c.Filing.SetTransport(transport) + c.FilingType.SetTransport(transport) + c.License.SetTransport(transport) + c.LicenseType.SetTransport(transport) + c.Notebook.SetTransport(transport) + c.RatingEngine.SetTransport(transport) + c.Submission.SetTransport(transport) + c.TaxTypeAccount.SetTransport(transport) + c.Transaction.SetTransport(transport) +} diff --git a/api/devops/regs_client/submission/get_submissions_parameters.go b/api/devops/regs_client/submission/get_submissions_parameters.go new file mode 100644 index 0000000..15c530d --- /dev/null +++ b/api/devops/regs_client/submission/get_submissions_parameters.go @@ -0,0 +1,279 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package submission + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetSubmissionsParams creates a new GetSubmissionsParams object +// with the default values initialized. +func NewGetSubmissionsParams() *GetSubmissionsParams { + var () + return &GetSubmissionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetSubmissionsParamsWithTimeout creates a new GetSubmissionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetSubmissionsParamsWithTimeout(timeout time.Duration) *GetSubmissionsParams { + var () + return &GetSubmissionsParams{ + + timeout: timeout, + } +} + +// NewGetSubmissionsParamsWithContext creates a new GetSubmissionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetSubmissionsParamsWithContext(ctx context.Context) *GetSubmissionsParams { + var () + return &GetSubmissionsParams{ + + Context: ctx, + } +} + +// NewGetSubmissionsParamsWithHTTPClient creates a new GetSubmissionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetSubmissionsParamsWithHTTPClient(client *http.Client) *GetSubmissionsParams { + var () + return &GetSubmissionsParams{ + HTTPClient: client, + } +} + +/*GetSubmissionsParams contains all the parameters to send to the API endpoint +for the get submissions operation typically these are written to a http.Request +*/ +type GetSubmissionsParams struct { + + /*CompanyID + Taxnexus Record Id of a Company + + */ + CompanyID *string + /*ID + Taxnexus Id of the record to be retrieved + + */ + ID *string + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + /*SubmissionID + Taxnexus Record Id of a Submisssion + + */ + SubmissionID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get submissions params +func (o *GetSubmissionsParams) WithTimeout(timeout time.Duration) *GetSubmissionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get submissions params +func (o *GetSubmissionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get submissions params +func (o *GetSubmissionsParams) WithContext(ctx context.Context) *GetSubmissionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get submissions params +func (o *GetSubmissionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get submissions params +func (o *GetSubmissionsParams) WithHTTPClient(client *http.Client) *GetSubmissionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get submissions params +func (o *GetSubmissionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCompanyID adds the companyID to the get submissions params +func (o *GetSubmissionsParams) WithCompanyID(companyID *string) *GetSubmissionsParams { + o.SetCompanyID(companyID) + return o +} + +// SetCompanyID adds the companyId to the get submissions params +func (o *GetSubmissionsParams) SetCompanyID(companyID *string) { + o.CompanyID = companyID +} + +// WithID adds the id to the get submissions params +func (o *GetSubmissionsParams) WithID(id *string) *GetSubmissionsParams { + o.SetID(id) + return o +} + +// SetID adds the id to the get submissions params +func (o *GetSubmissionsParams) SetID(id *string) { + o.ID = id +} + +// WithLimit adds the limit to the get submissions params +func (o *GetSubmissionsParams) WithLimit(limit *int64) *GetSubmissionsParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get submissions params +func (o *GetSubmissionsParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get submissions params +func (o *GetSubmissionsParams) WithOffset(offset *int64) *GetSubmissionsParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get submissions params +func (o *GetSubmissionsParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithSubmissionID adds the submissionID to the get submissions params +func (o *GetSubmissionsParams) WithSubmissionID(submissionID *string) *GetSubmissionsParams { + o.SetSubmissionID(submissionID) + return o +} + +// SetSubmissionID adds the submissionId to the get submissions params +func (o *GetSubmissionsParams) SetSubmissionID(submissionID *string) { + o.SubmissionID = submissionID +} + +// WriteToRequest writes these params to a swagger request +func (o *GetSubmissionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CompanyID != nil { + + // query param companyId + var qrCompanyID string + if o.CompanyID != nil { + qrCompanyID = *o.CompanyID + } + qCompanyID := qrCompanyID + if qCompanyID != "" { + if err := r.SetQueryParam("companyId", qCompanyID); err != nil { + return err + } + } + + } + + if o.ID != nil { + + // query param id + var qrID string + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.SubmissionID != nil { + + // query param submissionId + var qrSubmissionID string + if o.SubmissionID != nil { + qrSubmissionID = *o.SubmissionID + } + qSubmissionID := qrSubmissionID + if qSubmissionID != "" { + if err := r.SetQueryParam("submissionId", qSubmissionID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/submission/get_submissions_responses.go b/api/devops/regs_client/submission/get_submissions_responses.go new file mode 100644 index 0000000..f2d5d85 --- /dev/null +++ b/api/devops/regs_client/submission/get_submissions_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package submission + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// GetSubmissionsReader is a Reader for the GetSubmissions structure. +type GetSubmissionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetSubmissionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetSubmissionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetSubmissionsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetSubmissionsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetSubmissionsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetSubmissionsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetSubmissionsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetSubmissionsOK creates a GetSubmissionsOK with default headers values +func NewGetSubmissionsOK() *GetSubmissionsOK { + return &GetSubmissionsOK{} +} + +/*GetSubmissionsOK handles this case with default header values. + +Taxnexus Response with Submission objects +*/ +type GetSubmissionsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *regs_models.SubmissionResponse +} + +func (o *GetSubmissionsOK) Error() string { + return fmt.Sprintf("[GET /submissions][%d] getSubmissionsOK %+v", 200, o.Payload) +} + +func (o *GetSubmissionsOK) GetPayload() *regs_models.SubmissionResponse { + return o.Payload +} + +func (o *GetSubmissionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(regs_models.SubmissionResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetSubmissionsUnauthorized creates a GetSubmissionsUnauthorized with default headers values +func NewGetSubmissionsUnauthorized() *GetSubmissionsUnauthorized { + return &GetSubmissionsUnauthorized{} +} + +/*GetSubmissionsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetSubmissionsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetSubmissionsUnauthorized) Error() string { + return fmt.Sprintf("[GET /submissions][%d] getSubmissionsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetSubmissionsUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetSubmissionsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetSubmissionsForbidden creates a GetSubmissionsForbidden with default headers values +func NewGetSubmissionsForbidden() *GetSubmissionsForbidden { + return &GetSubmissionsForbidden{} +} + +/*GetSubmissionsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetSubmissionsForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetSubmissionsForbidden) Error() string { + return fmt.Sprintf("[GET /submissions][%d] getSubmissionsForbidden %+v", 403, o.Payload) +} + +func (o *GetSubmissionsForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetSubmissionsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetSubmissionsNotFound creates a GetSubmissionsNotFound with default headers values +func NewGetSubmissionsNotFound() *GetSubmissionsNotFound { + return &GetSubmissionsNotFound{} +} + +/*GetSubmissionsNotFound handles this case with default header values. + +Resource was not found +*/ +type GetSubmissionsNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetSubmissionsNotFound) Error() string { + return fmt.Sprintf("[GET /submissions][%d] getSubmissionsNotFound %+v", 404, o.Payload) +} + +func (o *GetSubmissionsNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetSubmissionsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetSubmissionsUnprocessableEntity creates a GetSubmissionsUnprocessableEntity with default headers values +func NewGetSubmissionsUnprocessableEntity() *GetSubmissionsUnprocessableEntity { + return &GetSubmissionsUnprocessableEntity{} +} + +/*GetSubmissionsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetSubmissionsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetSubmissionsUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /submissions][%d] getSubmissionsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetSubmissionsUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetSubmissionsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetSubmissionsInternalServerError creates a GetSubmissionsInternalServerError with default headers values +func NewGetSubmissionsInternalServerError() *GetSubmissionsInternalServerError { + return &GetSubmissionsInternalServerError{} +} + +/*GetSubmissionsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetSubmissionsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetSubmissionsInternalServerError) Error() string { + return fmt.Sprintf("[GET /submissions][%d] getSubmissionsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetSubmissionsInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetSubmissionsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/submission/post_submissions_parameters.go b/api/devops/regs_client/submission/post_submissions_parameters.go new file mode 100644 index 0000000..00a83c9 --- /dev/null +++ b/api/devops/regs_client/submission/post_submissions_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package submission + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// NewPostSubmissionsParams creates a new PostSubmissionsParams object +// with the default values initialized. +func NewPostSubmissionsParams() *PostSubmissionsParams { + var () + return &PostSubmissionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostSubmissionsParamsWithTimeout creates a new PostSubmissionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostSubmissionsParamsWithTimeout(timeout time.Duration) *PostSubmissionsParams { + var () + return &PostSubmissionsParams{ + + timeout: timeout, + } +} + +// NewPostSubmissionsParamsWithContext creates a new PostSubmissionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostSubmissionsParamsWithContext(ctx context.Context) *PostSubmissionsParams { + var () + return &PostSubmissionsParams{ + + Context: ctx, + } +} + +// NewPostSubmissionsParamsWithHTTPClient creates a new PostSubmissionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostSubmissionsParamsWithHTTPClient(client *http.Client) *PostSubmissionsParams { + var () + return &PostSubmissionsParams{ + HTTPClient: client, + } +} + +/*PostSubmissionsParams contains all the parameters to send to the API endpoint +for the post submissions operation typically these are written to a http.Request +*/ +type PostSubmissionsParams struct { + + /*SubmissionRequest + An array of new Submission records + + */ + SubmissionRequest *regs_models.SubmissionRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post submissions params +func (o *PostSubmissionsParams) WithTimeout(timeout time.Duration) *PostSubmissionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post submissions params +func (o *PostSubmissionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post submissions params +func (o *PostSubmissionsParams) WithContext(ctx context.Context) *PostSubmissionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post submissions params +func (o *PostSubmissionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post submissions params +func (o *PostSubmissionsParams) WithHTTPClient(client *http.Client) *PostSubmissionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post submissions params +func (o *PostSubmissionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithSubmissionRequest adds the submissionRequest to the post submissions params +func (o *PostSubmissionsParams) WithSubmissionRequest(submissionRequest *regs_models.SubmissionRequest) *PostSubmissionsParams { + o.SetSubmissionRequest(submissionRequest) + return o +} + +// SetSubmissionRequest adds the submissionRequest to the post submissions params +func (o *PostSubmissionsParams) SetSubmissionRequest(submissionRequest *regs_models.SubmissionRequest) { + o.SubmissionRequest = submissionRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostSubmissionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.SubmissionRequest != nil { + if err := r.SetBodyParam(o.SubmissionRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/submission/post_submissions_responses.go b/api/devops/regs_client/submission/post_submissions_responses.go new file mode 100644 index 0000000..a3124d0 --- /dev/null +++ b/api/devops/regs_client/submission/post_submissions_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package submission + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// PostSubmissionsReader is a Reader for the PostSubmissions structure. +type PostSubmissionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostSubmissionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostSubmissionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostSubmissionsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostSubmissionsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostSubmissionsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostSubmissionsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostSubmissionsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostSubmissionsOK creates a PostSubmissionsOK with default headers values +func NewPostSubmissionsOK() *PostSubmissionsOK { + return &PostSubmissionsOK{} +} + +/*PostSubmissionsOK handles this case with default header values. + +Taxnexus Response with Submission objects +*/ +type PostSubmissionsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *regs_models.SubmissionResponse +} + +func (o *PostSubmissionsOK) Error() string { + return fmt.Sprintf("[POST /submissions][%d] postSubmissionsOK %+v", 200, o.Payload) +} + +func (o *PostSubmissionsOK) GetPayload() *regs_models.SubmissionResponse { + return o.Payload +} + +func (o *PostSubmissionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(regs_models.SubmissionResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostSubmissionsUnauthorized creates a PostSubmissionsUnauthorized with default headers values +func NewPostSubmissionsUnauthorized() *PostSubmissionsUnauthorized { + return &PostSubmissionsUnauthorized{} +} + +/*PostSubmissionsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostSubmissionsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostSubmissionsUnauthorized) Error() string { + return fmt.Sprintf("[POST /submissions][%d] postSubmissionsUnauthorized %+v", 401, o.Payload) +} + +func (o *PostSubmissionsUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostSubmissionsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostSubmissionsForbidden creates a PostSubmissionsForbidden with default headers values +func NewPostSubmissionsForbidden() *PostSubmissionsForbidden { + return &PostSubmissionsForbidden{} +} + +/*PostSubmissionsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostSubmissionsForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostSubmissionsForbidden) Error() string { + return fmt.Sprintf("[POST /submissions][%d] postSubmissionsForbidden %+v", 403, o.Payload) +} + +func (o *PostSubmissionsForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostSubmissionsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostSubmissionsNotFound creates a PostSubmissionsNotFound with default headers values +func NewPostSubmissionsNotFound() *PostSubmissionsNotFound { + return &PostSubmissionsNotFound{} +} + +/*PostSubmissionsNotFound handles this case with default header values. + +Resource was not found +*/ +type PostSubmissionsNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostSubmissionsNotFound) Error() string { + return fmt.Sprintf("[POST /submissions][%d] postSubmissionsNotFound %+v", 404, o.Payload) +} + +func (o *PostSubmissionsNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostSubmissionsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostSubmissionsUnprocessableEntity creates a PostSubmissionsUnprocessableEntity with default headers values +func NewPostSubmissionsUnprocessableEntity() *PostSubmissionsUnprocessableEntity { + return &PostSubmissionsUnprocessableEntity{} +} + +/*PostSubmissionsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostSubmissionsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostSubmissionsUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /submissions][%d] postSubmissionsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostSubmissionsUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostSubmissionsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostSubmissionsInternalServerError creates a PostSubmissionsInternalServerError with default headers values +func NewPostSubmissionsInternalServerError() *PostSubmissionsInternalServerError { + return &PostSubmissionsInternalServerError{} +} + +/*PostSubmissionsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostSubmissionsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostSubmissionsInternalServerError) Error() string { + return fmt.Sprintf("[POST /submissions][%d] postSubmissionsInternalServerError %+v", 500, o.Payload) +} + +func (o *PostSubmissionsInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostSubmissionsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/submission/put_submissions_parameters.go b/api/devops/regs_client/submission/put_submissions_parameters.go new file mode 100644 index 0000000..368f238 --- /dev/null +++ b/api/devops/regs_client/submission/put_submissions_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package submission + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// NewPutSubmissionsParams creates a new PutSubmissionsParams object +// with the default values initialized. +func NewPutSubmissionsParams() *PutSubmissionsParams { + var () + return &PutSubmissionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPutSubmissionsParamsWithTimeout creates a new PutSubmissionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPutSubmissionsParamsWithTimeout(timeout time.Duration) *PutSubmissionsParams { + var () + return &PutSubmissionsParams{ + + timeout: timeout, + } +} + +// NewPutSubmissionsParamsWithContext creates a new PutSubmissionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPutSubmissionsParamsWithContext(ctx context.Context) *PutSubmissionsParams { + var () + return &PutSubmissionsParams{ + + Context: ctx, + } +} + +// NewPutSubmissionsParamsWithHTTPClient creates a new PutSubmissionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPutSubmissionsParamsWithHTTPClient(client *http.Client) *PutSubmissionsParams { + var () + return &PutSubmissionsParams{ + HTTPClient: client, + } +} + +/*PutSubmissionsParams contains all the parameters to send to the API endpoint +for the put submissions operation typically these are written to a http.Request +*/ +type PutSubmissionsParams struct { + + /*SubmissionRequest + An array of new Submission records + + */ + SubmissionRequest *regs_models.SubmissionRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the put submissions params +func (o *PutSubmissionsParams) WithTimeout(timeout time.Duration) *PutSubmissionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the put submissions params +func (o *PutSubmissionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the put submissions params +func (o *PutSubmissionsParams) WithContext(ctx context.Context) *PutSubmissionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the put submissions params +func (o *PutSubmissionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the put submissions params +func (o *PutSubmissionsParams) WithHTTPClient(client *http.Client) *PutSubmissionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the put submissions params +func (o *PutSubmissionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithSubmissionRequest adds the submissionRequest to the put submissions params +func (o *PutSubmissionsParams) WithSubmissionRequest(submissionRequest *regs_models.SubmissionRequest) *PutSubmissionsParams { + o.SetSubmissionRequest(submissionRequest) + return o +} + +// SetSubmissionRequest adds the submissionRequest to the put submissions params +func (o *PutSubmissionsParams) SetSubmissionRequest(submissionRequest *regs_models.SubmissionRequest) { + o.SubmissionRequest = submissionRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PutSubmissionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.SubmissionRequest != nil { + if err := r.SetBodyParam(o.SubmissionRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/submission/put_submissions_responses.go b/api/devops/regs_client/submission/put_submissions_responses.go new file mode 100644 index 0000000..17120dc --- /dev/null +++ b/api/devops/regs_client/submission/put_submissions_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package submission + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// PutSubmissionsReader is a Reader for the PutSubmissions structure. +type PutSubmissionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PutSubmissionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPutSubmissionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPutSubmissionsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPutSubmissionsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPutSubmissionsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPutSubmissionsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPutSubmissionsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPutSubmissionsOK creates a PutSubmissionsOK with default headers values +func NewPutSubmissionsOK() *PutSubmissionsOK { + return &PutSubmissionsOK{} +} + +/*PutSubmissionsOK handles this case with default header values. + +Taxnexus Response with Submission objects +*/ +type PutSubmissionsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *regs_models.SubmissionResponse +} + +func (o *PutSubmissionsOK) Error() string { + return fmt.Sprintf("[PUT /submissions][%d] putSubmissionsOK %+v", 200, o.Payload) +} + +func (o *PutSubmissionsOK) GetPayload() *regs_models.SubmissionResponse { + return o.Payload +} + +func (o *PutSubmissionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(regs_models.SubmissionResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutSubmissionsUnauthorized creates a PutSubmissionsUnauthorized with default headers values +func NewPutSubmissionsUnauthorized() *PutSubmissionsUnauthorized { + return &PutSubmissionsUnauthorized{} +} + +/*PutSubmissionsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PutSubmissionsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutSubmissionsUnauthorized) Error() string { + return fmt.Sprintf("[PUT /submissions][%d] putSubmissionsUnauthorized %+v", 401, o.Payload) +} + +func (o *PutSubmissionsUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutSubmissionsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutSubmissionsForbidden creates a PutSubmissionsForbidden with default headers values +func NewPutSubmissionsForbidden() *PutSubmissionsForbidden { + return &PutSubmissionsForbidden{} +} + +/*PutSubmissionsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PutSubmissionsForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutSubmissionsForbidden) Error() string { + return fmt.Sprintf("[PUT /submissions][%d] putSubmissionsForbidden %+v", 403, o.Payload) +} + +func (o *PutSubmissionsForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutSubmissionsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutSubmissionsNotFound creates a PutSubmissionsNotFound with default headers values +func NewPutSubmissionsNotFound() *PutSubmissionsNotFound { + return &PutSubmissionsNotFound{} +} + +/*PutSubmissionsNotFound handles this case with default header values. + +Resource was not found +*/ +type PutSubmissionsNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutSubmissionsNotFound) Error() string { + return fmt.Sprintf("[PUT /submissions][%d] putSubmissionsNotFound %+v", 404, o.Payload) +} + +func (o *PutSubmissionsNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutSubmissionsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutSubmissionsUnprocessableEntity creates a PutSubmissionsUnprocessableEntity with default headers values +func NewPutSubmissionsUnprocessableEntity() *PutSubmissionsUnprocessableEntity { + return &PutSubmissionsUnprocessableEntity{} +} + +/*PutSubmissionsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PutSubmissionsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutSubmissionsUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /submissions][%d] putSubmissionsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutSubmissionsUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutSubmissionsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutSubmissionsInternalServerError creates a PutSubmissionsInternalServerError with default headers values +func NewPutSubmissionsInternalServerError() *PutSubmissionsInternalServerError { + return &PutSubmissionsInternalServerError{} +} + +/*PutSubmissionsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PutSubmissionsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutSubmissionsInternalServerError) Error() string { + return fmt.Sprintf("[PUT /submissions][%d] putSubmissionsInternalServerError %+v", 500, o.Payload) +} + +func (o *PutSubmissionsInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutSubmissionsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/submission/submission_client.go b/api/devops/regs_client/submission/submission_client.go new file mode 100644 index 0000000..b5c9a26 --- /dev/null +++ b/api/devops/regs_client/submission/submission_client.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package submission + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new submission API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for submission API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetSubmissions(params *GetSubmissionsParams, authInfo runtime.ClientAuthInfoWriter) (*GetSubmissionsOK, error) + + PostSubmissions(params *PostSubmissionsParams, authInfo runtime.ClientAuthInfoWriter) (*PostSubmissionsOK, error) + + PutSubmissions(params *PutSubmissionsParams, authInfo runtime.ClientAuthInfoWriter) (*PutSubmissionsOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetSubmissions gets a list of submissions + + Return a list of available Submissions +*/ +func (a *Client) GetSubmissions(params *GetSubmissionsParams, authInfo runtime.ClientAuthInfoWriter) (*GetSubmissionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetSubmissionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getSubmissions", + Method: "GET", + PathPattern: "/submissions", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetSubmissionsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetSubmissionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getSubmissions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostSubmissions adds new submissions + + Create new Sumissions +*/ +func (a *Client) PostSubmissions(params *PostSubmissionsParams, authInfo runtime.ClientAuthInfoWriter) (*PostSubmissionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostSubmissionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postSubmissions", + Method: "POST", + PathPattern: "/submissions", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostSubmissionsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostSubmissionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postSubmissions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PutSubmissions updates a submission + + Update all the fields in a Submission record identified by Taxnexus Id +*/ +func (a *Client) PutSubmissions(params *PutSubmissionsParams, authInfo runtime.ClientAuthInfoWriter) (*PutSubmissionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPutSubmissionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "putSubmissions", + Method: "PUT", + PathPattern: "/submissions", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PutSubmissionsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PutSubmissionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for putSubmissions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/devops/regs_client/tax_type_account/delete_type_accounts_parameters.go b/api/devops/regs_client/tax_type_account/delete_type_accounts_parameters.go new file mode 100644 index 0000000..2fdbf91 --- /dev/null +++ b/api/devops/regs_client/tax_type_account/delete_type_accounts_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tax_type_account + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewDeleteTypeAccountsParams creates a new DeleteTypeAccountsParams object +// with the default values initialized. +func NewDeleteTypeAccountsParams() *DeleteTypeAccountsParams { + var () + return &DeleteTypeAccountsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewDeleteTypeAccountsParamsWithTimeout creates a new DeleteTypeAccountsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewDeleteTypeAccountsParamsWithTimeout(timeout time.Duration) *DeleteTypeAccountsParams { + var () + return &DeleteTypeAccountsParams{ + + timeout: timeout, + } +} + +// NewDeleteTypeAccountsParamsWithContext creates a new DeleteTypeAccountsParams object +// with the default values initialized, and the ability to set a context for a request +func NewDeleteTypeAccountsParamsWithContext(ctx context.Context) *DeleteTypeAccountsParams { + var () + return &DeleteTypeAccountsParams{ + + Context: ctx, + } +} + +// NewDeleteTypeAccountsParamsWithHTTPClient creates a new DeleteTypeAccountsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewDeleteTypeAccountsParamsWithHTTPClient(client *http.Client) *DeleteTypeAccountsParams { + var () + return &DeleteTypeAccountsParams{ + HTTPClient: client, + } +} + +/*DeleteTypeAccountsParams contains all the parameters to send to the API endpoint +for the delete type accounts operation typically these are written to a http.Request +*/ +type DeleteTypeAccountsParams struct { + + /*ID + Taxnexus Id of the Record to be retrieved + + */ + ID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the delete type accounts params +func (o *DeleteTypeAccountsParams) WithTimeout(timeout time.Duration) *DeleteTypeAccountsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the delete type accounts params +func (o *DeleteTypeAccountsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the delete type accounts params +func (o *DeleteTypeAccountsParams) WithContext(ctx context.Context) *DeleteTypeAccountsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the delete type accounts params +func (o *DeleteTypeAccountsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the delete type accounts params +func (o *DeleteTypeAccountsParams) WithHTTPClient(client *http.Client) *DeleteTypeAccountsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the delete type accounts params +func (o *DeleteTypeAccountsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the delete type accounts params +func (o *DeleteTypeAccountsParams) WithID(id *string) *DeleteTypeAccountsParams { + o.SetID(id) + return o +} + +// SetID adds the id to the delete type accounts params +func (o *DeleteTypeAccountsParams) SetID(id *string) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DeleteTypeAccountsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ID != nil { + + // query param id + var qrID string + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/tax_type_account/delete_type_accounts_responses.go b/api/devops/regs_client/tax_type_account/delete_type_accounts_responses.go new file mode 100644 index 0000000..39f987f --- /dev/null +++ b/api/devops/regs_client/tax_type_account/delete_type_accounts_responses.go @@ -0,0 +1,298 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tax_type_account + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// DeleteTypeAccountsReader is a Reader for the DeleteTypeAccounts structure. +type DeleteTypeAccountsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DeleteTypeAccountsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDeleteTypeAccountsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewDeleteTypeAccountsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewDeleteTypeAccountsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewDeleteTypeAccountsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewDeleteTypeAccountsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewDeleteTypeAccountsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewDeleteTypeAccountsOK creates a DeleteTypeAccountsOK with default headers values +func NewDeleteTypeAccountsOK() *DeleteTypeAccountsOK { + return &DeleteTypeAccountsOK{} +} + +/*DeleteTypeAccountsOK handles this case with default header values. + +Taxnexus Response with Message Objects with Delete Status +*/ +type DeleteTypeAccountsOK struct { + AccessControlAllowOrigin string + + Payload *regs_models.DeleteResponse +} + +func (o *DeleteTypeAccountsOK) Error() string { + return fmt.Sprintf("[DELETE /taxtypeaccounts][%d] deleteTypeAccountsOK %+v", 200, o.Payload) +} + +func (o *DeleteTypeAccountsOK) GetPayload() *regs_models.DeleteResponse { + return o.Payload +} + +func (o *DeleteTypeAccountsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.DeleteResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteTypeAccountsUnauthorized creates a DeleteTypeAccountsUnauthorized with default headers values +func NewDeleteTypeAccountsUnauthorized() *DeleteTypeAccountsUnauthorized { + return &DeleteTypeAccountsUnauthorized{} +} + +/*DeleteTypeAccountsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type DeleteTypeAccountsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *DeleteTypeAccountsUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /taxtypeaccounts][%d] deleteTypeAccountsUnauthorized %+v", 401, o.Payload) +} + +func (o *DeleteTypeAccountsUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *DeleteTypeAccountsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteTypeAccountsForbidden creates a DeleteTypeAccountsForbidden with default headers values +func NewDeleteTypeAccountsForbidden() *DeleteTypeAccountsForbidden { + return &DeleteTypeAccountsForbidden{} +} + +/*DeleteTypeAccountsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type DeleteTypeAccountsForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *DeleteTypeAccountsForbidden) Error() string { + return fmt.Sprintf("[DELETE /taxtypeaccounts][%d] deleteTypeAccountsForbidden %+v", 403, o.Payload) +} + +func (o *DeleteTypeAccountsForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *DeleteTypeAccountsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteTypeAccountsNotFound creates a DeleteTypeAccountsNotFound with default headers values +func NewDeleteTypeAccountsNotFound() *DeleteTypeAccountsNotFound { + return &DeleteTypeAccountsNotFound{} +} + +/*DeleteTypeAccountsNotFound handles this case with default header values. + +Resource was not found +*/ +type DeleteTypeAccountsNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *DeleteTypeAccountsNotFound) Error() string { + return fmt.Sprintf("[DELETE /taxtypeaccounts][%d] deleteTypeAccountsNotFound %+v", 404, o.Payload) +} + +func (o *DeleteTypeAccountsNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *DeleteTypeAccountsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteTypeAccountsUnprocessableEntity creates a DeleteTypeAccountsUnprocessableEntity with default headers values +func NewDeleteTypeAccountsUnprocessableEntity() *DeleteTypeAccountsUnprocessableEntity { + return &DeleteTypeAccountsUnprocessableEntity{} +} + +/*DeleteTypeAccountsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type DeleteTypeAccountsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *DeleteTypeAccountsUnprocessableEntity) Error() string { + return fmt.Sprintf("[DELETE /taxtypeaccounts][%d] deleteTypeAccountsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *DeleteTypeAccountsUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *DeleteTypeAccountsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteTypeAccountsInternalServerError creates a DeleteTypeAccountsInternalServerError with default headers values +func NewDeleteTypeAccountsInternalServerError() *DeleteTypeAccountsInternalServerError { + return &DeleteTypeAccountsInternalServerError{} +} + +/*DeleteTypeAccountsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type DeleteTypeAccountsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *DeleteTypeAccountsInternalServerError) Error() string { + return fmt.Sprintf("[DELETE /taxtypeaccounts][%d] deleteTypeAccountsInternalServerError %+v", 500, o.Payload) +} + +func (o *DeleteTypeAccountsInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *DeleteTypeAccountsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/tax_type_account/get_tax_type_accounts_parameters.go b/api/devops/regs_client/tax_type_account/get_tax_type_accounts_parameters.go new file mode 100644 index 0000000..452358d --- /dev/null +++ b/api/devops/regs_client/tax_type_account/get_tax_type_accounts_parameters.go @@ -0,0 +1,279 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tax_type_account + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetTaxTypeAccountsParams creates a new GetTaxTypeAccountsParams object +// with the default values initialized. +func NewGetTaxTypeAccountsParams() *GetTaxTypeAccountsParams { + var () + return &GetTaxTypeAccountsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetTaxTypeAccountsParamsWithTimeout creates a new GetTaxTypeAccountsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetTaxTypeAccountsParamsWithTimeout(timeout time.Duration) *GetTaxTypeAccountsParams { + var () + return &GetTaxTypeAccountsParams{ + + timeout: timeout, + } +} + +// NewGetTaxTypeAccountsParamsWithContext creates a new GetTaxTypeAccountsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetTaxTypeAccountsParamsWithContext(ctx context.Context) *GetTaxTypeAccountsParams { + var () + return &GetTaxTypeAccountsParams{ + + Context: ctx, + } +} + +// NewGetTaxTypeAccountsParamsWithHTTPClient creates a new GetTaxTypeAccountsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetTaxTypeAccountsParamsWithHTTPClient(client *http.Client) *GetTaxTypeAccountsParams { + var () + return &GetTaxTypeAccountsParams{ + HTTPClient: client, + } +} + +/*GetTaxTypeAccountsParams contains all the parameters to send to the API endpoint +for the get tax type accounts operation typically these are written to a http.Request +*/ +type GetTaxTypeAccountsParams struct { + + /*AccountID + Taxnexus Record Id of an Account + + */ + AccountID *string + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + /*TaxTypeAccountID + Taxnexus Record Id of the Tax Type Account + + */ + TaxTypeAccountID *string + /*TaxTypeID + Taxnexus Record Id of the Tax Type + + */ + TaxTypeID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get tax type accounts params +func (o *GetTaxTypeAccountsParams) WithTimeout(timeout time.Duration) *GetTaxTypeAccountsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get tax type accounts params +func (o *GetTaxTypeAccountsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get tax type accounts params +func (o *GetTaxTypeAccountsParams) WithContext(ctx context.Context) *GetTaxTypeAccountsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get tax type accounts params +func (o *GetTaxTypeAccountsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get tax type accounts params +func (o *GetTaxTypeAccountsParams) WithHTTPClient(client *http.Client) *GetTaxTypeAccountsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get tax type accounts params +func (o *GetTaxTypeAccountsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAccountID adds the accountID to the get tax type accounts params +func (o *GetTaxTypeAccountsParams) WithAccountID(accountID *string) *GetTaxTypeAccountsParams { + o.SetAccountID(accountID) + return o +} + +// SetAccountID adds the accountId to the get tax type accounts params +func (o *GetTaxTypeAccountsParams) SetAccountID(accountID *string) { + o.AccountID = accountID +} + +// WithLimit adds the limit to the get tax type accounts params +func (o *GetTaxTypeAccountsParams) WithLimit(limit *int64) *GetTaxTypeAccountsParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get tax type accounts params +func (o *GetTaxTypeAccountsParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get tax type accounts params +func (o *GetTaxTypeAccountsParams) WithOffset(offset *int64) *GetTaxTypeAccountsParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get tax type accounts params +func (o *GetTaxTypeAccountsParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithTaxTypeAccountID adds the taxTypeAccountID to the get tax type accounts params +func (o *GetTaxTypeAccountsParams) WithTaxTypeAccountID(taxTypeAccountID *string) *GetTaxTypeAccountsParams { + o.SetTaxTypeAccountID(taxTypeAccountID) + return o +} + +// SetTaxTypeAccountID adds the taxTypeAccountId to the get tax type accounts params +func (o *GetTaxTypeAccountsParams) SetTaxTypeAccountID(taxTypeAccountID *string) { + o.TaxTypeAccountID = taxTypeAccountID +} + +// WithTaxTypeID adds the taxTypeID to the get tax type accounts params +func (o *GetTaxTypeAccountsParams) WithTaxTypeID(taxTypeID *string) *GetTaxTypeAccountsParams { + o.SetTaxTypeID(taxTypeID) + return o +} + +// SetTaxTypeID adds the taxTypeId to the get tax type accounts params +func (o *GetTaxTypeAccountsParams) SetTaxTypeID(taxTypeID *string) { + o.TaxTypeID = taxTypeID +} + +// WriteToRequest writes these params to a swagger request +func (o *GetTaxTypeAccountsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AccountID != nil { + + // query param accountId + var qrAccountID string + if o.AccountID != nil { + qrAccountID = *o.AccountID + } + qAccountID := qrAccountID + if qAccountID != "" { + if err := r.SetQueryParam("accountId", qAccountID); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.TaxTypeAccountID != nil { + + // query param taxTypeAccountId + var qrTaxTypeAccountID string + if o.TaxTypeAccountID != nil { + qrTaxTypeAccountID = *o.TaxTypeAccountID + } + qTaxTypeAccountID := qrTaxTypeAccountID + if qTaxTypeAccountID != "" { + if err := r.SetQueryParam("taxTypeAccountId", qTaxTypeAccountID); err != nil { + return err + } + } + + } + + if o.TaxTypeID != nil { + + // query param taxTypeId + var qrTaxTypeID string + if o.TaxTypeID != nil { + qrTaxTypeID = *o.TaxTypeID + } + qTaxTypeID := qrTaxTypeID + if qTaxTypeID != "" { + if err := r.SetQueryParam("taxTypeId", qTaxTypeID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/tax_type_account/get_tax_type_accounts_responses.go b/api/devops/regs_client/tax_type_account/get_tax_type_accounts_responses.go new file mode 100644 index 0000000..44a37b5 --- /dev/null +++ b/api/devops/regs_client/tax_type_account/get_tax_type_accounts_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tax_type_account + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// GetTaxTypeAccountsReader is a Reader for the GetTaxTypeAccounts structure. +type GetTaxTypeAccountsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetTaxTypeAccountsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetTaxTypeAccountsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetTaxTypeAccountsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetTaxTypeAccountsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetTaxTypeAccountsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetTaxTypeAccountsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetTaxTypeAccountsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetTaxTypeAccountsOK creates a GetTaxTypeAccountsOK with default headers values +func NewGetTaxTypeAccountsOK() *GetTaxTypeAccountsOK { + return &GetTaxTypeAccountsOK{} +} + +/*GetTaxTypeAccountsOK handles this case with default header values. + +Taxnexus Response with Tax Type Account objects +*/ +type GetTaxTypeAccountsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *regs_models.TaxTypeAccountResponse +} + +func (o *GetTaxTypeAccountsOK) Error() string { + return fmt.Sprintf("[GET /taxtypeaccounts][%d] getTaxTypeAccountsOK %+v", 200, o.Payload) +} + +func (o *GetTaxTypeAccountsOK) GetPayload() *regs_models.TaxTypeAccountResponse { + return o.Payload +} + +func (o *GetTaxTypeAccountsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(regs_models.TaxTypeAccountResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxTypeAccountsUnauthorized creates a GetTaxTypeAccountsUnauthorized with default headers values +func NewGetTaxTypeAccountsUnauthorized() *GetTaxTypeAccountsUnauthorized { + return &GetTaxTypeAccountsUnauthorized{} +} + +/*GetTaxTypeAccountsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetTaxTypeAccountsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetTaxTypeAccountsUnauthorized) Error() string { + return fmt.Sprintf("[GET /taxtypeaccounts][%d] getTaxTypeAccountsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetTaxTypeAccountsUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetTaxTypeAccountsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxTypeAccountsForbidden creates a GetTaxTypeAccountsForbidden with default headers values +func NewGetTaxTypeAccountsForbidden() *GetTaxTypeAccountsForbidden { + return &GetTaxTypeAccountsForbidden{} +} + +/*GetTaxTypeAccountsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetTaxTypeAccountsForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetTaxTypeAccountsForbidden) Error() string { + return fmt.Sprintf("[GET /taxtypeaccounts][%d] getTaxTypeAccountsForbidden %+v", 403, o.Payload) +} + +func (o *GetTaxTypeAccountsForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetTaxTypeAccountsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxTypeAccountsNotFound creates a GetTaxTypeAccountsNotFound with default headers values +func NewGetTaxTypeAccountsNotFound() *GetTaxTypeAccountsNotFound { + return &GetTaxTypeAccountsNotFound{} +} + +/*GetTaxTypeAccountsNotFound handles this case with default header values. + +Resource was not found +*/ +type GetTaxTypeAccountsNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetTaxTypeAccountsNotFound) Error() string { + return fmt.Sprintf("[GET /taxtypeaccounts][%d] getTaxTypeAccountsNotFound %+v", 404, o.Payload) +} + +func (o *GetTaxTypeAccountsNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetTaxTypeAccountsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxTypeAccountsUnprocessableEntity creates a GetTaxTypeAccountsUnprocessableEntity with default headers values +func NewGetTaxTypeAccountsUnprocessableEntity() *GetTaxTypeAccountsUnprocessableEntity { + return &GetTaxTypeAccountsUnprocessableEntity{} +} + +/*GetTaxTypeAccountsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetTaxTypeAccountsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetTaxTypeAccountsUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /taxtypeaccounts][%d] getTaxTypeAccountsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetTaxTypeAccountsUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetTaxTypeAccountsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxTypeAccountsInternalServerError creates a GetTaxTypeAccountsInternalServerError with default headers values +func NewGetTaxTypeAccountsInternalServerError() *GetTaxTypeAccountsInternalServerError { + return &GetTaxTypeAccountsInternalServerError{} +} + +/*GetTaxTypeAccountsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetTaxTypeAccountsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetTaxTypeAccountsInternalServerError) Error() string { + return fmt.Sprintf("[GET /taxtypeaccounts][%d] getTaxTypeAccountsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetTaxTypeAccountsInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetTaxTypeAccountsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/tax_type_account/post_tax_type_accounts_parameters.go b/api/devops/regs_client/tax_type_account/post_tax_type_accounts_parameters.go new file mode 100644 index 0000000..bf33c05 --- /dev/null +++ b/api/devops/regs_client/tax_type_account/post_tax_type_accounts_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tax_type_account + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// NewPostTaxTypeAccountsParams creates a new PostTaxTypeAccountsParams object +// with the default values initialized. +func NewPostTaxTypeAccountsParams() *PostTaxTypeAccountsParams { + var () + return &PostTaxTypeAccountsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostTaxTypeAccountsParamsWithTimeout creates a new PostTaxTypeAccountsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostTaxTypeAccountsParamsWithTimeout(timeout time.Duration) *PostTaxTypeAccountsParams { + var () + return &PostTaxTypeAccountsParams{ + + timeout: timeout, + } +} + +// NewPostTaxTypeAccountsParamsWithContext creates a new PostTaxTypeAccountsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostTaxTypeAccountsParamsWithContext(ctx context.Context) *PostTaxTypeAccountsParams { + var () + return &PostTaxTypeAccountsParams{ + + Context: ctx, + } +} + +// NewPostTaxTypeAccountsParamsWithHTTPClient creates a new PostTaxTypeAccountsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostTaxTypeAccountsParamsWithHTTPClient(client *http.Client) *PostTaxTypeAccountsParams { + var () + return &PostTaxTypeAccountsParams{ + HTTPClient: client, + } +} + +/*PostTaxTypeAccountsParams contains all the parameters to send to the API endpoint +for the post tax type accounts operation typically these are written to a http.Request +*/ +type PostTaxTypeAccountsParams struct { + + /*TaxTypeAccountRequest + A request with an array of Tax Type Account Objects + + */ + TaxTypeAccountRequest *regs_models.TaxTypeAccountRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post tax type accounts params +func (o *PostTaxTypeAccountsParams) WithTimeout(timeout time.Duration) *PostTaxTypeAccountsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post tax type accounts params +func (o *PostTaxTypeAccountsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post tax type accounts params +func (o *PostTaxTypeAccountsParams) WithContext(ctx context.Context) *PostTaxTypeAccountsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post tax type accounts params +func (o *PostTaxTypeAccountsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post tax type accounts params +func (o *PostTaxTypeAccountsParams) WithHTTPClient(client *http.Client) *PostTaxTypeAccountsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post tax type accounts params +func (o *PostTaxTypeAccountsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTaxTypeAccountRequest adds the taxTypeAccountRequest to the post tax type accounts params +func (o *PostTaxTypeAccountsParams) WithTaxTypeAccountRequest(taxTypeAccountRequest *regs_models.TaxTypeAccountRequest) *PostTaxTypeAccountsParams { + o.SetTaxTypeAccountRequest(taxTypeAccountRequest) + return o +} + +// SetTaxTypeAccountRequest adds the taxTypeAccountRequest to the post tax type accounts params +func (o *PostTaxTypeAccountsParams) SetTaxTypeAccountRequest(taxTypeAccountRequest *regs_models.TaxTypeAccountRequest) { + o.TaxTypeAccountRequest = taxTypeAccountRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostTaxTypeAccountsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.TaxTypeAccountRequest != nil { + if err := r.SetBodyParam(o.TaxTypeAccountRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/tax_type_account/post_tax_type_accounts_responses.go b/api/devops/regs_client/tax_type_account/post_tax_type_accounts_responses.go new file mode 100644 index 0000000..c0e852c --- /dev/null +++ b/api/devops/regs_client/tax_type_account/post_tax_type_accounts_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tax_type_account + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// PostTaxTypeAccountsReader is a Reader for the PostTaxTypeAccounts structure. +type PostTaxTypeAccountsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostTaxTypeAccountsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostTaxTypeAccountsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostTaxTypeAccountsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostTaxTypeAccountsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostTaxTypeAccountsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostTaxTypeAccountsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostTaxTypeAccountsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostTaxTypeAccountsOK creates a PostTaxTypeAccountsOK with default headers values +func NewPostTaxTypeAccountsOK() *PostTaxTypeAccountsOK { + return &PostTaxTypeAccountsOK{} +} + +/*PostTaxTypeAccountsOK handles this case with default header values. + +Taxnexus Response with Tax Type Account objects +*/ +type PostTaxTypeAccountsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *regs_models.TaxTypeAccountResponse +} + +func (o *PostTaxTypeAccountsOK) Error() string { + return fmt.Sprintf("[POST /taxtypeaccounts][%d] postTaxTypeAccountsOK %+v", 200, o.Payload) +} + +func (o *PostTaxTypeAccountsOK) GetPayload() *regs_models.TaxTypeAccountResponse { + return o.Payload +} + +func (o *PostTaxTypeAccountsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(regs_models.TaxTypeAccountResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxTypeAccountsUnauthorized creates a PostTaxTypeAccountsUnauthorized with default headers values +func NewPostTaxTypeAccountsUnauthorized() *PostTaxTypeAccountsUnauthorized { + return &PostTaxTypeAccountsUnauthorized{} +} + +/*PostTaxTypeAccountsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostTaxTypeAccountsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostTaxTypeAccountsUnauthorized) Error() string { + return fmt.Sprintf("[POST /taxtypeaccounts][%d] postTaxTypeAccountsUnauthorized %+v", 401, o.Payload) +} + +func (o *PostTaxTypeAccountsUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostTaxTypeAccountsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxTypeAccountsForbidden creates a PostTaxTypeAccountsForbidden with default headers values +func NewPostTaxTypeAccountsForbidden() *PostTaxTypeAccountsForbidden { + return &PostTaxTypeAccountsForbidden{} +} + +/*PostTaxTypeAccountsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostTaxTypeAccountsForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostTaxTypeAccountsForbidden) Error() string { + return fmt.Sprintf("[POST /taxtypeaccounts][%d] postTaxTypeAccountsForbidden %+v", 403, o.Payload) +} + +func (o *PostTaxTypeAccountsForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostTaxTypeAccountsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxTypeAccountsNotFound creates a PostTaxTypeAccountsNotFound with default headers values +func NewPostTaxTypeAccountsNotFound() *PostTaxTypeAccountsNotFound { + return &PostTaxTypeAccountsNotFound{} +} + +/*PostTaxTypeAccountsNotFound handles this case with default header values. + +Resource was not found +*/ +type PostTaxTypeAccountsNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostTaxTypeAccountsNotFound) Error() string { + return fmt.Sprintf("[POST /taxtypeaccounts][%d] postTaxTypeAccountsNotFound %+v", 404, o.Payload) +} + +func (o *PostTaxTypeAccountsNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostTaxTypeAccountsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxTypeAccountsUnprocessableEntity creates a PostTaxTypeAccountsUnprocessableEntity with default headers values +func NewPostTaxTypeAccountsUnprocessableEntity() *PostTaxTypeAccountsUnprocessableEntity { + return &PostTaxTypeAccountsUnprocessableEntity{} +} + +/*PostTaxTypeAccountsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostTaxTypeAccountsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostTaxTypeAccountsUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /taxtypeaccounts][%d] postTaxTypeAccountsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostTaxTypeAccountsUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostTaxTypeAccountsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxTypeAccountsInternalServerError creates a PostTaxTypeAccountsInternalServerError with default headers values +func NewPostTaxTypeAccountsInternalServerError() *PostTaxTypeAccountsInternalServerError { + return &PostTaxTypeAccountsInternalServerError{} +} + +/*PostTaxTypeAccountsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostTaxTypeAccountsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostTaxTypeAccountsInternalServerError) Error() string { + return fmt.Sprintf("[POST /taxtypeaccounts][%d] postTaxTypeAccountsInternalServerError %+v", 500, o.Payload) +} + +func (o *PostTaxTypeAccountsInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostTaxTypeAccountsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/tax_type_account/put_tax_type_accounts_parameters.go b/api/devops/regs_client/tax_type_account/put_tax_type_accounts_parameters.go new file mode 100644 index 0000000..5fca9a5 --- /dev/null +++ b/api/devops/regs_client/tax_type_account/put_tax_type_accounts_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tax_type_account + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// NewPutTaxTypeAccountsParams creates a new PutTaxTypeAccountsParams object +// with the default values initialized. +func NewPutTaxTypeAccountsParams() *PutTaxTypeAccountsParams { + var () + return &PutTaxTypeAccountsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPutTaxTypeAccountsParamsWithTimeout creates a new PutTaxTypeAccountsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPutTaxTypeAccountsParamsWithTimeout(timeout time.Duration) *PutTaxTypeAccountsParams { + var () + return &PutTaxTypeAccountsParams{ + + timeout: timeout, + } +} + +// NewPutTaxTypeAccountsParamsWithContext creates a new PutTaxTypeAccountsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPutTaxTypeAccountsParamsWithContext(ctx context.Context) *PutTaxTypeAccountsParams { + var () + return &PutTaxTypeAccountsParams{ + + Context: ctx, + } +} + +// NewPutTaxTypeAccountsParamsWithHTTPClient creates a new PutTaxTypeAccountsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPutTaxTypeAccountsParamsWithHTTPClient(client *http.Client) *PutTaxTypeAccountsParams { + var () + return &PutTaxTypeAccountsParams{ + HTTPClient: client, + } +} + +/*PutTaxTypeAccountsParams contains all the parameters to send to the API endpoint +for the put tax type accounts operation typically these are written to a http.Request +*/ +type PutTaxTypeAccountsParams struct { + + /*TaxTypeAccountRequest + A request with an array of Tax Type Account Objects + + */ + TaxTypeAccountRequest *regs_models.TaxTypeAccountRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the put tax type accounts params +func (o *PutTaxTypeAccountsParams) WithTimeout(timeout time.Duration) *PutTaxTypeAccountsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the put tax type accounts params +func (o *PutTaxTypeAccountsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the put tax type accounts params +func (o *PutTaxTypeAccountsParams) WithContext(ctx context.Context) *PutTaxTypeAccountsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the put tax type accounts params +func (o *PutTaxTypeAccountsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the put tax type accounts params +func (o *PutTaxTypeAccountsParams) WithHTTPClient(client *http.Client) *PutTaxTypeAccountsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the put tax type accounts params +func (o *PutTaxTypeAccountsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTaxTypeAccountRequest adds the taxTypeAccountRequest to the put tax type accounts params +func (o *PutTaxTypeAccountsParams) WithTaxTypeAccountRequest(taxTypeAccountRequest *regs_models.TaxTypeAccountRequest) *PutTaxTypeAccountsParams { + o.SetTaxTypeAccountRequest(taxTypeAccountRequest) + return o +} + +// SetTaxTypeAccountRequest adds the taxTypeAccountRequest to the put tax type accounts params +func (o *PutTaxTypeAccountsParams) SetTaxTypeAccountRequest(taxTypeAccountRequest *regs_models.TaxTypeAccountRequest) { + o.TaxTypeAccountRequest = taxTypeAccountRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PutTaxTypeAccountsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.TaxTypeAccountRequest != nil { + if err := r.SetBodyParam(o.TaxTypeAccountRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/tax_type_account/put_tax_type_accounts_responses.go b/api/devops/regs_client/tax_type_account/put_tax_type_accounts_responses.go new file mode 100644 index 0000000..9d70b8a --- /dev/null +++ b/api/devops/regs_client/tax_type_account/put_tax_type_accounts_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tax_type_account + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// PutTaxTypeAccountsReader is a Reader for the PutTaxTypeAccounts structure. +type PutTaxTypeAccountsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PutTaxTypeAccountsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPutTaxTypeAccountsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPutTaxTypeAccountsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPutTaxTypeAccountsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPutTaxTypeAccountsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPutTaxTypeAccountsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPutTaxTypeAccountsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPutTaxTypeAccountsOK creates a PutTaxTypeAccountsOK with default headers values +func NewPutTaxTypeAccountsOK() *PutTaxTypeAccountsOK { + return &PutTaxTypeAccountsOK{} +} + +/*PutTaxTypeAccountsOK handles this case with default header values. + +Taxnexus Response with Tax Type Account objects +*/ +type PutTaxTypeAccountsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *regs_models.TaxTypeAccountResponse +} + +func (o *PutTaxTypeAccountsOK) Error() string { + return fmt.Sprintf("[PUT /taxtypeaccounts][%d] putTaxTypeAccountsOK %+v", 200, o.Payload) +} + +func (o *PutTaxTypeAccountsOK) GetPayload() *regs_models.TaxTypeAccountResponse { + return o.Payload +} + +func (o *PutTaxTypeAccountsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(regs_models.TaxTypeAccountResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutTaxTypeAccountsUnauthorized creates a PutTaxTypeAccountsUnauthorized with default headers values +func NewPutTaxTypeAccountsUnauthorized() *PutTaxTypeAccountsUnauthorized { + return &PutTaxTypeAccountsUnauthorized{} +} + +/*PutTaxTypeAccountsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PutTaxTypeAccountsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutTaxTypeAccountsUnauthorized) Error() string { + return fmt.Sprintf("[PUT /taxtypeaccounts][%d] putTaxTypeAccountsUnauthorized %+v", 401, o.Payload) +} + +func (o *PutTaxTypeAccountsUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutTaxTypeAccountsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutTaxTypeAccountsForbidden creates a PutTaxTypeAccountsForbidden with default headers values +func NewPutTaxTypeAccountsForbidden() *PutTaxTypeAccountsForbidden { + return &PutTaxTypeAccountsForbidden{} +} + +/*PutTaxTypeAccountsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PutTaxTypeAccountsForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutTaxTypeAccountsForbidden) Error() string { + return fmt.Sprintf("[PUT /taxtypeaccounts][%d] putTaxTypeAccountsForbidden %+v", 403, o.Payload) +} + +func (o *PutTaxTypeAccountsForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutTaxTypeAccountsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutTaxTypeAccountsNotFound creates a PutTaxTypeAccountsNotFound with default headers values +func NewPutTaxTypeAccountsNotFound() *PutTaxTypeAccountsNotFound { + return &PutTaxTypeAccountsNotFound{} +} + +/*PutTaxTypeAccountsNotFound handles this case with default header values. + +Resource was not found +*/ +type PutTaxTypeAccountsNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutTaxTypeAccountsNotFound) Error() string { + return fmt.Sprintf("[PUT /taxtypeaccounts][%d] putTaxTypeAccountsNotFound %+v", 404, o.Payload) +} + +func (o *PutTaxTypeAccountsNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutTaxTypeAccountsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutTaxTypeAccountsUnprocessableEntity creates a PutTaxTypeAccountsUnprocessableEntity with default headers values +func NewPutTaxTypeAccountsUnprocessableEntity() *PutTaxTypeAccountsUnprocessableEntity { + return &PutTaxTypeAccountsUnprocessableEntity{} +} + +/*PutTaxTypeAccountsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PutTaxTypeAccountsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutTaxTypeAccountsUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /taxtypeaccounts][%d] putTaxTypeAccountsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutTaxTypeAccountsUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutTaxTypeAccountsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutTaxTypeAccountsInternalServerError creates a PutTaxTypeAccountsInternalServerError with default headers values +func NewPutTaxTypeAccountsInternalServerError() *PutTaxTypeAccountsInternalServerError { + return &PutTaxTypeAccountsInternalServerError{} +} + +/*PutTaxTypeAccountsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PutTaxTypeAccountsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutTaxTypeAccountsInternalServerError) Error() string { + return fmt.Sprintf("[PUT /taxtypeaccounts][%d] putTaxTypeAccountsInternalServerError %+v", 500, o.Payload) +} + +func (o *PutTaxTypeAccountsInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutTaxTypeAccountsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/tax_type_account/tax_type_account_client.go b/api/devops/regs_client/tax_type_account/tax_type_account_client.go new file mode 100644 index 0000000..77300b8 --- /dev/null +++ b/api/devops/regs_client/tax_type_account/tax_type_account_client.go @@ -0,0 +1,196 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tax_type_account + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new tax type account API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for tax type account API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + DeleteTypeAccounts(params *DeleteTypeAccountsParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteTypeAccountsOK, error) + + GetTaxTypeAccounts(params *GetTaxTypeAccountsParams, authInfo runtime.ClientAuthInfoWriter) (*GetTaxTypeAccountsOK, error) + + PostTaxTypeAccounts(params *PostTaxTypeAccountsParams, authInfo runtime.ClientAuthInfoWriter) (*PostTaxTypeAccountsOK, error) + + PutTaxTypeAccounts(params *PutTaxTypeAccountsParams, authInfo runtime.ClientAuthInfoWriter) (*PutTaxTypeAccountsOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + DeleteTypeAccounts deletes a tax type accounts + + Delete Taxnexus Tax Type Accounts +*/ +func (a *Client) DeleteTypeAccounts(params *DeleteTypeAccountsParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteTypeAccountsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDeleteTypeAccountsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "deleteTypeAccounts", + Method: "DELETE", + PathPattern: "/taxtypeaccounts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &DeleteTypeAccountsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*DeleteTypeAccountsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for deleteTypeAccounts: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetTaxTypeAccounts gets a list of tax type accounts + + Return a list of Tax Type Accounts +*/ +func (a *Client) GetTaxTypeAccounts(params *GetTaxTypeAccountsParams, authInfo runtime.ClientAuthInfoWriter) (*GetTaxTypeAccountsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetTaxTypeAccountsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getTaxTypeAccounts", + Method: "GET", + PathPattern: "/taxtypeaccounts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetTaxTypeAccountsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetTaxTypeAccountsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getTaxTypeAccounts: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostTaxTypeAccounts adds new tax type accounts + + Tax Type Accounts to be added +*/ +func (a *Client) PostTaxTypeAccounts(params *PostTaxTypeAccountsParams, authInfo runtime.ClientAuthInfoWriter) (*PostTaxTypeAccountsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostTaxTypeAccountsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postTaxTypeAccounts", + Method: "POST", + PathPattern: "/taxtypeaccounts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostTaxTypeAccountsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostTaxTypeAccountsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postTaxTypeAccounts: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PutTaxTypeAccounts updates tax type accounts + + Update Tax Type Accounts records +*/ +func (a *Client) PutTaxTypeAccounts(params *PutTaxTypeAccountsParams, authInfo runtime.ClientAuthInfoWriter) (*PutTaxTypeAccountsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPutTaxTypeAccountsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "putTaxTypeAccounts", + Method: "PUT", + PathPattern: "/taxtypeaccounts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PutTaxTypeAccountsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PutTaxTypeAccountsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for putTaxTypeAccounts: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/devops/regs_client/transaction/get_transactions_parameters.go b/api/devops/regs_client/transaction/get_transactions_parameters.go new file mode 100644 index 0000000..4c52880 --- /dev/null +++ b/api/devops/regs_client/transaction/get_transactions_parameters.go @@ -0,0 +1,215 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package transaction + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetTransactionsParams creates a new GetTransactionsParams object +// with the default values initialized. +func NewGetTransactionsParams() *GetTransactionsParams { + var () + return &GetTransactionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetTransactionsParamsWithTimeout creates a new GetTransactionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetTransactionsParamsWithTimeout(timeout time.Duration) *GetTransactionsParams { + var () + return &GetTransactionsParams{ + + timeout: timeout, + } +} + +// NewGetTransactionsParamsWithContext creates a new GetTransactionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetTransactionsParamsWithContext(ctx context.Context) *GetTransactionsParams { + var () + return &GetTransactionsParams{ + + Context: ctx, + } +} + +// NewGetTransactionsParamsWithHTTPClient creates a new GetTransactionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetTransactionsParamsWithHTTPClient(client *http.Client) *GetTransactionsParams { + var () + return &GetTransactionsParams{ + HTTPClient: client, + } +} + +/*GetTransactionsParams contains all the parameters to send to the API endpoint +for the get transactions operation typically these are written to a http.Request +*/ +type GetTransactionsParams struct { + + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + /*TransactionID + Template ID + + */ + TransactionID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get transactions params +func (o *GetTransactionsParams) WithTimeout(timeout time.Duration) *GetTransactionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get transactions params +func (o *GetTransactionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get transactions params +func (o *GetTransactionsParams) WithContext(ctx context.Context) *GetTransactionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get transactions params +func (o *GetTransactionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get transactions params +func (o *GetTransactionsParams) WithHTTPClient(client *http.Client) *GetTransactionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get transactions params +func (o *GetTransactionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithLimit adds the limit to the get transactions params +func (o *GetTransactionsParams) WithLimit(limit *int64) *GetTransactionsParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get transactions params +func (o *GetTransactionsParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get transactions params +func (o *GetTransactionsParams) WithOffset(offset *int64) *GetTransactionsParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get transactions params +func (o *GetTransactionsParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithTransactionID adds the transactionID to the get transactions params +func (o *GetTransactionsParams) WithTransactionID(transactionID *string) *GetTransactionsParams { + o.SetTransactionID(transactionID) + return o +} + +// SetTransactionID adds the transactionId to the get transactions params +func (o *GetTransactionsParams) SetTransactionID(transactionID *string) { + o.TransactionID = transactionID +} + +// WriteToRequest writes these params to a swagger request +func (o *GetTransactionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.TransactionID != nil { + + // query param transactionId + var qrTransactionID string + if o.TransactionID != nil { + qrTransactionID = *o.TransactionID + } + qTransactionID := qrTransactionID + if qTransactionID != "" { + if err := r.SetQueryParam("transactionId", qTransactionID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/transaction/get_transactions_responses.go b/api/devops/regs_client/transaction/get_transactions_responses.go new file mode 100644 index 0000000..9e4b822 --- /dev/null +++ b/api/devops/regs_client/transaction/get_transactions_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package transaction + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// GetTransactionsReader is a Reader for the GetTransactions structure. +type GetTransactionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetTransactionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetTransactionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetTransactionsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetTransactionsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetTransactionsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetTransactionsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetTransactionsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetTransactionsOK creates a GetTransactionsOK with default headers values +func NewGetTransactionsOK() *GetTransactionsOK { + return &GetTransactionsOK{} +} + +/*GetTransactionsOK handles this case with default header values. + +Taxnexus Response with Transaction objects +*/ +type GetTransactionsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *regs_models.TransactionResponse +} + +func (o *GetTransactionsOK) Error() string { + return fmt.Sprintf("[GET /transactions][%d] getTransactionsOK %+v", 200, o.Payload) +} + +func (o *GetTransactionsOK) GetPayload() *regs_models.TransactionResponse { + return o.Payload +} + +func (o *GetTransactionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(regs_models.TransactionResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTransactionsUnauthorized creates a GetTransactionsUnauthorized with default headers values +func NewGetTransactionsUnauthorized() *GetTransactionsUnauthorized { + return &GetTransactionsUnauthorized{} +} + +/*GetTransactionsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetTransactionsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetTransactionsUnauthorized) Error() string { + return fmt.Sprintf("[GET /transactions][%d] getTransactionsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetTransactionsUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetTransactionsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTransactionsForbidden creates a GetTransactionsForbidden with default headers values +func NewGetTransactionsForbidden() *GetTransactionsForbidden { + return &GetTransactionsForbidden{} +} + +/*GetTransactionsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetTransactionsForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetTransactionsForbidden) Error() string { + return fmt.Sprintf("[GET /transactions][%d] getTransactionsForbidden %+v", 403, o.Payload) +} + +func (o *GetTransactionsForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetTransactionsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTransactionsNotFound creates a GetTransactionsNotFound with default headers values +func NewGetTransactionsNotFound() *GetTransactionsNotFound { + return &GetTransactionsNotFound{} +} + +/*GetTransactionsNotFound handles this case with default header values. + +Resource was not found +*/ +type GetTransactionsNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetTransactionsNotFound) Error() string { + return fmt.Sprintf("[GET /transactions][%d] getTransactionsNotFound %+v", 404, o.Payload) +} + +func (o *GetTransactionsNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetTransactionsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTransactionsUnprocessableEntity creates a GetTransactionsUnprocessableEntity with default headers values +func NewGetTransactionsUnprocessableEntity() *GetTransactionsUnprocessableEntity { + return &GetTransactionsUnprocessableEntity{} +} + +/*GetTransactionsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetTransactionsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetTransactionsUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /transactions][%d] getTransactionsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetTransactionsUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetTransactionsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTransactionsInternalServerError creates a GetTransactionsInternalServerError with default headers values +func NewGetTransactionsInternalServerError() *GetTransactionsInternalServerError { + return &GetTransactionsInternalServerError{} +} + +/*GetTransactionsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetTransactionsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *GetTransactionsInternalServerError) Error() string { + return fmt.Sprintf("[GET /transactions][%d] getTransactionsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetTransactionsInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *GetTransactionsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/transaction/post_transactions_parameters.go b/api/devops/regs_client/transaction/post_transactions_parameters.go new file mode 100644 index 0000000..92635fe --- /dev/null +++ b/api/devops/regs_client/transaction/post_transactions_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package transaction + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// NewPostTransactionsParams creates a new PostTransactionsParams object +// with the default values initialized. +func NewPostTransactionsParams() *PostTransactionsParams { + var () + return &PostTransactionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostTransactionsParamsWithTimeout creates a new PostTransactionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostTransactionsParamsWithTimeout(timeout time.Duration) *PostTransactionsParams { + var () + return &PostTransactionsParams{ + + timeout: timeout, + } +} + +// NewPostTransactionsParamsWithContext creates a new PostTransactionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostTransactionsParamsWithContext(ctx context.Context) *PostTransactionsParams { + var () + return &PostTransactionsParams{ + + Context: ctx, + } +} + +// NewPostTransactionsParamsWithHTTPClient creates a new PostTransactionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostTransactionsParamsWithHTTPClient(client *http.Client) *PostTransactionsParams { + var () + return &PostTransactionsParams{ + HTTPClient: client, + } +} + +/*PostTransactionsParams contains all the parameters to send to the API endpoint +for the post transactions operation typically these are written to a http.Request +*/ +type PostTransactionsParams struct { + + /*TransactionRequest + An array of Transaction records + + */ + TransactionRequest *regs_models.TransactionRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post transactions params +func (o *PostTransactionsParams) WithTimeout(timeout time.Duration) *PostTransactionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post transactions params +func (o *PostTransactionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post transactions params +func (o *PostTransactionsParams) WithContext(ctx context.Context) *PostTransactionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post transactions params +func (o *PostTransactionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post transactions params +func (o *PostTransactionsParams) WithHTTPClient(client *http.Client) *PostTransactionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post transactions params +func (o *PostTransactionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTransactionRequest adds the transactionRequest to the post transactions params +func (o *PostTransactionsParams) WithTransactionRequest(transactionRequest *regs_models.TransactionRequest) *PostTransactionsParams { + o.SetTransactionRequest(transactionRequest) + return o +} + +// SetTransactionRequest adds the transactionRequest to the post transactions params +func (o *PostTransactionsParams) SetTransactionRequest(transactionRequest *regs_models.TransactionRequest) { + o.TransactionRequest = transactionRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostTransactionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.TransactionRequest != nil { + if err := r.SetBodyParam(o.TransactionRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/transaction/post_transactions_responses.go b/api/devops/regs_client/transaction/post_transactions_responses.go new file mode 100644 index 0000000..e364886 --- /dev/null +++ b/api/devops/regs_client/transaction/post_transactions_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package transaction + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// PostTransactionsReader is a Reader for the PostTransactions structure. +type PostTransactionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostTransactionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostTransactionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostTransactionsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostTransactionsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostTransactionsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostTransactionsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostTransactionsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostTransactionsOK creates a PostTransactionsOK with default headers values +func NewPostTransactionsOK() *PostTransactionsOK { + return &PostTransactionsOK{} +} + +/*PostTransactionsOK handles this case with default header values. + +Taxnexus Response with Transaction objects +*/ +type PostTransactionsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *regs_models.TransactionResponse +} + +func (o *PostTransactionsOK) Error() string { + return fmt.Sprintf("[POST /transactions][%d] postTransactionsOK %+v", 200, o.Payload) +} + +func (o *PostTransactionsOK) GetPayload() *regs_models.TransactionResponse { + return o.Payload +} + +func (o *PostTransactionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(regs_models.TransactionResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTransactionsUnauthorized creates a PostTransactionsUnauthorized with default headers values +func NewPostTransactionsUnauthorized() *PostTransactionsUnauthorized { + return &PostTransactionsUnauthorized{} +} + +/*PostTransactionsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostTransactionsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostTransactionsUnauthorized) Error() string { + return fmt.Sprintf("[POST /transactions][%d] postTransactionsUnauthorized %+v", 401, o.Payload) +} + +func (o *PostTransactionsUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostTransactionsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTransactionsForbidden creates a PostTransactionsForbidden with default headers values +func NewPostTransactionsForbidden() *PostTransactionsForbidden { + return &PostTransactionsForbidden{} +} + +/*PostTransactionsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostTransactionsForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostTransactionsForbidden) Error() string { + return fmt.Sprintf("[POST /transactions][%d] postTransactionsForbidden %+v", 403, o.Payload) +} + +func (o *PostTransactionsForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostTransactionsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTransactionsNotFound creates a PostTransactionsNotFound with default headers values +func NewPostTransactionsNotFound() *PostTransactionsNotFound { + return &PostTransactionsNotFound{} +} + +/*PostTransactionsNotFound handles this case with default header values. + +Resource was not found +*/ +type PostTransactionsNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostTransactionsNotFound) Error() string { + return fmt.Sprintf("[POST /transactions][%d] postTransactionsNotFound %+v", 404, o.Payload) +} + +func (o *PostTransactionsNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostTransactionsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTransactionsUnprocessableEntity creates a PostTransactionsUnprocessableEntity with default headers values +func NewPostTransactionsUnprocessableEntity() *PostTransactionsUnprocessableEntity { + return &PostTransactionsUnprocessableEntity{} +} + +/*PostTransactionsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostTransactionsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostTransactionsUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /transactions][%d] postTransactionsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostTransactionsUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostTransactionsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTransactionsInternalServerError creates a PostTransactionsInternalServerError with default headers values +func NewPostTransactionsInternalServerError() *PostTransactionsInternalServerError { + return &PostTransactionsInternalServerError{} +} + +/*PostTransactionsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostTransactionsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PostTransactionsInternalServerError) Error() string { + return fmt.Sprintf("[POST /transactions][%d] postTransactionsInternalServerError %+v", 500, o.Payload) +} + +func (o *PostTransactionsInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PostTransactionsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/transaction/put_transactions_parameters.go b/api/devops/regs_client/transaction/put_transactions_parameters.go new file mode 100644 index 0000000..41fd532 --- /dev/null +++ b/api/devops/regs_client/transaction/put_transactions_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package transaction + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// NewPutTransactionsParams creates a new PutTransactionsParams object +// with the default values initialized. +func NewPutTransactionsParams() *PutTransactionsParams { + var () + return &PutTransactionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPutTransactionsParamsWithTimeout creates a new PutTransactionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPutTransactionsParamsWithTimeout(timeout time.Duration) *PutTransactionsParams { + var () + return &PutTransactionsParams{ + + timeout: timeout, + } +} + +// NewPutTransactionsParamsWithContext creates a new PutTransactionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPutTransactionsParamsWithContext(ctx context.Context) *PutTransactionsParams { + var () + return &PutTransactionsParams{ + + Context: ctx, + } +} + +// NewPutTransactionsParamsWithHTTPClient creates a new PutTransactionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPutTransactionsParamsWithHTTPClient(client *http.Client) *PutTransactionsParams { + var () + return &PutTransactionsParams{ + HTTPClient: client, + } +} + +/*PutTransactionsParams contains all the parameters to send to the API endpoint +for the put transactions operation typically these are written to a http.Request +*/ +type PutTransactionsParams struct { + + /*TransactionRequest + An array of Transaction records + + */ + TransactionRequest *regs_models.TransactionRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the put transactions params +func (o *PutTransactionsParams) WithTimeout(timeout time.Duration) *PutTransactionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the put transactions params +func (o *PutTransactionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the put transactions params +func (o *PutTransactionsParams) WithContext(ctx context.Context) *PutTransactionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the put transactions params +func (o *PutTransactionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the put transactions params +func (o *PutTransactionsParams) WithHTTPClient(client *http.Client) *PutTransactionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the put transactions params +func (o *PutTransactionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTransactionRequest adds the transactionRequest to the put transactions params +func (o *PutTransactionsParams) WithTransactionRequest(transactionRequest *regs_models.TransactionRequest) *PutTransactionsParams { + o.SetTransactionRequest(transactionRequest) + return o +} + +// SetTransactionRequest adds the transactionRequest to the put transactions params +func (o *PutTransactionsParams) SetTransactionRequest(transactionRequest *regs_models.TransactionRequest) { + o.TransactionRequest = transactionRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PutTransactionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.TransactionRequest != nil { + if err := r.SetBodyParam(o.TransactionRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/regs_client/transaction/put_transactions_responses.go b/api/devops/regs_client/transaction/put_transactions_responses.go new file mode 100644 index 0000000..2bd924d --- /dev/null +++ b/api/devops/regs_client/transaction/put_transactions_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package transaction + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/regs/regs_models" +) + +// PutTransactionsReader is a Reader for the PutTransactions structure. +type PutTransactionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PutTransactionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPutTransactionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPutTransactionsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPutTransactionsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPutTransactionsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPutTransactionsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPutTransactionsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPutTransactionsOK creates a PutTransactionsOK with default headers values +func NewPutTransactionsOK() *PutTransactionsOK { + return &PutTransactionsOK{} +} + +/*PutTransactionsOK handles this case with default header values. + +Taxnexus Response with Transaction objects +*/ +type PutTransactionsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *regs_models.TransactionResponse +} + +func (o *PutTransactionsOK) Error() string { + return fmt.Sprintf("[PUT /transactions][%d] putTransactionsOK %+v", 200, o.Payload) +} + +func (o *PutTransactionsOK) GetPayload() *regs_models.TransactionResponse { + return o.Payload +} + +func (o *PutTransactionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(regs_models.TransactionResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutTransactionsUnauthorized creates a PutTransactionsUnauthorized with default headers values +func NewPutTransactionsUnauthorized() *PutTransactionsUnauthorized { + return &PutTransactionsUnauthorized{} +} + +/*PutTransactionsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PutTransactionsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutTransactionsUnauthorized) Error() string { + return fmt.Sprintf("[PUT /transactions][%d] putTransactionsUnauthorized %+v", 401, o.Payload) +} + +func (o *PutTransactionsUnauthorized) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutTransactionsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutTransactionsForbidden creates a PutTransactionsForbidden with default headers values +func NewPutTransactionsForbidden() *PutTransactionsForbidden { + return &PutTransactionsForbidden{} +} + +/*PutTransactionsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PutTransactionsForbidden struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutTransactionsForbidden) Error() string { + return fmt.Sprintf("[PUT /transactions][%d] putTransactionsForbidden %+v", 403, o.Payload) +} + +func (o *PutTransactionsForbidden) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutTransactionsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutTransactionsNotFound creates a PutTransactionsNotFound with default headers values +func NewPutTransactionsNotFound() *PutTransactionsNotFound { + return &PutTransactionsNotFound{} +} + +/*PutTransactionsNotFound handles this case with default header values. + +Resource was not found +*/ +type PutTransactionsNotFound struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutTransactionsNotFound) Error() string { + return fmt.Sprintf("[PUT /transactions][%d] putTransactionsNotFound %+v", 404, o.Payload) +} + +func (o *PutTransactionsNotFound) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutTransactionsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutTransactionsUnprocessableEntity creates a PutTransactionsUnprocessableEntity with default headers values +func NewPutTransactionsUnprocessableEntity() *PutTransactionsUnprocessableEntity { + return &PutTransactionsUnprocessableEntity{} +} + +/*PutTransactionsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PutTransactionsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutTransactionsUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /transactions][%d] putTransactionsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutTransactionsUnprocessableEntity) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutTransactionsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutTransactionsInternalServerError creates a PutTransactionsInternalServerError with default headers values +func NewPutTransactionsInternalServerError() *PutTransactionsInternalServerError { + return &PutTransactionsInternalServerError{} +} + +/*PutTransactionsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PutTransactionsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *regs_models.Error +} + +func (o *PutTransactionsInternalServerError) Error() string { + return fmt.Sprintf("[PUT /transactions][%d] putTransactionsInternalServerError %+v", 500, o.Payload) +} + +func (o *PutTransactionsInternalServerError) GetPayload() *regs_models.Error { + return o.Payload +} + +func (o *PutTransactionsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(regs_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/regs_client/transaction/transaction_client.go b/api/devops/regs_client/transaction/transaction_client.go new file mode 100644 index 0000000..9d675ae --- /dev/null +++ b/api/devops/regs_client/transaction/transaction_client.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package transaction + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new transaction API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for transaction API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetTransactions(params *GetTransactionsParams, authInfo runtime.ClientAuthInfoWriter) (*GetTransactionsOK, error) + + PostTransactions(params *PostTransactionsParams, authInfo runtime.ClientAuthInfoWriter) (*PostTransactionsOK, error) + + PutTransactions(params *PutTransactionsParams, authInfo runtime.ClientAuthInfoWriter) (*PutTransactionsOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetTransactions gets a list of transactions + + Return a list of Transaction records from the datastore +*/ +func (a *Client) GetTransactions(params *GetTransactionsParams, authInfo runtime.ClientAuthInfoWriter) (*GetTransactionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetTransactionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getTransactions", + Method: "GET", + PathPattern: "/transactions", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetTransactionsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetTransactionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getTransactions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostTransactions creates new transactiona + + Create Transactions in Taxnexus +*/ +func (a *Client) PostTransactions(params *PostTransactionsParams, authInfo runtime.ClientAuthInfoWriter) (*PostTransactionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostTransactionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postTransactions", + Method: "POST", + PathPattern: "/transactions", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostTransactionsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostTransactionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postTransactions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PutTransactions updates transactions + + Update Transactions in Taxnexus +*/ +func (a *Client) PutTransactions(params *PutTransactionsParams, authInfo runtime.ClientAuthInfoWriter) (*PutTransactionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPutTransactionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "putTransactions", + Method: "PUT", + PathPattern: "/transactions", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PutTransactionsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PutTransactionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for putTransactions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/devops/regs_models/authority.go b/api/devops/regs_models/authority.go new file mode 100644 index 0000000..4a40ab3 --- /dev/null +++ b/api/devops/regs_models/authority.go @@ -0,0 +1,134 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Authority authority +// +// swagger:model Authority +type Authority struct { + + // Account + AccountID string `json:"AccountID,omitempty"` + + // Address Line 1 + AddressLine1 string `json:"AddressLine1,omitempty"` + + // Address Line 2 + AddressLine2 string `json:"AddressLine2,omitempty"` + + // Billing Telephone Number + BTN string `json:"BTN,omitempty"` + + // City + City string `json:"City,omitempty"` + + // Contact Name + ContactID string `json:"ContactID,omitempty"` + + // Country + Country string `json:"Country,omitempty"` + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Authority Date + Date string `json:"Date,omitempty"` + + // Date Approved + DateApproved string `json:"DateApproved,omitempty"` + + // Taxnexus Record Identifier + ID string `json:"ID,omitempty"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Losing Carrier + LosingCarrier string `json:"LosingCarrier,omitempty"` + + // Authority Number + Name string `json:"Name,omitempty"` + + // Name Line 1 + NameLine1 string `json:"NameLine1,omitempty"` + + // Name Line 2 + NameLine2 string `json:"NameLine2,omitempty"` + + // Opportunity Name + OpportunityID string `json:"OpportunityID,omitempty"` + + // Order Number + OrderID string `json:"OrderID,omitempty"` + + // UUID Reference the master record that owns this item + ParentFK string `json:"ParentFK,omitempty"` + + // Zip Code + PostalCode string `json:"PostalCode,omitempty"` + + // Quote Name + QuoteID string `json:"QuoteID,omitempty"` + + // Source System identifier for this record, if any + Ref string `json:"Ref,omitempty"` + + // State + State string `json:"State,omitempty"` + + // Status + Status string `json:"Status,omitempty"` + + // ID of the Template for this object instance + TemplateID string `json:"TemplateID,omitempty"` + + // Tenant that owns this object instance + TenantID string `json:"TenantID,omitempty"` + + // Transfer Date + TransferDate string `json:"TransferDate,omitempty"` + + // Authority Type + Type string `json:"Type,omitempty"` +} + +// Validate validates this authority +func (m *Authority) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Authority) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Authority) UnmarshalBinary(b []byte) error { + var res Authority + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/authority_request.go b/api/devops/regs_models/authority_request.go new file mode 100644 index 0000000..72cfdcc --- /dev/null +++ b/api/devops/regs_models/authority_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// AuthorityRequest authority request +// +// swagger:model AuthorityRequest +type AuthorityRequest struct { + + // data + Data []*Authority `json:"Data"` +} + +// Validate validates this authority request +func (m *AuthorityRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AuthorityRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *AuthorityRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AuthorityRequest) UnmarshalBinary(b []byte) error { + var res AuthorityRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/authority_response.go b/api/devops/regs_models/authority_response.go new file mode 100644 index 0000000..b2a649e --- /dev/null +++ b/api/devops/regs_models/authority_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// AuthorityResponse An array of Authority objects +// +// swagger:model AuthorityResponse +type AuthorityResponse struct { + + // data + Data []*Authority `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this authority response +func (m *AuthorityResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AuthorityResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *AuthorityResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *AuthorityResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AuthorityResponse) UnmarshalBinary(b []byte) error { + var res AuthorityResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/backend.go b/api/devops/regs_models/backend.go new file mode 100644 index 0000000..33ebcfe --- /dev/null +++ b/api/devops/regs_models/backend.go @@ -0,0 +1,155 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Backend backend +// +// swagger:model Backend +type Backend struct { + + // apikey + APIKey string `json:"APIKey,omitempty"` + + // The Account that owns this Backend + AccountID string `json:"AccountID,omitempty"` + + // Active + Active bool `json:"Active,omitempty"` + + // Used to identify the State were required + ApplicationName string `json:"ApplicationName,omitempty"` + + // Authentication Type + AuthType string `json:"AuthType,omitempty"` + + // Backend Name + BackendName string `json:"BackendName,omitempty"` + + // base_url + BaseURL string `json:"BaseURL,omitempty"` + + // callback_url + CallbackURL string `json:"CallbackURL,omitempty"` + + // client_id + ClientID string `json:"ClientID,omitempty"` + + // client_secret + ClientSecret string `json:"ClientSecret,omitempty"` + + // Company + CompanyID string `json:"CompanyID,omitempty"` + + // Database object creation user + CreatedByID string `json:"CreatedByID,omitempty"` + + // Database object creation date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Description + Description string `json:"Description,omitempty"` + + // Taxnexus Record Id Only; not used in POST + ID string `json:"ID,omitempty"` + + // Database object modification user + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Database object modification date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // login_url + LoginURL string `json:"LoginURL,omitempty"` + + // Management Password + ManagementPassword string `json:"ManagementPassword,omitempty"` + + // Management URL + ManagementURL string `json:"ManagementURL,omitempty"` + + // Management Username + ManagementUsername string `json:"ManagementUsername,omitempty"` + + // MetrcLicense + MetrcLicense string `json:"MetrcLicense,omitempty"` + + // MetrcState + MetrcState string `json:"MetrcState,omitempty"` + + // Ownerid + OwnerID string `json:"OwnerID,omitempty"` + + // password + Password string `json:"Password,omitempty"` + + // project_id + ProjectID string `json:"ProjectID,omitempty"` + + // Provider Credentials + ProviderCredentials string `json:"ProviderCredentials,omitempty"` + + // realm + Realm string `json:"Realm,omitempty"` + + // Source System identifier for this record, if any + Ref string `json:"Ref,omitempty"` + + // Resellerbackendid + ResellerBackendID string `json:"ResellerBackendID,omitempty"` + + // security_token + SecurityToken string `json:"SecurityToken,omitempty"` + + // Tenant that owns this object instance + TenantID string `json:"TenantID,omitempty"` + + // Timeout + Timeout int64 `json:"Timeout,omitempty"` + + // token_uri + TokenURI string `json:"TokenURI,omitempty"` + + // Type + Type string `json:"Type,omitempty"` + + // username + Username string `json:"Username,omitempty"` + + // Backend Vendor Name + Vendor string `json:"Vendor,omitempty"` +} + +// Validate validates this backend +func (m *Backend) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Backend) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Backend) UnmarshalBinary(b []byte) error { + var res Backend + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/backend_request.go b/api/devops/regs_models/backend_request.go new file mode 100644 index 0000000..41e834a --- /dev/null +++ b/api/devops/regs_models/backend_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// BackendRequest backend request +// +// swagger:model BackendRequest +type BackendRequest struct { + + // data + Data []*Backend `json:"Data"` +} + +// Validate validates this backend request +func (m *BackendRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *BackendRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *BackendRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *BackendRequest) UnmarshalBinary(b []byte) error { + var res BackendRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/backend_response.go b/api/devops/regs_models/backend_response.go new file mode 100644 index 0000000..f075d4a --- /dev/null +++ b/api/devops/regs_models/backend_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// BackendResponse An array of Backend Objects +// +// swagger:model BackendResponse +type BackendResponse struct { + + // data + Data []*Backend `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this backend response +func (m *BackendResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *BackendResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *BackendResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *BackendResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *BackendResponse) UnmarshalBinary(b []byte) error { + var res BackendResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/delete_response.go b/api/devops/regs_models/delete_response.go new file mode 100644 index 0000000..93aa6d2 --- /dev/null +++ b/api/devops/regs_models/delete_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// DeleteResponse delete response +// +// swagger:model DeleteResponse +type DeleteResponse struct { + + // data + Data []*Message `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this delete response +func (m *DeleteResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DeleteResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *DeleteResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *DeleteResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DeleteResponse) UnmarshalBinary(b []byte) error { + var res DeleteResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/error.go b/api/devops/regs_models/error.go new file mode 100644 index 0000000..c76205e --- /dev/null +++ b/api/devops/regs_models/error.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Error error +// +// swagger:model Error +type Error struct { + + // code + Code int64 `json:"Code,omitempty"` + + // fields + Fields string `json:"Fields,omitempty"` + + // message + Message string `json:"Message,omitempty"` +} + +// Validate validates this error +func (m *Error) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Error) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Error) UnmarshalBinary(b []byte) error { + var res Error + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/filing.go b/api/devops/regs_models/filing.go new file mode 100644 index 0000000..3c9d534 --- /dev/null +++ b/api/devops/regs_models/filing.go @@ -0,0 +1,170 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Filing filing +// +// swagger:model Filing +type Filing struct { + + // Account Name on Filing + AccountName string `json:"AccountName,omitempty"` + + // The amount of tax to be paid with this filing + Amount float64 `json:"Amount,omitempty"` + + // Billing Contact + ContactID string `json:"ContactID,omitempty"` + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Filing Date + Date string `json:"Date,omitempty"` + + // Due Date + DueDate string `json:"DueDate,omitempty"` + + // Due Date + FilingNumber string `json:"FilingNumber,omitempty"` + + // The ID of the Filing Type for this Filing + FilingTypeID string `json:"FilingTypeID,omitempty"` + + // Due Date + Frequency string `json:"Frequency,omitempty"` + + // Record Id + ID string `json:"ID,omitempty"` + + // Interest + Interest float64 `json:"Interest,omitempty"` + + // Interest + InterestRate float64 `json:"InterestRate,omitempty"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // The number of the Month of the filing + MonthNumber int64 `json:"MonthNumber,omitempty"` + + // Taxneuxs ID of the User who owns this record + OwnerID string `json:"OwnerID,omitempty"` + + // Penalty + Penalty float64 `json:"Penalty,omitempty"` + + // Penalty Days + PenaltyDays float64 `json:"PenaltyDays,omitempty"` + + // Penalty Days + PenaltyRate float64 `json:"PenaltyRate,omitempty"` + + // Period + PeriodID string `json:"PeriodID,omitempty"` + + // Taxnexus ID of the Contact who prepared this filing + PreparerID string `json:"PreparerID,omitempty"` + + // The number of the Month of the filing + QuarterNumber int64 `json:"QuarterNumber,omitempty"` + + // Source System identifier for this record, if any + Ref string `json:"Ref,omitempty"` + + // Reported Adjustments + ReportedAdjustments float64 `json:"ReportedAdjustments,omitempty"` + + // Reported Deductions + ReportedDeductions float64 `json:"ReportedDeductions,omitempty"` + + // Reported Net Revenue + ReportedNetRevenue float64 `json:"ReportedNetRevenue,omitempty"` + + // Reported Rate + ReportedRate float64 `json:"ReportedRate,omitempty"` + + // Reported Revenue + ReportedRevenue float64 `json:"ReportedRevenue,omitempty"` + + // Revenue Base + RevenueBase float64 `json:"RevenueBase,omitempty"` + + // Revenue Net + RevenueNet float64 `json:"RevenueNet,omitempty"` + + // Revenue Not Taxable + RevenueNotTaxable float64 `json:"RevenueNotTaxable,omitempty"` + + // The number of the Month of the filing + SemiannualNumber int64 `json:"SemiannualNumber,omitempty"` + + // Status + Status string `json:"Status,omitempty"` + + // Taxnexus ID of the Submission that owns this Filing + SubmissionID string `json:"SubmissionID,omitempty"` + + // Reported Tax + Subtotal float64 `json:"Subtotal,omitempty"` + + // Tax On Tax + TaxOnTax float64 `json:"TaxOnTax,omitempty"` + + // The TaxType Account for which this Filing is paying remittance + TaxTypeAccountID string `json:"TaxTypeAccountID,omitempty"` + + // Tenant that owns this object instance + TenantID string `json:"TenantID,omitempty"` + + // Total Amount + TotalAmount float64 `json:"TotalAmount,omitempty"` + + // Unit Base + UnitBase float64 `json:"UnitBase,omitempty"` + + // The number of the Month of the filing + YearNumber int64 `json:"YearNumber,omitempty"` +} + +// Validate validates this filing +func (m *Filing) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Filing) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Filing) UnmarshalBinary(b []byte) error { + var res Filing + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/filing_request.go b/api/devops/regs_models/filing_request.go new file mode 100644 index 0000000..738c1b7 --- /dev/null +++ b/api/devops/regs_models/filing_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// FilingRequest filing request +// +// swagger:model FilingRequest +type FilingRequest struct { + + // data + Data []*Filing `json:"Data"` +} + +// Validate validates this filing request +func (m *FilingRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *FilingRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *FilingRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *FilingRequest) UnmarshalBinary(b []byte) error { + var res FilingRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/filing_response.go b/api/devops/regs_models/filing_response.go new file mode 100644 index 0000000..d064d96 --- /dev/null +++ b/api/devops/regs_models/filing_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// FilingResponse An array of Filing Objects +// +// swagger:model FilingResponse +type FilingResponse struct { + + // data + Data []*Filing `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this filing response +func (m *FilingResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *FilingResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *FilingResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *FilingResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *FilingResponse) UnmarshalBinary(b []byte) error { + var res FilingResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/filing_schedule_item.go b/api/devops/regs_models/filing_schedule_item.go new file mode 100644 index 0000000..d806813 --- /dev/null +++ b/api/devops/regs_models/filing_schedule_item.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// FilingScheduleItem Dates when this FilingType is due for filing +// +// swagger:model FilingScheduleItem +type FilingScheduleItem struct { + + // description + Description string `json:"Description,omitempty"` + + // due date + DueDate string `json:"DueDate,omitempty"` +} + +// Validate validates this filing schedule item +func (m *FilingScheduleItem) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *FilingScheduleItem) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *FilingScheduleItem) UnmarshalBinary(b []byte) error { + var res FilingScheduleItem + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/filing_type.go b/api/devops/regs_models/filing_type.go new file mode 100644 index 0000000..05b0ce2 --- /dev/null +++ b/api/devops/regs_models/filing_type.go @@ -0,0 +1,185 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// FilingType An array of FilingType Objects +// +// swagger:model FilingType +type FilingType struct { + + // Tax Authority + AccountID string `json:"AccountID,omitempty"` + + // Contact + ContactID string `json:"ContactID,omitempty"` + + // Created By + CreatedByID string `json:"CreatedById,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // due dates + DueDates []*FilingScheduleItem `json:"DueDates"` + + // Filing City + FilingCity string `json:"FilingCity,omitempty"` + + // Filing Country + FilingCountry string `json:"FilingCountry,omitempty"` + + // Filing Postal Code + FilingPostalCode string `json:"FilingPostalCode,omitempty"` + + // Filing State + FilingState string `json:"FilingState,omitempty"` + + // Filing Street + FilingStreet string `json:"FilingStreet,omitempty"` + + // Form Name + FormName string `json:"FormName,omitempty"` + + // Form Version + FormVersion string `json:"FormVersion,omitempty"` + + // Frequency + Frequency string `json:"Frequency,omitempty"` + + // Filing Full Name + FullName string `json:"FullName,omitempty"` + + // Record Id + ID string `json:"ID,omitempty"` + + // instances + Instances []*FilingTypeInstance `json:"Instances"` + + // Last Modified By + LastModifiedByID string `json:"LastModifiedById,omitempty"` + + // Last Modifed Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Jurisdictional Level + Level string `json:"Level,omitempty"` + + // Name + Name string `json:"Name,omitempty"` + + // Owner + OwnerID string `json:"OwnerID,omitempty"` + + // Saga Type + SagaType string `json:"SagaType,omitempty"` + + // Submission Method + SubmissionMethod string `json:"SubmissionMethod,omitempty"` + + // Instructions Template + TemplateInstructionsID string `json:"TemplateInstructionsID,omitempty"` + + // Return Template + TemplateReturnID string `json:"TemplateReturnID,omitempty"` +} + +// Validate validates this filing type +func (m *FilingType) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDueDates(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInstances(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *FilingType) validateDueDates(formats strfmt.Registry) error { + + if swag.IsZero(m.DueDates) { // not required + return nil + } + + for i := 0; i < len(m.DueDates); i++ { + if swag.IsZero(m.DueDates[i]) { // not required + continue + } + + if m.DueDates[i] != nil { + if err := m.DueDates[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("DueDates" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *FilingType) validateInstances(formats strfmt.Registry) error { + + if swag.IsZero(m.Instances) { // not required + return nil + } + + for i := 0; i < len(m.Instances); i++ { + if swag.IsZero(m.Instances[i]) { // not required + continue + } + + if m.Instances[i] != nil { + if err := m.Instances[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Instances" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *FilingType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *FilingType) UnmarshalBinary(b []byte) error { + var res FilingType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/filing_type_instance.go b/api/devops/regs_models/filing_type_instance.go new file mode 100644 index 0000000..73f451d --- /dev/null +++ b/api/devops/regs_models/filing_type_instance.go @@ -0,0 +1,62 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// FilingTypeInstance A list of jurisdictions that use this Filing Type +// +// swagger:model FilingTypeInstance +type FilingTypeInstance struct { + + // Country Id + CountryID string `json:"CountryID,omitempty"` + + // County ID + CountyID string `json:"CountyID,omitempty"` + + // The ID of the Filing Type for this Filing + FilingTypeID string `json:"FilingTypeID,omitempty"` + + // The type of object that owns this FilingType instance + ObjectType string `json:"ObjectType,omitempty"` + + // Place ID + PlaceID string `json:"PlaceID,omitempty"` + + // StateID + StateID string `json:"StateID,omitempty"` +} + +// Validate validates this filing type instance +func (m *FilingTypeInstance) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *FilingTypeInstance) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *FilingTypeInstance) UnmarshalBinary(b []byte) error { + var res FilingTypeInstance + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/filing_type_request.go b/api/devops/regs_models/filing_type_request.go new file mode 100644 index 0000000..fd55d54 --- /dev/null +++ b/api/devops/regs_models/filing_type_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// FilingTypeRequest filing type request +// +// swagger:model FilingTypeRequest +type FilingTypeRequest struct { + + // data + Data []*FilingType `json:"Data"` +} + +// Validate validates this filing type request +func (m *FilingTypeRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *FilingTypeRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *FilingTypeRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *FilingTypeRequest) UnmarshalBinary(b []byte) error { + var res FilingTypeRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/filing_type_response.go b/api/devops/regs_models/filing_type_response.go new file mode 100644 index 0000000..1454253 --- /dev/null +++ b/api/devops/regs_models/filing_type_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// FilingTypeResponse An array of Filing Objects +// +// swagger:model FilingTypeResponse +type FilingTypeResponse struct { + + // data + Data []*FilingType `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this filing type response +func (m *FilingTypeResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *FilingTypeResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *FilingTypeResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *FilingTypeResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *FilingTypeResponse) UnmarshalBinary(b []byte) error { + var res FilingTypeResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/geo_license_type_instance.go b/api/devops/regs_models/geo_license_type_instance.go new file mode 100644 index 0000000..cd04e37 --- /dev/null +++ b/api/devops/regs_models/geo_license_type_instance.go @@ -0,0 +1,59 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// GeoLicenseTypeInstance Links a license type to a geography +// +// swagger:model GeoLicenseTypeInstance +type GeoLicenseTypeInstance struct { + + // country ID + CountryID string `json:"CountryID,omitempty"` + + // county ID + CountyID string `json:"CountyID,omitempty"` + + // object type + ObjectType string `json:"ObjectType,omitempty"` + + // place ID + PlaceID string `json:"PlaceID,omitempty"` + + // state ID + StateID string `json:"StateID,omitempty"` +} + +// Validate validates this geo license type instance +func (m *GeoLicenseTypeInstance) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *GeoLicenseTypeInstance) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *GeoLicenseTypeInstance) UnmarshalBinary(b []byte) error { + var res GeoLicenseTypeInstance + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/invalid_error.go b/api/devops/regs_models/invalid_error.go new file mode 100644 index 0000000..033d96a --- /dev/null +++ b/api/devops/regs_models/invalid_error.go @@ -0,0 +1,104 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// InvalidError invalid error +// +// swagger:model InvalidError +type InvalidError struct { + Error + + // details + Details []string `json:"details"` +} + +// UnmarshalJSON unmarshals this object from a JSON structure +func (m *InvalidError) UnmarshalJSON(raw []byte) error { + // AO0 + var aO0 Error + if err := swag.ReadJSON(raw, &aO0); err != nil { + return err + } + m.Error = aO0 + + // AO1 + var dataAO1 struct { + Details []string `json:"details"` + } + if err := swag.ReadJSON(raw, &dataAO1); err != nil { + return err + } + + m.Details = dataAO1.Details + + return nil +} + +// MarshalJSON marshals this object to a JSON structure +func (m InvalidError) MarshalJSON() ([]byte, error) { + _parts := make([][]byte, 0, 2) + + aO0, err := swag.WriteJSON(m.Error) + if err != nil { + return nil, err + } + _parts = append(_parts, aO0) + var dataAO1 struct { + Details []string `json:"details"` + } + + dataAO1.Details = m.Details + + jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) + if errAO1 != nil { + return nil, errAO1 + } + _parts = append(_parts, jsonDataAO1) + return swag.ConcatJSON(_parts...), nil +} + +// Validate validates this invalid error +func (m *InvalidError) Validate(formats strfmt.Registry) error { + var res []error + + // validation for a type composition with Error + if err := m.Error.Validate(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// MarshalBinary interface implementation +func (m *InvalidError) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *InvalidError) UnmarshalBinary(b []byte) error { + var res InvalidError + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/license.go b/api/devops/regs_models/license.go new file mode 100644 index 0000000..5bfa00d --- /dev/null +++ b/api/devops/regs_models/license.go @@ -0,0 +1,104 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// License license +// +// swagger:model License +type License struct { + + // Account ID + AccountID string `json:"AccountID,omitempty"` + + // Backend ID for external access + BackendID string `json:"BackendID,omitempty"` + + // Contact ID + ContactID string `json:"ContactID,omitempty"` + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Date + DateIssued string `json:"DateIssued,omitempty"` + + // The designation + Designation string `json:"Designation,omitempty"` + + // Expiration Date + ExpirationDate string `json:"ExpirationDate,omitempty"` + + // Taxnexus Record Id Only; not used in POST + ID string `json:"ID,omitempty"` + + // Is Canceled? + IsCanceled bool `json:"IsCanceled,omitempty"` + + // Is Revoked? + IsRevoked bool `json:"IsRevoked,omitempty"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // License Type ID + LicenseTypeID string `json:"LicenseTypeID,omitempty"` + + // License Number + Name string `json:"Name,omitempty"` + + // Owner of the object instance + OwnerID string `json:"OwnerID,omitempty"` + + // UUID Reference the master record that owns this item + ParentFK string `json:"ParentFK,omitempty"` + + // Source System identifier for this record, if any + Ref string `json:"Ref,omitempty"` + + // Status + Status string `json:"Status,omitempty"` + + // Tenant that owns this object instance + TenantID string `json:"TenantID,omitempty"` +} + +// Validate validates this license +func (m *License) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *License) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *License) UnmarshalBinary(b []byte) error { + var res License + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/license_request.go b/api/devops/regs_models/license_request.go new file mode 100644 index 0000000..befe9cd --- /dev/null +++ b/api/devops/regs_models/license_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// LicenseRequest license request +// +// swagger:model LicenseRequest +type LicenseRequest struct { + + // data + Data []*License `json:"Data"` +} + +// Validate validates this license request +func (m *LicenseRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *LicenseRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *LicenseRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *LicenseRequest) UnmarshalBinary(b []byte) error { + var res LicenseRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/license_response.go b/api/devops/regs_models/license_response.go new file mode 100644 index 0000000..da9fff2 --- /dev/null +++ b/api/devops/regs_models/license_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// LicenseResponse An array of License Objects +// +// swagger:model LicenseResponse +type LicenseResponse struct { + + // data + Data []*License `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this license response +func (m *LicenseResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *LicenseResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *LicenseResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *LicenseResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *LicenseResponse) UnmarshalBinary(b []byte) error { + var res LicenseResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/license_type.go b/api/devops/regs_models/license_type.go new file mode 100644 index 0000000..95a5fa9 --- /dev/null +++ b/api/devops/regs_models/license_type.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// LicenseType license type +// +// swagger:model LicenseType +type LicenseType struct { + + // Account ID + AccountID string `json:"AccountID,omitempty"` + + // Agent ID + AgentID string `json:"AgentID,omitempty"` + + // Contact ID + ContactID string `json:"ContactID,omitempty"` + + // Cost + Cost float64 `json:"Cost,omitempty"` + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Domain + DomainID string `json:"DomainID,omitempty"` + + // domains + Domains []string `json:"Domains"` + + // Frequency + Frequency string `json:"Frequency,omitempty"` + + // Taxnexus Record Id Only; not used in POST + ID string `json:"ID,omitempty"` + + // jurisdictions + Jurisdictions []*GeoLicenseTypeInstance `json:"Jurisdictions"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Level + Level string `json:"Level,omitempty"` + + // License Type Metrc Name + MetrcName string `json:"MetrcName,omitempty"` + + // License Type Name + Name string `json:"Name,omitempty"` + + // License Type Picklist Value + PicklistValue string `json:"PicklistValue,omitempty"` + + // Source System identifier for this record, if any + Ref string `json:"Ref,omitempty"` + + // Restriction + Restriction string `json:"Restriction,omitempty"` + + // Tier + Tier string `json:"Tier,omitempty"` +} + +// Validate validates this license type +func (m *LicenseType) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateJurisdictions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *LicenseType) validateJurisdictions(formats strfmt.Registry) error { + + if swag.IsZero(m.Jurisdictions) { // not required + return nil + } + + for i := 0; i < len(m.Jurisdictions); i++ { + if swag.IsZero(m.Jurisdictions[i]) { // not required + continue + } + + if m.Jurisdictions[i] != nil { + if err := m.Jurisdictions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Jurisdictions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *LicenseType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *LicenseType) UnmarshalBinary(b []byte) error { + var res LicenseType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/license_type_request.go b/api/devops/regs_models/license_type_request.go new file mode 100644 index 0000000..53d9c79 --- /dev/null +++ b/api/devops/regs_models/license_type_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// LicenseTypeRequest An array of License Type Objects +// +// swagger:model LicenseTypeRequest +type LicenseTypeRequest struct { + + // data + Data []*LicenseType `json:"Data"` +} + +// Validate validates this license type request +func (m *LicenseTypeRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *LicenseTypeRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *LicenseTypeRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *LicenseTypeRequest) UnmarshalBinary(b []byte) error { + var res LicenseTypeRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/license_type_response.go b/api/devops/regs_models/license_type_response.go new file mode 100644 index 0000000..716c551 --- /dev/null +++ b/api/devops/regs_models/license_type_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// LicenseTypeResponse An array of License Type Objects +// +// swagger:model LicenseTypeResponse +type LicenseTypeResponse struct { + + // data + Data []*LicenseType `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this license type response +func (m *LicenseTypeResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *LicenseTypeResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *LicenseTypeResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *LicenseTypeResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *LicenseTypeResponse) UnmarshalBinary(b []byte) error { + var res LicenseTypeResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/message.go b/api/devops/regs_models/message.go new file mode 100644 index 0000000..e26bd23 --- /dev/null +++ b/api/devops/regs_models/message.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Message message +// +// swagger:model Message +type Message struct { + + // message + Message string `json:"Message,omitempty"` + + // ref + Ref string `json:"Ref,omitempty"` + + // status + Status int64 `json:"Status,omitempty"` +} + +// Validate validates this message +func (m *Message) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Message) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Message) UnmarshalBinary(b []byte) error { + var res Message + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/notebook.go b/api/devops/regs_models/notebook.go new file mode 100644 index 0000000..55039f0 --- /dev/null +++ b/api/devops/regs_models/notebook.go @@ -0,0 +1,132 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Notebook Defines a Taxnexus Notebook +// +// swagger:model Notebook +type Notebook struct { + + // Account + AccountID string `json:"AccountID,omitempty"` + + // Contact + ContactID string `json:"ContactID,omitempty"` + + // Created By + CreatedByID string `json:"CreatedById,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Analysis Date + Date string `json:"Date,omitempty"` + + // End Date + DateEnd string `json:"DateEnd,omitempty"` + + // Start Date + DateStart string `json:"DateStart,omitempty"` + + // Description + Description string `json:"Description,omitempty"` + + // Record Id + ID string `json:"ID,omitempty"` + + // items + Items []*NotebookItem `json:"Items"` + + // Last Modified By + LastModifiedByID string `json:"LastModifiedById,omitempty"` + + // Last Modifed Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Ending Period + PeriodEndID string `json:"PeriodEndID,omitempty"` + + // Starting Period + PeriodStartID string `json:"PeriodStartID,omitempty"` + + // Preparer + PreparerID string `json:"PreparerID,omitempty"` + + // Tenant that owns this object instance + TenantID string `json:"TenantID,omitempty"` + + // Title + Title string `json:"Title,omitempty"` +} + +// Validate validates this notebook +func (m *Notebook) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Notebook) validateItems(formats strfmt.Registry) error { + + if swag.IsZero(m.Items) { // not required + return nil + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Notebook) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Notebook) UnmarshalBinary(b []byte) error { + var res Notebook + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/notebook_item.go b/api/devops/regs_models/notebook_item.go new file mode 100644 index 0000000..78ab97f --- /dev/null +++ b/api/devops/regs_models/notebook_item.go @@ -0,0 +1,59 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NotebookItem An analysis item associated with a Notebook +// +// swagger:model NotebookItem +type NotebookItem struct { + + // Record Id + ID string `json:"ID,omitempty"` + + // Developer name of component + ItemName string `json:"ItemName,omitempty"` + + // The notebook that owns this Item + NotebookID string `json:"NotebookID,omitempty"` + + // Tenant that owns this object instance + TenantID string `json:"TenantID,omitempty"` + + // Display title + Title string `json:"Title,omitempty"` +} + +// Validate validates this notebook item +func (m *NotebookItem) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *NotebookItem) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *NotebookItem) UnmarshalBinary(b []byte) error { + var res NotebookItem + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/notebook_request.go b/api/devops/regs_models/notebook_request.go new file mode 100644 index 0000000..faa503c --- /dev/null +++ b/api/devops/regs_models/notebook_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NotebookRequest An array of Notebook objects +// +// swagger:model NotebookRequest +type NotebookRequest struct { + + // data + Data []*Notebook `json:"Data"` +} + +// Validate validates this notebook request +func (m *NotebookRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NotebookRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *NotebookRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *NotebookRequest) UnmarshalBinary(b []byte) error { + var res NotebookRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/notebook_response.go b/api/devops/regs_models/notebook_response.go new file mode 100644 index 0000000..f69d55c --- /dev/null +++ b/api/devops/regs_models/notebook_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NotebookResponse An array of Notebook objects +// +// swagger:model NotebookResponse +type NotebookResponse struct { + + // data + Data []*Notebook `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this notebook response +func (m *NotebookResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *NotebookResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *NotebookResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *NotebookResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *NotebookResponse) UnmarshalBinary(b []byte) error { + var res NotebookResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/pagination.go b/api/devops/regs_models/pagination.go new file mode 100644 index 0000000..bf1aab5 --- /dev/null +++ b/api/devops/regs_models/pagination.go @@ -0,0 +1,56 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Pagination pagination +// +// swagger:model Pagination +type Pagination struct { + + // limit + Limit int64 `json:"Limit,omitempty"` + + // p offset + POffset int64 `json:"POffset,omitempty"` + + // page size + PageSize int64 `json:"PageSize,omitempty"` + + // set size + SetSize int64 `json:"SetSize,omitempty"` +} + +// Validate validates this pagination +func (m *Pagination) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Pagination) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Pagination) UnmarshalBinary(b []byte) error { + var res Pagination + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/rating_engine.go b/api/devops/regs_models/rating_engine.go new file mode 100644 index 0000000..2193b0f --- /dev/null +++ b/api/devops/regs_models/rating_engine.go @@ -0,0 +1,108 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// RatingEngine rating engine +// +// swagger:model RatingEngine +type RatingEngine struct { + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Description + Description string `json:"Description,omitempty"` + + // Taxnexus Rating Engine Record Id + ID string `json:"ID,omitempty"` + + // Ingest Method + IngestMethod string `json:"IngestMethod,omitempty"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Rating Engine Name + Name string `json:"Name,omitempty"` + + // rules + Rules []*RatingEngineItem `json:"Rules"` +} + +// Validate validates this rating engine +func (m *RatingEngine) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRules(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RatingEngine) validateRules(formats strfmt.Registry) error { + + if swag.IsZero(m.Rules) { // not required + return nil + } + + for i := 0; i < len(m.Rules); i++ { + if swag.IsZero(m.Rules[i]) { // not required + continue + } + + if m.Rules[i] != nil { + if err := m.Rules[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Rules" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *RatingEngine) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RatingEngine) UnmarshalBinary(b []byte) error { + var res RatingEngine + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/rating_engine_item.go b/api/devops/regs_models/rating_engine_item.go new file mode 100644 index 0000000..750ef02 --- /dev/null +++ b/api/devops/regs_models/rating_engine_item.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// RatingEngineItem rating engine item +// +// swagger:model RatingEngineItem +type RatingEngineItem struct { + + // Created By + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // Last Modified By + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Taxnexus Rating Engine Name + Name string `json:"Name,omitempty"` + + // Product Code + ProductCode string `json:"ProductCode,omitempty"` + + // Rating Engine + RatingEngineID string `json:"RatingEngineID,omitempty"` + + // External Reference + Ref string `json:"Ref,omitempty"` + + // Taxnexus Code + TaxnexusCodeID string `json:"TaxnexusCodeID,omitempty"` +} + +// Validate validates this rating engine item +func (m *RatingEngineItem) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *RatingEngineItem) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RatingEngineItem) UnmarshalBinary(b []byte) error { + var res RatingEngineItem + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/rating_engine_request.go b/api/devops/regs_models/rating_engine_request.go new file mode 100644 index 0000000..d4cc4b8 --- /dev/null +++ b/api/devops/regs_models/rating_engine_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// RatingEngineRequest rating engine request +// +// swagger:model RatingEngineRequest +type RatingEngineRequest struct { + + // data + Data []*RatingEngine `json:"Data"` +} + +// Validate validates this rating engine request +func (m *RatingEngineRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RatingEngineRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *RatingEngineRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RatingEngineRequest) UnmarshalBinary(b []byte) error { + var res RatingEngineRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/rating_engine_response.go b/api/devops/regs_models/rating_engine_response.go new file mode 100644 index 0000000..ff85609 --- /dev/null +++ b/api/devops/regs_models/rating_engine_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// RatingEngineResponse An array of License Objects +// +// swagger:model RatingEngineResponse +type RatingEngineResponse struct { + + // data + Data []*RatingEngine `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this rating engine response +func (m *RatingEngineResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RatingEngineResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *RatingEngineResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *RatingEngineResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RatingEngineResponse) UnmarshalBinary(b []byte) error { + var res RatingEngineResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/request_meta.go b/api/devops/regs_models/request_meta.go new file mode 100644 index 0000000..7b44ba1 --- /dev/null +++ b/api/devops/regs_models/request_meta.go @@ -0,0 +1,68 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// RequestMeta request meta +// +// swagger:model RequestMeta +type RequestMeta struct { + + // Taxnexus Account Number of the Reseller or OEM + // Required: true + TaxnexusAccount *string `json:"TaxnexusAccount"` +} + +// Validate validates this request meta +func (m *RequestMeta) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTaxnexusAccount(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RequestMeta) validateTaxnexusAccount(formats strfmt.Registry) error { + + if err := validate.Required("TaxnexusAccount", "body", m.TaxnexusAccount); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *RequestMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RequestMeta) UnmarshalBinary(b []byte) error { + var res RequestMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/response_meta.go b/api/devops/regs_models/response_meta.go new file mode 100644 index 0000000..a5b92cc --- /dev/null +++ b/api/devops/regs_models/response_meta.go @@ -0,0 +1,108 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ResponseMeta response meta +// +// swagger:model ResponseMeta +type ResponseMeta struct { + + // Microservice Contact Info + Contact string `json:"Contact,omitempty"` + + // Copyright Info + Copyright string `json:"Copyright,omitempty"` + + // License Information and Restrictions + License string `json:"License,omitempty"` + + // Operation ID + OperationID string `json:"OperationID,omitempty"` + + // pagination + Pagination *Pagination `json:"Pagination,omitempty"` + + // Request IP Address + RequestIP string `json:"RequestIP,omitempty"` + + // Request Type + RequestType string `json:"RequestType,omitempty"` + + // Request URL + RequestURL string `json:"RequestURL,omitempty"` + + // Data Server Info + ServerInfo string `json:"ServerInfo,omitempty"` + + // Data Server Response Time (ms) + ServerResponseTime string `json:"ServerResponseTime,omitempty"` + + // Backend Server Timestamp + ServerTimestamp string `json:"ServerTimestamp,omitempty"` + + // Taxnexus Account Number used for recording transactions + TaxnexusAccount string `json:"TaxnexusAccount,omitempty"` +} + +// Validate validates this response meta +func (m *ResponseMeta) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePagination(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ResponseMeta) validatePagination(formats strfmt.Registry) error { + + if swag.IsZero(m.Pagination) { // not required + return nil + } + + if m.Pagination != nil { + if err := m.Pagination.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Pagination") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ResponseMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ResponseMeta) UnmarshalBinary(b []byte) error { + var res ResponseMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/submission.go b/api/devops/regs_models/submission.go new file mode 100644 index 0000000..e9015af --- /dev/null +++ b/api/devops/regs_models/submission.go @@ -0,0 +1,122 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Submission submission +// +// swagger:model Submission +type Submission struct { + + // The Company that did the submission (Taxnexus) + CompanyID string `json:"CompanyID,omitempty"` + + // Submission Contact + ContactID string `json:"ContactID,omitempty"` + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Taxnexus Record Id Only; not used in POST + ID string `json:"ID,omitempty"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Cover Letter + Notes string `json:"Notes,omitempty"` + + // UUID Reference the master record that owns this item + ParentFK string `json:"ParentFK,omitempty"` + + // Penalty paid + Penalty float64 `json:"Penalty,omitempty"` + + // Source System identifier for this record, if any + Ref string `json:"Ref,omitempty"` + + // Reported Adjustments + ReportedAdjustments float64 `json:"ReportedAdjustments,omitempty"` + + // Reported Deductions + ReportedDeductions float64 `json:"ReportedDeductions,omitempty"` + + // Reported Net Revenue + ReportedNetRevenue float64 `json:"ReportedNetRevenue,omitempty"` + + // Reported Rate + ReportedRate float64 `json:"ReportedRate,omitempty"` + + // Reported Revenue + ReportedRevenue float64 `json:"ReportedRevenue,omitempty"` + + // Revenue Base + RevenueBase float64 `json:"RevenueBase,omitempty"` + + // Revenue Net + RevenueNet float64 `json:"RevenueNet,omitempty"` + + // Revenue Not Taxable + RevenueNotTaxable float64 `json:"RevenueNotTaxable,omitempty"` + + // Status + Status string `json:"Status,omitempty"` + + // Submission Date + SubmissionDate string `json:"SubmissionDate,omitempty"` + + // Submission Number + SubmissionNumber string `json:"SubmissionNumber,omitempty"` + + // Amount of remittance before penalty + Subtotal float64 `json:"Subtotal,omitempty"` + + // Taxnexus ID of the TaxType for which this submssion is being made + TaxTypeID string `json:"TaxTypeID,omitempty"` + + // Tenant that owns this object instance + TenantID string `json:"TenantID,omitempty"` + + // Total Amount of remittance + TotalAmount float64 `json:"TotalAmount,omitempty"` +} + +// Validate validates this submission +func (m *Submission) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Submission) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Submission) UnmarshalBinary(b []byte) error { + var res Submission + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/submission_request.go b/api/devops/regs_models/submission_request.go new file mode 100644 index 0000000..c45f134 --- /dev/null +++ b/api/devops/regs_models/submission_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// SubmissionRequest submission request +// +// swagger:model SubmissionRequest +type SubmissionRequest struct { + + // data + Data []*Submission `json:"Data"` +} + +// Validate validates this submission request +func (m *SubmissionRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SubmissionRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *SubmissionRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SubmissionRequest) UnmarshalBinary(b []byte) error { + var res SubmissionRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/submission_response.go b/api/devops/regs_models/submission_response.go new file mode 100644 index 0000000..f8bb3fd --- /dev/null +++ b/api/devops/regs_models/submission_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// SubmissionResponse An array of Submission objects +// +// swagger:model SubmissionResponse +type SubmissionResponse struct { + + // data + Data []*Submission `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this submission response +func (m *SubmissionResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SubmissionResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *SubmissionResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *SubmissionResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SubmissionResponse) UnmarshalBinary(b []byte) error { + var res SubmissionResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/tax_type_account.go b/api/devops/regs_models/tax_type_account.go new file mode 100644 index 0000000..d097515 --- /dev/null +++ b/api/devops/regs_models/tax_type_account.go @@ -0,0 +1,143 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// TaxTypeAccount tax type account +// +// swagger:model TaxTypeAccount +type TaxTypeAccount struct { + + // Account + AccountID string `json:"AccountID,omitempty"` + + // Account Number + AccountNumber string `json:"AccountNumber,omitempty"` + + // Active + Active bool `json:"Active,omitempty"` + + // Rollup Amount + Amount float64 `json:"Amount,omitempty"` + + // Contact ID + ContactID string `json:"ContactID,omitempty"` + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Description + Description string `json:"Description,omitempty"` + + // End Date + EndDate string `json:"EndDate,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // Interest + Interest float64 `json:"Interest,omitempty"` + + // Last Modified By User ID + LastModfiedByID string `json:"LastModfiedByID,omitempty"` + + // Last Modified Date + LastModfiedDate string `json:"LastModfiedDate,omitempty"` + + // Notes + Notes string `json:"Notes,omitempty"` + + // UUID Reference the master record that owns this item + ParentFK string `json:"ParentFK,omitempty"` + + // Penalty + Penalty float64 `json:"Penalty,omitempty"` + + // Source System identifier for this record, if any + Ref string `json:"Ref,omitempty"` + + // Reported Adjustments + ReportedAdjustments float64 `json:"ReportedAdjustments,omitempty"` + + // Reported Deductions + ReportedDeductions float64 `json:"ReportedDeductions,omitempty"` + + // Reported Net Revenue + ReportedNetRevenue float64 `json:"ReportedNetRevenue,omitempty"` + + // Reported Rate + ReportedRate float64 `json:"ReportedRate,omitempty"` + + // Reported Revenue + ReportedRevenue float64 `json:"ReportedRevenue,omitempty"` + + // Rollup Revenue Base + RevenueBase float64 `json:"RevenueBase,omitempty"` + + // Rollup Revenue Net + RevenueNet float64 `json:"RevenueNet,omitempty"` + + // Rollup Revenue Not Taxable + RevenueNotTaxable float64 `json:"RevenueNotTaxable,omitempty"` + + // Start Date + StartDate string `json:"StartDate,omitempty"` + + // Reported Tax + Subtotal float64 `json:"Subtotal,omitempty"` + + // Rollup Tax + Tax float64 `json:"Tax,omitempty"` + + // Rollup Tax On Tax + TaxOnTax float64 `json:"TaxOnTax,omitempty"` + + // Tax Type + TaxTypeID string `json:"TaxTypeID,omitempty"` + + // Tenant that owns this object instance + TenantID string `json:"TenantID,omitempty"` + + // Total Amount + TotalAmount float64 `json:"TotalAmount,omitempty"` + + // Rollup Unit Base + UnitBase float64 `json:"UnitBase,omitempty"` +} + +// Validate validates this tax type account +func (m *TaxTypeAccount) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *TaxTypeAccount) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TaxTypeAccount) UnmarshalBinary(b []byte) error { + var res TaxTypeAccount + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/tax_type_account_request.go b/api/devops/regs_models/tax_type_account_request.go new file mode 100644 index 0000000..c3488c0 --- /dev/null +++ b/api/devops/regs_models/tax_type_account_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// TaxTypeAccountRequest tax type account request +// +// swagger:model TaxTypeAccountRequest +type TaxTypeAccountRequest struct { + + // data + Data []*TaxTypeAccount `json:"Data"` +} + +// Validate validates this tax type account request +func (m *TaxTypeAccountRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *TaxTypeAccountRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *TaxTypeAccountRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TaxTypeAccountRequest) UnmarshalBinary(b []byte) error { + var res TaxTypeAccountRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/tax_type_account_response.go b/api/devops/regs_models/tax_type_account_response.go new file mode 100644 index 0000000..12b4e36 --- /dev/null +++ b/api/devops/regs_models/tax_type_account_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// TaxTypeAccountResponse An array of Tax Type Account objects +// +// swagger:model TaxTypeAccountResponse +type TaxTypeAccountResponse struct { + + // data + Data []*TaxTypeAccount `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this tax type account response +func (m *TaxTypeAccountResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *TaxTypeAccountResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *TaxTypeAccountResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *TaxTypeAccountResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TaxTypeAccountResponse) UnmarshalBinary(b []byte) error { + var res TaxTypeAccountResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/transaction.go b/api/devops/regs_models/transaction.go new file mode 100644 index 0000000..546d190 --- /dev/null +++ b/api/devops/regs_models/transaction.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Transaction A regulatory tax transaction +// +// swagger:model Transaction +type Transaction struct { + + // Account ID + AccountID string `json:"AccountID,omitempty"` + + // Created By + CreatedByID string `json:"CreatedById,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Record Id + ID string `json:"ID,omitempty"` + + // Last Modified By + LastModifiedByID string `json:"LastModifiedById,omitempty"` + + // Last Modifed Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Tax Transaction ID + TaxTransactionID string `json:"TaxTransactionID,omitempty"` + + // Tax Type ID + TaxTypeID string `json:"TaxTypeID,omitempty"` + + // Tenant that owns this object instance + TenantID string `json:"TenantID,omitempty"` + + // Is this Transaction valid? + Valid bool `json:"Valid,omitempty"` +} + +// Validate validates this transaction +func (m *Transaction) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Transaction) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Transaction) UnmarshalBinary(b []byte) error { + var res Transaction + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/transaction_request.go b/api/devops/regs_models/transaction_request.go new file mode 100644 index 0000000..62f51ce --- /dev/null +++ b/api/devops/regs_models/transaction_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// TransactionRequest transaction request +// +// swagger:model TransactionRequest +type TransactionRequest struct { + + // data + Data []*Transaction `json:"Data"` +} + +// Validate validates this transaction request +func (m *TransactionRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *TransactionRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *TransactionRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TransactionRequest) UnmarshalBinary(b []byte) error { + var res TransactionRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/regs_models/transaction_response.go b/api/devops/regs_models/transaction_response.go new file mode 100644 index 0000000..0187403 --- /dev/null +++ b/api/devops/regs_models/transaction_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package regs_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// TransactionResponse An array of Transaction objects +// +// swagger:model TransactionResponse +type TransactionResponse struct { + + // data + Data []*Transaction `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this transaction response +func (m *TransactionResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *TransactionResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *TransactionResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *TransactionResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TransactionResponse) UnmarshalBinary(b []byte) error { + var res TransactionResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cluster/cluster_client.go b/api/devops/v0.0.1/devops_client/cluster/cluster_client.go new file mode 100644 index 0000000..ec28cbc --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cluster/cluster_client.go @@ -0,0 +1,235 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cluster + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new cluster API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for cluster API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetCluster(params *GetClusterParams, authInfo runtime.ClientAuthInfoWriter) (*GetClusterOK, error) + + GetClusters(params *GetClustersParams, authInfo runtime.ClientAuthInfoWriter) (*GetClustersOK, error) + + GetClustersObservable(params *GetClustersObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetClustersObservableOK, error) + + PostClusters(params *PostClustersParams, authInfo runtime.ClientAuthInfoWriter) (*PostClustersOK, error) + + PutClusters(params *PutClustersParams, authInfo runtime.ClientAuthInfoWriter) (*PutClustersOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetCluster gets a single cluster object + + Return a single Cluster object from datastore as a Singleton +*/ +func (a *Client) GetCluster(params *GetClusterParams, authInfo runtime.ClientAuthInfoWriter) (*GetClusterOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetClusterParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getCluster", + Method: "GET", + PathPattern: "/clusters/{clusterIdPath}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetClusterReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetClusterOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getCluster: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetClusters gets a list clusters + + Return a list of Cluster records from the datastore +*/ +func (a *Client) GetClusters(params *GetClustersParams, authInfo runtime.ClientAuthInfoWriter) (*GetClustersOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetClustersParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getClusters", + Method: "GET", + PathPattern: "/clusters", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetClustersReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetClustersOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getClusters: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetClustersObservable gets clusters in an observable array + + Returns a Cluster retrieval in a observable array +*/ +func (a *Client) GetClustersObservable(params *GetClustersObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetClustersObservableOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetClustersObservableParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getClustersObservable", + Method: "GET", + PathPattern: "/clusters/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetClustersObservableReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetClustersObservableOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getClustersObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostClusters creates new clusters + + Create Clusters in Taxnexus +*/ +func (a *Client) PostClusters(params *PostClustersParams, authInfo runtime.ClientAuthInfoWriter) (*PostClustersOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostClustersParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postClusters", + Method: "POST", + PathPattern: "/clusters", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostClustersReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostClustersOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postClusters: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PutClusters updates clustera + + Update Cluster in Taxnexus +*/ +func (a *Client) PutClusters(params *PutClustersParams, authInfo runtime.ClientAuthInfoWriter) (*PutClustersOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPutClustersParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "putClusters", + Method: "PUT", + PathPattern: "/clusters", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PutClustersReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PutClustersOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for putClusters: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/devops/v0.0.1/devops_client/cluster/get_cluster_parameters.go b/api/devops/v0.0.1/devops_client/cluster/get_cluster_parameters.go new file mode 100644 index 0000000..4f3a0a6 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cluster/get_cluster_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cluster + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetClusterParams creates a new GetClusterParams object +// with the default values initialized. +func NewGetClusterParams() *GetClusterParams { + var () + return &GetClusterParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetClusterParamsWithTimeout creates a new GetClusterParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetClusterParamsWithTimeout(timeout time.Duration) *GetClusterParams { + var () + return &GetClusterParams{ + + timeout: timeout, + } +} + +// NewGetClusterParamsWithContext creates a new GetClusterParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetClusterParamsWithContext(ctx context.Context) *GetClusterParams { + var () + return &GetClusterParams{ + + Context: ctx, + } +} + +// NewGetClusterParamsWithHTTPClient creates a new GetClusterParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetClusterParamsWithHTTPClient(client *http.Client) *GetClusterParams { + var () + return &GetClusterParams{ + HTTPClient: client, + } +} + +/*GetClusterParams contains all the parameters to send to the API endpoint +for the get cluster operation typically these are written to a http.Request +*/ +type GetClusterParams struct { + + /*ClusterIDPath + Taxnexus Record Id of a Cluster + + */ + ClusterIDPath string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get cluster params +func (o *GetClusterParams) WithTimeout(timeout time.Duration) *GetClusterParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get cluster params +func (o *GetClusterParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get cluster params +func (o *GetClusterParams) WithContext(ctx context.Context) *GetClusterParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get cluster params +func (o *GetClusterParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get cluster params +func (o *GetClusterParams) WithHTTPClient(client *http.Client) *GetClusterParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get cluster params +func (o *GetClusterParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithClusterIDPath adds the clusterIDPath to the get cluster params +func (o *GetClusterParams) WithClusterIDPath(clusterIDPath string) *GetClusterParams { + o.SetClusterIDPath(clusterIDPath) + return o +} + +// SetClusterIDPath adds the clusterIdPath to the get cluster params +func (o *GetClusterParams) SetClusterIDPath(clusterIDPath string) { + o.ClusterIDPath = clusterIDPath +} + +// WriteToRequest writes these params to a swagger request +func (o *GetClusterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param clusterIdPath + if err := r.SetPathParam("clusterIdPath", o.ClusterIDPath); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cluster/get_cluster_responses.go b/api/devops/v0.0.1/devops_client/cluster/get_cluster_responses.go new file mode 100644 index 0000000..5d6117a --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cluster/get_cluster_responses.go @@ -0,0 +1,313 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cluster + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// GetClusterReader is a Reader for the GetCluster structure. +type GetClusterReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetClusterOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetClusterUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetClusterForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetClusterNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetClusterUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetClusterInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetClusterOK creates a GetClusterOK with default headers values +func NewGetClusterOK() *GetClusterOK { + return &GetClusterOK{} +} + +/*GetClusterOK handles this case with default header values. + +Single Cluster record response +*/ +type GetClusterOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Cluster +} + +func (o *GetClusterOK) Error() string { + return fmt.Sprintf("[GET /clusters/{clusterIdPath}][%d] getClusterOK %+v", 200, o.Payload) +} + +func (o *GetClusterOK) GetPayload() *devops_models.Cluster { + return o.Payload +} + +func (o *GetClusterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Cluster) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetClusterUnauthorized creates a GetClusterUnauthorized with default headers values +func NewGetClusterUnauthorized() *GetClusterUnauthorized { + return &GetClusterUnauthorized{} +} + +/*GetClusterUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetClusterUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetClusterUnauthorized) Error() string { + return fmt.Sprintf("[GET /clusters/{clusterIdPath}][%d] getClusterUnauthorized %+v", 401, o.Payload) +} + +func (o *GetClusterUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetClusterUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetClusterForbidden creates a GetClusterForbidden with default headers values +func NewGetClusterForbidden() *GetClusterForbidden { + return &GetClusterForbidden{} +} + +/*GetClusterForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetClusterForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetClusterForbidden) Error() string { + return fmt.Sprintf("[GET /clusters/{clusterIdPath}][%d] getClusterForbidden %+v", 403, o.Payload) +} + +func (o *GetClusterForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetClusterForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetClusterNotFound creates a GetClusterNotFound with default headers values +func NewGetClusterNotFound() *GetClusterNotFound { + return &GetClusterNotFound{} +} + +/*GetClusterNotFound handles this case with default header values. + +Resource was not found +*/ +type GetClusterNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetClusterNotFound) Error() string { + return fmt.Sprintf("[GET /clusters/{clusterIdPath}][%d] getClusterNotFound %+v", 404, o.Payload) +} + +func (o *GetClusterNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetClusterNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetClusterUnprocessableEntity creates a GetClusterUnprocessableEntity with default headers values +func NewGetClusterUnprocessableEntity() *GetClusterUnprocessableEntity { + return &GetClusterUnprocessableEntity{} +} + +/*GetClusterUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetClusterUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetClusterUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /clusters/{clusterIdPath}][%d] getClusterUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetClusterUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetClusterUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetClusterInternalServerError creates a GetClusterInternalServerError with default headers values +func NewGetClusterInternalServerError() *GetClusterInternalServerError { + return &GetClusterInternalServerError{} +} + +/*GetClusterInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetClusterInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetClusterInternalServerError) Error() string { + return fmt.Sprintf("[GET /clusters/{clusterIdPath}][%d] getClusterInternalServerError %+v", 500, o.Payload) +} + +func (o *GetClusterInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetClusterInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cluster/get_clusters_observable_parameters.go b/api/devops/v0.0.1/devops_client/cluster/get_clusters_observable_parameters.go new file mode 100644 index 0000000..e3d81ac --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cluster/get_clusters_observable_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cluster + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetClustersObservableParams creates a new GetClustersObservableParams object +// with the default values initialized. +func NewGetClustersObservableParams() *GetClustersObservableParams { + + return &GetClustersObservableParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetClustersObservableParamsWithTimeout creates a new GetClustersObservableParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetClustersObservableParamsWithTimeout(timeout time.Duration) *GetClustersObservableParams { + + return &GetClustersObservableParams{ + + timeout: timeout, + } +} + +// NewGetClustersObservableParamsWithContext creates a new GetClustersObservableParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetClustersObservableParamsWithContext(ctx context.Context) *GetClustersObservableParams { + + return &GetClustersObservableParams{ + + Context: ctx, + } +} + +// NewGetClustersObservableParamsWithHTTPClient creates a new GetClustersObservableParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetClustersObservableParamsWithHTTPClient(client *http.Client) *GetClustersObservableParams { + + return &GetClustersObservableParams{ + HTTPClient: client, + } +} + +/*GetClustersObservableParams contains all the parameters to send to the API endpoint +for the get clusters observable operation typically these are written to a http.Request +*/ +type GetClustersObservableParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get clusters observable params +func (o *GetClustersObservableParams) WithTimeout(timeout time.Duration) *GetClustersObservableParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get clusters observable params +func (o *GetClustersObservableParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get clusters observable params +func (o *GetClustersObservableParams) WithContext(ctx context.Context) *GetClustersObservableParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get clusters observable params +func (o *GetClustersObservableParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get clusters observable params +func (o *GetClustersObservableParams) WithHTTPClient(client *http.Client) *GetClustersObservableParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get clusters observable params +func (o *GetClustersObservableParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *GetClustersObservableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cluster/get_clusters_observable_responses.go b/api/devops/v0.0.1/devops_client/cluster/get_clusters_observable_responses.go new file mode 100644 index 0000000..2cebfbe --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cluster/get_clusters_observable_responses.go @@ -0,0 +1,311 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cluster + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// GetClustersObservableReader is a Reader for the GetClustersObservable structure. +type GetClustersObservableReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetClustersObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetClustersObservableOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetClustersObservableUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetClustersObservableForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetClustersObservableNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetClustersObservableUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetClustersObservableInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetClustersObservableOK creates a GetClustersObservableOK with default headers values +func NewGetClustersObservableOK() *GetClustersObservableOK { + return &GetClustersObservableOK{} +} + +/*GetClustersObservableOK handles this case with default header values. + +Single Cluster record response +*/ +type GetClustersObservableOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload []*devops_models.Cluster +} + +func (o *GetClustersObservableOK) Error() string { + return fmt.Sprintf("[GET /clusters/observable][%d] getClustersObservableOK %+v", 200, o.Payload) +} + +func (o *GetClustersObservableOK) GetPayload() []*devops_models.Cluster { + return o.Payload +} + +func (o *GetClustersObservableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetClustersObservableUnauthorized creates a GetClustersObservableUnauthorized with default headers values +func NewGetClustersObservableUnauthorized() *GetClustersObservableUnauthorized { + return &GetClustersObservableUnauthorized{} +} + +/*GetClustersObservableUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetClustersObservableUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetClustersObservableUnauthorized) Error() string { + return fmt.Sprintf("[GET /clusters/observable][%d] getClustersObservableUnauthorized %+v", 401, o.Payload) +} + +func (o *GetClustersObservableUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetClustersObservableUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetClustersObservableForbidden creates a GetClustersObservableForbidden with default headers values +func NewGetClustersObservableForbidden() *GetClustersObservableForbidden { + return &GetClustersObservableForbidden{} +} + +/*GetClustersObservableForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetClustersObservableForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetClustersObservableForbidden) Error() string { + return fmt.Sprintf("[GET /clusters/observable][%d] getClustersObservableForbidden %+v", 403, o.Payload) +} + +func (o *GetClustersObservableForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetClustersObservableForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetClustersObservableNotFound creates a GetClustersObservableNotFound with default headers values +func NewGetClustersObservableNotFound() *GetClustersObservableNotFound { + return &GetClustersObservableNotFound{} +} + +/*GetClustersObservableNotFound handles this case with default header values. + +Resource was not found +*/ +type GetClustersObservableNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetClustersObservableNotFound) Error() string { + return fmt.Sprintf("[GET /clusters/observable][%d] getClustersObservableNotFound %+v", 404, o.Payload) +} + +func (o *GetClustersObservableNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetClustersObservableNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetClustersObservableUnprocessableEntity creates a GetClustersObservableUnprocessableEntity with default headers values +func NewGetClustersObservableUnprocessableEntity() *GetClustersObservableUnprocessableEntity { + return &GetClustersObservableUnprocessableEntity{} +} + +/*GetClustersObservableUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetClustersObservableUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetClustersObservableUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /clusters/observable][%d] getClustersObservableUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetClustersObservableUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetClustersObservableUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetClustersObservableInternalServerError creates a GetClustersObservableInternalServerError with default headers values +func NewGetClustersObservableInternalServerError() *GetClustersObservableInternalServerError { + return &GetClustersObservableInternalServerError{} +} + +/*GetClustersObservableInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetClustersObservableInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetClustersObservableInternalServerError) Error() string { + return fmt.Sprintf("[GET /clusters/observable][%d] getClustersObservableInternalServerError %+v", 500, o.Payload) +} + +func (o *GetClustersObservableInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetClustersObservableInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cluster/get_clusters_parameters.go b/api/devops/v0.0.1/devops_client/cluster/get_clusters_parameters.go new file mode 100644 index 0000000..d3676b6 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cluster/get_clusters_parameters.go @@ -0,0 +1,247 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cluster + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetClustersParams creates a new GetClustersParams object +// with the default values initialized. +func NewGetClustersParams() *GetClustersParams { + var () + return &GetClustersParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetClustersParamsWithTimeout creates a new GetClustersParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetClustersParamsWithTimeout(timeout time.Duration) *GetClustersParams { + var () + return &GetClustersParams{ + + timeout: timeout, + } +} + +// NewGetClustersParamsWithContext creates a new GetClustersParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetClustersParamsWithContext(ctx context.Context) *GetClustersParams { + var () + return &GetClustersParams{ + + Context: ctx, + } +} + +// NewGetClustersParamsWithHTTPClient creates a new GetClustersParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetClustersParamsWithHTTPClient(client *http.Client) *GetClustersParams { + var () + return &GetClustersParams{ + HTTPClient: client, + } +} + +/*GetClustersParams contains all the parameters to send to the API endpoint +for the get clusters operation typically these are written to a http.Request +*/ +type GetClustersParams struct { + + /*ClusterID + Taxnexus Record Id of a Cluster + + */ + ClusterID *string + /*CompanyID + Taxnexus Record Id of a Company + + */ + CompanyID *string + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get clusters params +func (o *GetClustersParams) WithTimeout(timeout time.Duration) *GetClustersParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get clusters params +func (o *GetClustersParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get clusters params +func (o *GetClustersParams) WithContext(ctx context.Context) *GetClustersParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get clusters params +func (o *GetClustersParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get clusters params +func (o *GetClustersParams) WithHTTPClient(client *http.Client) *GetClustersParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get clusters params +func (o *GetClustersParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithClusterID adds the clusterID to the get clusters params +func (o *GetClustersParams) WithClusterID(clusterID *string) *GetClustersParams { + o.SetClusterID(clusterID) + return o +} + +// SetClusterID adds the clusterId to the get clusters params +func (o *GetClustersParams) SetClusterID(clusterID *string) { + o.ClusterID = clusterID +} + +// WithCompanyID adds the companyID to the get clusters params +func (o *GetClustersParams) WithCompanyID(companyID *string) *GetClustersParams { + o.SetCompanyID(companyID) + return o +} + +// SetCompanyID adds the companyId to the get clusters params +func (o *GetClustersParams) SetCompanyID(companyID *string) { + o.CompanyID = companyID +} + +// WithLimit adds the limit to the get clusters params +func (o *GetClustersParams) WithLimit(limit *int64) *GetClustersParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get clusters params +func (o *GetClustersParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get clusters params +func (o *GetClustersParams) WithOffset(offset *int64) *GetClustersParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get clusters params +func (o *GetClustersParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *GetClustersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ClusterID != nil { + + // query param clusterId + var qrClusterID string + if o.ClusterID != nil { + qrClusterID = *o.ClusterID + } + qClusterID := qrClusterID + if qClusterID != "" { + if err := r.SetQueryParam("clusterId", qClusterID); err != nil { + return err + } + } + + } + + if o.CompanyID != nil { + + // query param companyId + var qrCompanyID string + if o.CompanyID != nil { + qrCompanyID = *o.CompanyID + } + qCompanyID := qrCompanyID + if qCompanyID != "" { + if err := r.SetQueryParam("companyId", qCompanyID); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cluster/get_clusters_responses.go b/api/devops/v0.0.1/devops_client/cluster/get_clusters_responses.go new file mode 100644 index 0000000..838ea1c --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cluster/get_clusters_responses.go @@ -0,0 +1,313 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cluster + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// GetClustersReader is a Reader for the GetClusters structure. +type GetClustersReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetClustersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetClustersOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetClustersUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetClustersForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetClustersNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetClustersUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetClustersInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetClustersOK creates a GetClustersOK with default headers values +func NewGetClustersOK() *GetClustersOK { + return &GetClustersOK{} +} + +/*GetClustersOK handles this case with default header values. + +Taxnexus Response with Cluster objects +*/ +type GetClustersOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.ClusterResponse +} + +func (o *GetClustersOK) Error() string { + return fmt.Sprintf("[GET /clusters][%d] getClustersOK %+v", 200, o.Payload) +} + +func (o *GetClustersOK) GetPayload() *devops_models.ClusterResponse { + return o.Payload +} + +func (o *GetClustersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.ClusterResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetClustersUnauthorized creates a GetClustersUnauthorized with default headers values +func NewGetClustersUnauthorized() *GetClustersUnauthorized { + return &GetClustersUnauthorized{} +} + +/*GetClustersUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetClustersUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetClustersUnauthorized) Error() string { + return fmt.Sprintf("[GET /clusters][%d] getClustersUnauthorized %+v", 401, o.Payload) +} + +func (o *GetClustersUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetClustersUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetClustersForbidden creates a GetClustersForbidden with default headers values +func NewGetClustersForbidden() *GetClustersForbidden { + return &GetClustersForbidden{} +} + +/*GetClustersForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetClustersForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetClustersForbidden) Error() string { + return fmt.Sprintf("[GET /clusters][%d] getClustersForbidden %+v", 403, o.Payload) +} + +func (o *GetClustersForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetClustersForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetClustersNotFound creates a GetClustersNotFound with default headers values +func NewGetClustersNotFound() *GetClustersNotFound { + return &GetClustersNotFound{} +} + +/*GetClustersNotFound handles this case with default header values. + +Resource was not found +*/ +type GetClustersNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetClustersNotFound) Error() string { + return fmt.Sprintf("[GET /clusters][%d] getClustersNotFound %+v", 404, o.Payload) +} + +func (o *GetClustersNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetClustersNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetClustersUnprocessableEntity creates a GetClustersUnprocessableEntity with default headers values +func NewGetClustersUnprocessableEntity() *GetClustersUnprocessableEntity { + return &GetClustersUnprocessableEntity{} +} + +/*GetClustersUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetClustersUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetClustersUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /clusters][%d] getClustersUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetClustersUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetClustersUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetClustersInternalServerError creates a GetClustersInternalServerError with default headers values +func NewGetClustersInternalServerError() *GetClustersInternalServerError { + return &GetClustersInternalServerError{} +} + +/*GetClustersInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetClustersInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetClustersInternalServerError) Error() string { + return fmt.Sprintf("[GET /clusters][%d] getClustersInternalServerError %+v", 500, o.Payload) +} + +func (o *GetClustersInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetClustersInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cluster/post_clusters_parameters.go b/api/devops/v0.0.1/devops_client/cluster/post_clusters_parameters.go new file mode 100644 index 0000000..b7b5938 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cluster/post_clusters_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cluster + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// NewPostClustersParams creates a new PostClustersParams object +// with the default values initialized. +func NewPostClustersParams() *PostClustersParams { + var () + return &PostClustersParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostClustersParamsWithTimeout creates a new PostClustersParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostClustersParamsWithTimeout(timeout time.Duration) *PostClustersParams { + var () + return &PostClustersParams{ + + timeout: timeout, + } +} + +// NewPostClustersParamsWithContext creates a new PostClustersParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostClustersParamsWithContext(ctx context.Context) *PostClustersParams { + var () + return &PostClustersParams{ + + Context: ctx, + } +} + +// NewPostClustersParamsWithHTTPClient creates a new PostClustersParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostClustersParamsWithHTTPClient(client *http.Client) *PostClustersParams { + var () + return &PostClustersParams{ + HTTPClient: client, + } +} + +/*PostClustersParams contains all the parameters to send to the API endpoint +for the post clusters operation typically these are written to a http.Request +*/ +type PostClustersParams struct { + + /*ClusterRequest + An array of Cluster records + + */ + ClusterRequest *devops_models.ClusterRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post clusters params +func (o *PostClustersParams) WithTimeout(timeout time.Duration) *PostClustersParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post clusters params +func (o *PostClustersParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post clusters params +func (o *PostClustersParams) WithContext(ctx context.Context) *PostClustersParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post clusters params +func (o *PostClustersParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post clusters params +func (o *PostClustersParams) WithHTTPClient(client *http.Client) *PostClustersParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post clusters params +func (o *PostClustersParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithClusterRequest adds the clusterRequest to the post clusters params +func (o *PostClustersParams) WithClusterRequest(clusterRequest *devops_models.ClusterRequest) *PostClustersParams { + o.SetClusterRequest(clusterRequest) + return o +} + +// SetClusterRequest adds the clusterRequest to the post clusters params +func (o *PostClustersParams) SetClusterRequest(clusterRequest *devops_models.ClusterRequest) { + o.ClusterRequest = clusterRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostClustersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ClusterRequest != nil { + if err := r.SetBodyParam(o.ClusterRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cluster/post_clusters_responses.go b/api/devops/v0.0.1/devops_client/cluster/post_clusters_responses.go new file mode 100644 index 0000000..efd0519 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cluster/post_clusters_responses.go @@ -0,0 +1,313 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cluster + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// PostClustersReader is a Reader for the PostClusters structure. +type PostClustersReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostClustersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostClustersOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostClustersUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostClustersForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostClustersNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostClustersUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostClustersInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostClustersOK creates a PostClustersOK with default headers values +func NewPostClustersOK() *PostClustersOK { + return &PostClustersOK{} +} + +/*PostClustersOK handles this case with default header values. + +Taxnexus Response with Cluster objects +*/ +type PostClustersOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.ClusterResponse +} + +func (o *PostClustersOK) Error() string { + return fmt.Sprintf("[POST /clusters][%d] postClustersOK %+v", 200, o.Payload) +} + +func (o *PostClustersOK) GetPayload() *devops_models.ClusterResponse { + return o.Payload +} + +func (o *PostClustersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.ClusterResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostClustersUnauthorized creates a PostClustersUnauthorized with default headers values +func NewPostClustersUnauthorized() *PostClustersUnauthorized { + return &PostClustersUnauthorized{} +} + +/*PostClustersUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostClustersUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *PostClustersUnauthorized) Error() string { + return fmt.Sprintf("[POST /clusters][%d] postClustersUnauthorized %+v", 401, o.Payload) +} + +func (o *PostClustersUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostClustersUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostClustersForbidden creates a PostClustersForbidden with default headers values +func NewPostClustersForbidden() *PostClustersForbidden { + return &PostClustersForbidden{} +} + +/*PostClustersForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostClustersForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PostClustersForbidden) Error() string { + return fmt.Sprintf("[POST /clusters][%d] postClustersForbidden %+v", 403, o.Payload) +} + +func (o *PostClustersForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostClustersForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostClustersNotFound creates a PostClustersNotFound with default headers values +func NewPostClustersNotFound() *PostClustersNotFound { + return &PostClustersNotFound{} +} + +/*PostClustersNotFound handles this case with default header values. + +Resource was not found +*/ +type PostClustersNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PostClustersNotFound) Error() string { + return fmt.Sprintf("[POST /clusters][%d] postClustersNotFound %+v", 404, o.Payload) +} + +func (o *PostClustersNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostClustersNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostClustersUnprocessableEntity creates a PostClustersUnprocessableEntity with default headers values +func NewPostClustersUnprocessableEntity() *PostClustersUnprocessableEntity { + return &PostClustersUnprocessableEntity{} +} + +/*PostClustersUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostClustersUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *PostClustersUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /clusters][%d] postClustersUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostClustersUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostClustersUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostClustersInternalServerError creates a PostClustersInternalServerError with default headers values +func NewPostClustersInternalServerError() *PostClustersInternalServerError { + return &PostClustersInternalServerError{} +} + +/*PostClustersInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostClustersInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PostClustersInternalServerError) Error() string { + return fmt.Sprintf("[POST /clusters][%d] postClustersInternalServerError %+v", 500, o.Payload) +} + +func (o *PostClustersInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostClustersInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cluster/put_clusters_parameters.go b/api/devops/v0.0.1/devops_client/cluster/put_clusters_parameters.go new file mode 100644 index 0000000..b4150bd --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cluster/put_clusters_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cluster + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// NewPutClustersParams creates a new PutClustersParams object +// with the default values initialized. +func NewPutClustersParams() *PutClustersParams { + var () + return &PutClustersParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPutClustersParamsWithTimeout creates a new PutClustersParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPutClustersParamsWithTimeout(timeout time.Duration) *PutClustersParams { + var () + return &PutClustersParams{ + + timeout: timeout, + } +} + +// NewPutClustersParamsWithContext creates a new PutClustersParams object +// with the default values initialized, and the ability to set a context for a request +func NewPutClustersParamsWithContext(ctx context.Context) *PutClustersParams { + var () + return &PutClustersParams{ + + Context: ctx, + } +} + +// NewPutClustersParamsWithHTTPClient creates a new PutClustersParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPutClustersParamsWithHTTPClient(client *http.Client) *PutClustersParams { + var () + return &PutClustersParams{ + HTTPClient: client, + } +} + +/*PutClustersParams contains all the parameters to send to the API endpoint +for the put clusters operation typically these are written to a http.Request +*/ +type PutClustersParams struct { + + /*ClusterRequest + An array of Cluster records + + */ + ClusterRequest *devops_models.ClusterRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the put clusters params +func (o *PutClustersParams) WithTimeout(timeout time.Duration) *PutClustersParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the put clusters params +func (o *PutClustersParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the put clusters params +func (o *PutClustersParams) WithContext(ctx context.Context) *PutClustersParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the put clusters params +func (o *PutClustersParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the put clusters params +func (o *PutClustersParams) WithHTTPClient(client *http.Client) *PutClustersParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the put clusters params +func (o *PutClustersParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithClusterRequest adds the clusterRequest to the put clusters params +func (o *PutClustersParams) WithClusterRequest(clusterRequest *devops_models.ClusterRequest) *PutClustersParams { + o.SetClusterRequest(clusterRequest) + return o +} + +// SetClusterRequest adds the clusterRequest to the put clusters params +func (o *PutClustersParams) SetClusterRequest(clusterRequest *devops_models.ClusterRequest) { + o.ClusterRequest = clusterRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PutClustersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ClusterRequest != nil { + if err := r.SetBodyParam(o.ClusterRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cluster/put_clusters_responses.go b/api/devops/v0.0.1/devops_client/cluster/put_clusters_responses.go new file mode 100644 index 0000000..2fd6c0d --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cluster/put_clusters_responses.go @@ -0,0 +1,313 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cluster + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// PutClustersReader is a Reader for the PutClusters structure. +type PutClustersReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PutClustersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPutClustersOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPutClustersUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPutClustersForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPutClustersNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPutClustersUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPutClustersInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPutClustersOK creates a PutClustersOK with default headers values +func NewPutClustersOK() *PutClustersOK { + return &PutClustersOK{} +} + +/*PutClustersOK handles this case with default header values. + +Taxnexus Response with Cluster objects +*/ +type PutClustersOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.ClusterResponse +} + +func (o *PutClustersOK) Error() string { + return fmt.Sprintf("[PUT /clusters][%d] putClustersOK %+v", 200, o.Payload) +} + +func (o *PutClustersOK) GetPayload() *devops_models.ClusterResponse { + return o.Payload +} + +func (o *PutClustersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.ClusterResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutClustersUnauthorized creates a PutClustersUnauthorized with default headers values +func NewPutClustersUnauthorized() *PutClustersUnauthorized { + return &PutClustersUnauthorized{} +} + +/*PutClustersUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PutClustersUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *PutClustersUnauthorized) Error() string { + return fmt.Sprintf("[PUT /clusters][%d] putClustersUnauthorized %+v", 401, o.Payload) +} + +func (o *PutClustersUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutClustersUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutClustersForbidden creates a PutClustersForbidden with default headers values +func NewPutClustersForbidden() *PutClustersForbidden { + return &PutClustersForbidden{} +} + +/*PutClustersForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PutClustersForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PutClustersForbidden) Error() string { + return fmt.Sprintf("[PUT /clusters][%d] putClustersForbidden %+v", 403, o.Payload) +} + +func (o *PutClustersForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutClustersForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutClustersNotFound creates a PutClustersNotFound with default headers values +func NewPutClustersNotFound() *PutClustersNotFound { + return &PutClustersNotFound{} +} + +/*PutClustersNotFound handles this case with default header values. + +Resource was not found +*/ +type PutClustersNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PutClustersNotFound) Error() string { + return fmt.Sprintf("[PUT /clusters][%d] putClustersNotFound %+v", 404, o.Payload) +} + +func (o *PutClustersNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutClustersNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutClustersUnprocessableEntity creates a PutClustersUnprocessableEntity with default headers values +func NewPutClustersUnprocessableEntity() *PutClustersUnprocessableEntity { + return &PutClustersUnprocessableEntity{} +} + +/*PutClustersUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PutClustersUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *PutClustersUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /clusters][%d] putClustersUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutClustersUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutClustersUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutClustersInternalServerError creates a PutClustersInternalServerError with default headers values +func NewPutClustersInternalServerError() *PutClustersInternalServerError { + return &PutClustersInternalServerError{} +} + +/*PutClustersInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PutClustersInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PutClustersInternalServerError) Error() string { + return fmt.Sprintf("[PUT /clusters][%d] putClustersInternalServerError %+v", 500, o.Payload) +} + +func (o *PutClustersInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutClustersInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cors/cluster_options_parameters.go b/api/devops/v0.0.1/devops_client/cors/cluster_options_parameters.go new file mode 100644 index 0000000..716c906 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cors/cluster_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewClusterOptionsParams creates a new ClusterOptionsParams object +// with the default values initialized. +func NewClusterOptionsParams() *ClusterOptionsParams { + + return &ClusterOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewClusterOptionsParamsWithTimeout creates a new ClusterOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewClusterOptionsParamsWithTimeout(timeout time.Duration) *ClusterOptionsParams { + + return &ClusterOptionsParams{ + + timeout: timeout, + } +} + +// NewClusterOptionsParamsWithContext creates a new ClusterOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewClusterOptionsParamsWithContext(ctx context.Context) *ClusterOptionsParams { + + return &ClusterOptionsParams{ + + Context: ctx, + } +} + +// NewClusterOptionsParamsWithHTTPClient creates a new ClusterOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewClusterOptionsParamsWithHTTPClient(client *http.Client) *ClusterOptionsParams { + + return &ClusterOptionsParams{ + HTTPClient: client, + } +} + +/*ClusterOptionsParams contains all the parameters to send to the API endpoint +for the cluster options operation typically these are written to a http.Request +*/ +type ClusterOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cluster options params +func (o *ClusterOptionsParams) WithTimeout(timeout time.Duration) *ClusterOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cluster options params +func (o *ClusterOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cluster options params +func (o *ClusterOptionsParams) WithContext(ctx context.Context) *ClusterOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cluster options params +func (o *ClusterOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cluster options params +func (o *ClusterOptionsParams) WithHTTPClient(client *http.Client) *ClusterOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cluster options params +func (o *ClusterOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ClusterOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cors/cluster_options_responses.go b/api/devops/v0.0.1/devops_client/cors/cluster_options_responses.go new file mode 100644 index 0000000..8decd93 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cors/cluster_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// ClusterOptionsReader is a Reader for the ClusterOptions structure. +type ClusterOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ClusterOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewClusterOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewClusterOptionsOK creates a ClusterOptionsOK with default headers values +func NewClusterOptionsOK() *ClusterOptionsOK { + return &ClusterOptionsOK{} +} + +/*ClusterOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type ClusterOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *ClusterOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /clusters/observable][%d] clusterOptionsOK ", 200) +} + +func (o *ClusterOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cors/clusters_options_parameters.go b/api/devops/v0.0.1/devops_client/cors/clusters_options_parameters.go new file mode 100644 index 0000000..c15971d --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cors/clusters_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewClustersOptionsParams creates a new ClustersOptionsParams object +// with the default values initialized. +func NewClustersOptionsParams() *ClustersOptionsParams { + + return &ClustersOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewClustersOptionsParamsWithTimeout creates a new ClustersOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewClustersOptionsParamsWithTimeout(timeout time.Duration) *ClustersOptionsParams { + + return &ClustersOptionsParams{ + + timeout: timeout, + } +} + +// NewClustersOptionsParamsWithContext creates a new ClustersOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewClustersOptionsParamsWithContext(ctx context.Context) *ClustersOptionsParams { + + return &ClustersOptionsParams{ + + Context: ctx, + } +} + +// NewClustersOptionsParamsWithHTTPClient creates a new ClustersOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewClustersOptionsParamsWithHTTPClient(client *http.Client) *ClustersOptionsParams { + + return &ClustersOptionsParams{ + HTTPClient: client, + } +} + +/*ClustersOptionsParams contains all the parameters to send to the API endpoint +for the clusters options operation typically these are written to a http.Request +*/ +type ClustersOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the clusters options params +func (o *ClustersOptionsParams) WithTimeout(timeout time.Duration) *ClustersOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the clusters options params +func (o *ClustersOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the clusters options params +func (o *ClustersOptionsParams) WithContext(ctx context.Context) *ClustersOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the clusters options params +func (o *ClustersOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the clusters options params +func (o *ClustersOptionsParams) WithHTTPClient(client *http.Client) *ClustersOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the clusters options params +func (o *ClustersOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ClustersOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cors/clusters_options_responses.go b/api/devops/v0.0.1/devops_client/cors/clusters_options_responses.go new file mode 100644 index 0000000..a4bc29c --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cors/clusters_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// ClustersOptionsReader is a Reader for the ClustersOptions structure. +type ClustersOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ClustersOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewClustersOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewClustersOptionsOK creates a ClustersOptionsOK with default headers values +func NewClustersOptionsOK() *ClustersOptionsOK { + return &ClustersOptionsOK{} +} + +/*ClustersOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type ClustersOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *ClustersOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /clusters][%d] clustersOptionsOK ", 200) +} + +func (o *ClustersOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cors/cors_client.go b/api/devops/v0.0.1/devops_client/cors/cors_client.go new file mode 100644 index 0000000..bc17303 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cors/cors_client.go @@ -0,0 +1,616 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new cors API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for cors API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + ClusterOptions(params *ClusterOptionsParams) (*ClusterOptionsOK, error) + + ClustersOptions(params *ClustersOptionsParams) (*ClustersOptionsOK, error) + + DatabaseOptions(params *DatabaseOptionsParams) (*DatabaseOptionsOK, error) + + DatabasesOptions(params *DatabasesOptionsParams) (*DatabasesOptionsOK, error) + + IngestOptions(params *IngestOptionsParams) (*IngestOptionsOK, error) + + IngestsOptions(params *IngestsOptionsParams) (*IngestsOptionsOK, error) + + JobOptions(params *JobOptionsParams) (*JobOptionsOK, error) + + JobsOptions(params *JobsOptionsParams) (*JobsOptionsOK, error) + + ServiceOptions(params *ServiceOptionsParams) (*ServiceOptionsOK, error) + + ServicesOptions(params *ServicesOptionsParams) (*ServicesOptionsOK, error) + + TemplateOptions(params *TemplateOptionsParams) (*TemplateOptionsOK, error) + + TemplatesOptions(params *TemplatesOptionsParams) (*TemplatesOptionsOK, error) + + TenantOptions(params *TenantOptionsParams) (*TenantOptionsOK, error) + + TenantsOptions(params *TenantsOptionsParams) (*TenantsOptionsOK, error) + + UserOptions(params *UserOptionsParams) (*UserOptionsOK, error) + + UsersOptions(params *UsersOptionsParams) (*UsersOptionsOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + ClusterOptions CORS support +*/ +func (a *Client) ClusterOptions(params *ClusterOptionsParams) (*ClusterOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewClusterOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "clusterOptions", + Method: "OPTIONS", + PathPattern: "/clusters/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ClusterOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ClusterOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for clusterOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + ClustersOptions CORS support +*/ +func (a *Client) ClustersOptions(params *ClustersOptionsParams) (*ClustersOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewClustersOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "clustersOptions", + Method: "OPTIONS", + PathPattern: "/clusters", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ClustersOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ClustersOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for clustersOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DatabaseOptions CORS support +*/ +func (a *Client) DatabaseOptions(params *DatabaseOptionsParams) (*DatabaseOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDatabaseOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "databaseOptions", + Method: "OPTIONS", + PathPattern: "/databases/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &DatabaseOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*DatabaseOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for databaseOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + DatabasesOptions CORS support +*/ +func (a *Client) DatabasesOptions(params *DatabasesOptionsParams) (*DatabasesOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDatabasesOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "databasesOptions", + Method: "OPTIONS", + PathPattern: "/databases", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &DatabasesOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*DatabasesOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for databasesOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IngestOptions CORS support +*/ +func (a *Client) IngestOptions(params *IngestOptionsParams) (*IngestOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIngestOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ingestOptions", + Method: "OPTIONS", + PathPattern: "/ingests/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &IngestOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IngestOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ingestOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + IngestsOptions CORS support +*/ +func (a *Client) IngestsOptions(params *IngestsOptionsParams) (*IngestsOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewIngestsOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ingestsOptions", + Method: "OPTIONS", + PathPattern: "/ingests", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &IngestsOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*IngestsOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ingestsOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + JobOptions CORS support +*/ +func (a *Client) JobOptions(params *JobOptionsParams) (*JobOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewJobOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "jobOptions", + Method: "OPTIONS", + PathPattern: "/jobs/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &JobOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*JobOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for jobOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + JobsOptions CORS support +*/ +func (a *Client) JobsOptions(params *JobsOptionsParams) (*JobsOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewJobsOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "jobsOptions", + Method: "OPTIONS", + PathPattern: "/jobs", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &JobsOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*JobsOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for jobsOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + ServiceOptions CORS support +*/ +func (a *Client) ServiceOptions(params *ServiceOptionsParams) (*ServiceOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewServiceOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "serviceOptions", + Method: "OPTIONS", + PathPattern: "/services/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ServiceOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ServiceOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for serviceOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + ServicesOptions CORS support +*/ +func (a *Client) ServicesOptions(params *ServicesOptionsParams) (*ServicesOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewServicesOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "servicesOptions", + Method: "OPTIONS", + PathPattern: "/services", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ServicesOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ServicesOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for servicesOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TemplateOptions CORS support +*/ +func (a *Client) TemplateOptions(params *TemplateOptionsParams) (*TemplateOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTemplateOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "templateOptions", + Method: "OPTIONS", + PathPattern: "/templates/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &TemplateOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*TemplateOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for templateOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TemplatesOptions CORS support +*/ +func (a *Client) TemplatesOptions(params *TemplatesOptionsParams) (*TemplatesOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTemplatesOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "templatesOptions", + Method: "OPTIONS", + PathPattern: "/templates", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &TemplatesOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*TemplatesOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for templatesOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenantOptions CORS support +*/ +func (a *Client) TenantOptions(params *TenantOptionsParams) (*TenantOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenantOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "tenantOptions", + Method: "OPTIONS", + PathPattern: "/tenants/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &TenantOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*TenantOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for tenantOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TenantsOptions CORS support +*/ +func (a *Client) TenantsOptions(params *TenantsOptionsParams) (*TenantsOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTenantsOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "tenantsOptions", + Method: "OPTIONS", + PathPattern: "/tenants", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &TenantsOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*TenantsOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for tenantsOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + UserOptions CORS support +*/ +func (a *Client) UserOptions(params *UserOptionsParams) (*UserOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewUserOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "userOptions", + Method: "OPTIONS", + PathPattern: "/users/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &UserOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*UserOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for userOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + UsersOptions CORS support +*/ +func (a *Client) UsersOptions(params *UsersOptionsParams) (*UsersOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewUsersOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "usersOptions", + Method: "OPTIONS", + PathPattern: "/users", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &UsersOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*UsersOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for usersOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/devops/v0.0.1/devops_client/cors/database_options_parameters.go b/api/devops/v0.0.1/devops_client/cors/database_options_parameters.go new file mode 100644 index 0000000..ba98a50 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cors/database_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewDatabaseOptionsParams creates a new DatabaseOptionsParams object +// with the default values initialized. +func NewDatabaseOptionsParams() *DatabaseOptionsParams { + + return &DatabaseOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewDatabaseOptionsParamsWithTimeout creates a new DatabaseOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewDatabaseOptionsParamsWithTimeout(timeout time.Duration) *DatabaseOptionsParams { + + return &DatabaseOptionsParams{ + + timeout: timeout, + } +} + +// NewDatabaseOptionsParamsWithContext creates a new DatabaseOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewDatabaseOptionsParamsWithContext(ctx context.Context) *DatabaseOptionsParams { + + return &DatabaseOptionsParams{ + + Context: ctx, + } +} + +// NewDatabaseOptionsParamsWithHTTPClient creates a new DatabaseOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewDatabaseOptionsParamsWithHTTPClient(client *http.Client) *DatabaseOptionsParams { + + return &DatabaseOptionsParams{ + HTTPClient: client, + } +} + +/*DatabaseOptionsParams contains all the parameters to send to the API endpoint +for the database options operation typically these are written to a http.Request +*/ +type DatabaseOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the database options params +func (o *DatabaseOptionsParams) WithTimeout(timeout time.Duration) *DatabaseOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the database options params +func (o *DatabaseOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the database options params +func (o *DatabaseOptionsParams) WithContext(ctx context.Context) *DatabaseOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the database options params +func (o *DatabaseOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the database options params +func (o *DatabaseOptionsParams) WithHTTPClient(client *http.Client) *DatabaseOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the database options params +func (o *DatabaseOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *DatabaseOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cors/database_options_responses.go b/api/devops/v0.0.1/devops_client/cors/database_options_responses.go new file mode 100644 index 0000000..4e3b58b --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cors/database_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// DatabaseOptionsReader is a Reader for the DatabaseOptions structure. +type DatabaseOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DatabaseOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDatabaseOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewDatabaseOptionsOK creates a DatabaseOptionsOK with default headers values +func NewDatabaseOptionsOK() *DatabaseOptionsOK { + return &DatabaseOptionsOK{} +} + +/*DatabaseOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type DatabaseOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *DatabaseOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /databases/observable][%d] databaseOptionsOK ", 200) +} + +func (o *DatabaseOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cors/databases_options_parameters.go b/api/devops/v0.0.1/devops_client/cors/databases_options_parameters.go new file mode 100644 index 0000000..359d41f --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cors/databases_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewDatabasesOptionsParams creates a new DatabasesOptionsParams object +// with the default values initialized. +func NewDatabasesOptionsParams() *DatabasesOptionsParams { + + return &DatabasesOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewDatabasesOptionsParamsWithTimeout creates a new DatabasesOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewDatabasesOptionsParamsWithTimeout(timeout time.Duration) *DatabasesOptionsParams { + + return &DatabasesOptionsParams{ + + timeout: timeout, + } +} + +// NewDatabasesOptionsParamsWithContext creates a new DatabasesOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewDatabasesOptionsParamsWithContext(ctx context.Context) *DatabasesOptionsParams { + + return &DatabasesOptionsParams{ + + Context: ctx, + } +} + +// NewDatabasesOptionsParamsWithHTTPClient creates a new DatabasesOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewDatabasesOptionsParamsWithHTTPClient(client *http.Client) *DatabasesOptionsParams { + + return &DatabasesOptionsParams{ + HTTPClient: client, + } +} + +/*DatabasesOptionsParams contains all the parameters to send to the API endpoint +for the databases options operation typically these are written to a http.Request +*/ +type DatabasesOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the databases options params +func (o *DatabasesOptionsParams) WithTimeout(timeout time.Duration) *DatabasesOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the databases options params +func (o *DatabasesOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the databases options params +func (o *DatabasesOptionsParams) WithContext(ctx context.Context) *DatabasesOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the databases options params +func (o *DatabasesOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the databases options params +func (o *DatabasesOptionsParams) WithHTTPClient(client *http.Client) *DatabasesOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the databases options params +func (o *DatabasesOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *DatabasesOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cors/databases_options_responses.go b/api/devops/v0.0.1/devops_client/cors/databases_options_responses.go new file mode 100644 index 0000000..4744406 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cors/databases_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// DatabasesOptionsReader is a Reader for the DatabasesOptions structure. +type DatabasesOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DatabasesOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDatabasesOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewDatabasesOptionsOK creates a DatabasesOptionsOK with default headers values +func NewDatabasesOptionsOK() *DatabasesOptionsOK { + return &DatabasesOptionsOK{} +} + +/*DatabasesOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type DatabasesOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *DatabasesOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /databases][%d] databasesOptionsOK ", 200) +} + +func (o *DatabasesOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cors/ingest_options_parameters.go b/api/devops/v0.0.1/devops_client/cors/ingest_options_parameters.go new file mode 100644 index 0000000..9052205 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cors/ingest_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewIngestOptionsParams creates a new IngestOptionsParams object +// with the default values initialized. +func NewIngestOptionsParams() *IngestOptionsParams { + + return &IngestOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewIngestOptionsParamsWithTimeout creates a new IngestOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewIngestOptionsParamsWithTimeout(timeout time.Duration) *IngestOptionsParams { + + return &IngestOptionsParams{ + + timeout: timeout, + } +} + +// NewIngestOptionsParamsWithContext creates a new IngestOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewIngestOptionsParamsWithContext(ctx context.Context) *IngestOptionsParams { + + return &IngestOptionsParams{ + + Context: ctx, + } +} + +// NewIngestOptionsParamsWithHTTPClient creates a new IngestOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewIngestOptionsParamsWithHTTPClient(client *http.Client) *IngestOptionsParams { + + return &IngestOptionsParams{ + HTTPClient: client, + } +} + +/*IngestOptionsParams contains all the parameters to send to the API endpoint +for the ingest options operation typically these are written to a http.Request +*/ +type IngestOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the ingest options params +func (o *IngestOptionsParams) WithTimeout(timeout time.Duration) *IngestOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ingest options params +func (o *IngestOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ingest options params +func (o *IngestOptionsParams) WithContext(ctx context.Context) *IngestOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ingest options params +func (o *IngestOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ingest options params +func (o *IngestOptionsParams) WithHTTPClient(client *http.Client) *IngestOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ingest options params +func (o *IngestOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *IngestOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cors/ingest_options_responses.go b/api/devops/v0.0.1/devops_client/cors/ingest_options_responses.go new file mode 100644 index 0000000..48a8490 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cors/ingest_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// IngestOptionsReader is a Reader for the IngestOptions structure. +type IngestOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IngestOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIngestOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewIngestOptionsOK creates a IngestOptionsOK with default headers values +func NewIngestOptionsOK() *IngestOptionsOK { + return &IngestOptionsOK{} +} + +/*IngestOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type IngestOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *IngestOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /ingests/observable][%d] ingestOptionsOK ", 200) +} + +func (o *IngestOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cors/ingests_options_parameters.go b/api/devops/v0.0.1/devops_client/cors/ingests_options_parameters.go new file mode 100644 index 0000000..382f380 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cors/ingests_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewIngestsOptionsParams creates a new IngestsOptionsParams object +// with the default values initialized. +func NewIngestsOptionsParams() *IngestsOptionsParams { + + return &IngestsOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewIngestsOptionsParamsWithTimeout creates a new IngestsOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewIngestsOptionsParamsWithTimeout(timeout time.Duration) *IngestsOptionsParams { + + return &IngestsOptionsParams{ + + timeout: timeout, + } +} + +// NewIngestsOptionsParamsWithContext creates a new IngestsOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewIngestsOptionsParamsWithContext(ctx context.Context) *IngestsOptionsParams { + + return &IngestsOptionsParams{ + + Context: ctx, + } +} + +// NewIngestsOptionsParamsWithHTTPClient creates a new IngestsOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewIngestsOptionsParamsWithHTTPClient(client *http.Client) *IngestsOptionsParams { + + return &IngestsOptionsParams{ + HTTPClient: client, + } +} + +/*IngestsOptionsParams contains all the parameters to send to the API endpoint +for the ingests options operation typically these are written to a http.Request +*/ +type IngestsOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the ingests options params +func (o *IngestsOptionsParams) WithTimeout(timeout time.Duration) *IngestsOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the ingests options params +func (o *IngestsOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the ingests options params +func (o *IngestsOptionsParams) WithContext(ctx context.Context) *IngestsOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the ingests options params +func (o *IngestsOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the ingests options params +func (o *IngestsOptionsParams) WithHTTPClient(client *http.Client) *IngestsOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the ingests options params +func (o *IngestsOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *IngestsOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cors/ingests_options_responses.go b/api/devops/v0.0.1/devops_client/cors/ingests_options_responses.go new file mode 100644 index 0000000..be74085 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cors/ingests_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// IngestsOptionsReader is a Reader for the IngestsOptions structure. +type IngestsOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *IngestsOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewIngestsOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewIngestsOptionsOK creates a IngestsOptionsOK with default headers values +func NewIngestsOptionsOK() *IngestsOptionsOK { + return &IngestsOptionsOK{} +} + +/*IngestsOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type IngestsOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *IngestsOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /ingests][%d] ingestsOptionsOK ", 200) +} + +func (o *IngestsOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cors/job_options_parameters.go b/api/devops/v0.0.1/devops_client/cors/job_options_parameters.go new file mode 100644 index 0000000..1d8a10a --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cors/job_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewJobOptionsParams creates a new JobOptionsParams object +// with the default values initialized. +func NewJobOptionsParams() *JobOptionsParams { + + return &JobOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewJobOptionsParamsWithTimeout creates a new JobOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewJobOptionsParamsWithTimeout(timeout time.Duration) *JobOptionsParams { + + return &JobOptionsParams{ + + timeout: timeout, + } +} + +// NewJobOptionsParamsWithContext creates a new JobOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewJobOptionsParamsWithContext(ctx context.Context) *JobOptionsParams { + + return &JobOptionsParams{ + + Context: ctx, + } +} + +// NewJobOptionsParamsWithHTTPClient creates a new JobOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewJobOptionsParamsWithHTTPClient(client *http.Client) *JobOptionsParams { + + return &JobOptionsParams{ + HTTPClient: client, + } +} + +/*JobOptionsParams contains all the parameters to send to the API endpoint +for the job options operation typically these are written to a http.Request +*/ +type JobOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the job options params +func (o *JobOptionsParams) WithTimeout(timeout time.Duration) *JobOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the job options params +func (o *JobOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the job options params +func (o *JobOptionsParams) WithContext(ctx context.Context) *JobOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the job options params +func (o *JobOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the job options params +func (o *JobOptionsParams) WithHTTPClient(client *http.Client) *JobOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the job options params +func (o *JobOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *JobOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cors/job_options_responses.go b/api/devops/v0.0.1/devops_client/cors/job_options_responses.go new file mode 100644 index 0000000..1ef2022 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cors/job_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// JobOptionsReader is a Reader for the JobOptions structure. +type JobOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *JobOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewJobOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewJobOptionsOK creates a JobOptionsOK with default headers values +func NewJobOptionsOK() *JobOptionsOK { + return &JobOptionsOK{} +} + +/*JobOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type JobOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *JobOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /jobs/observable][%d] jobOptionsOK ", 200) +} + +func (o *JobOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cors/jobs_options_parameters.go b/api/devops/v0.0.1/devops_client/cors/jobs_options_parameters.go new file mode 100644 index 0000000..1cc883d --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cors/jobs_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewJobsOptionsParams creates a new JobsOptionsParams object +// with the default values initialized. +func NewJobsOptionsParams() *JobsOptionsParams { + + return &JobsOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewJobsOptionsParamsWithTimeout creates a new JobsOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewJobsOptionsParamsWithTimeout(timeout time.Duration) *JobsOptionsParams { + + return &JobsOptionsParams{ + + timeout: timeout, + } +} + +// NewJobsOptionsParamsWithContext creates a new JobsOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewJobsOptionsParamsWithContext(ctx context.Context) *JobsOptionsParams { + + return &JobsOptionsParams{ + + Context: ctx, + } +} + +// NewJobsOptionsParamsWithHTTPClient creates a new JobsOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewJobsOptionsParamsWithHTTPClient(client *http.Client) *JobsOptionsParams { + + return &JobsOptionsParams{ + HTTPClient: client, + } +} + +/*JobsOptionsParams contains all the parameters to send to the API endpoint +for the jobs options operation typically these are written to a http.Request +*/ +type JobsOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the jobs options params +func (o *JobsOptionsParams) WithTimeout(timeout time.Duration) *JobsOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the jobs options params +func (o *JobsOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the jobs options params +func (o *JobsOptionsParams) WithContext(ctx context.Context) *JobsOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the jobs options params +func (o *JobsOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the jobs options params +func (o *JobsOptionsParams) WithHTTPClient(client *http.Client) *JobsOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the jobs options params +func (o *JobsOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *JobsOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cors/jobs_options_responses.go b/api/devops/v0.0.1/devops_client/cors/jobs_options_responses.go new file mode 100644 index 0000000..d546fbd --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cors/jobs_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// JobsOptionsReader is a Reader for the JobsOptions structure. +type JobsOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *JobsOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewJobsOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewJobsOptionsOK creates a JobsOptionsOK with default headers values +func NewJobsOptionsOK() *JobsOptionsOK { + return &JobsOptionsOK{} +} + +/*JobsOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type JobsOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *JobsOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /jobs][%d] jobsOptionsOK ", 200) +} + +func (o *JobsOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cors/service_options_parameters.go b/api/devops/v0.0.1/devops_client/cors/service_options_parameters.go new file mode 100644 index 0000000..fce4c24 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cors/service_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewServiceOptionsParams creates a new ServiceOptionsParams object +// with the default values initialized. +func NewServiceOptionsParams() *ServiceOptionsParams { + + return &ServiceOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewServiceOptionsParamsWithTimeout creates a new ServiceOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewServiceOptionsParamsWithTimeout(timeout time.Duration) *ServiceOptionsParams { + + return &ServiceOptionsParams{ + + timeout: timeout, + } +} + +// NewServiceOptionsParamsWithContext creates a new ServiceOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewServiceOptionsParamsWithContext(ctx context.Context) *ServiceOptionsParams { + + return &ServiceOptionsParams{ + + Context: ctx, + } +} + +// NewServiceOptionsParamsWithHTTPClient creates a new ServiceOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewServiceOptionsParamsWithHTTPClient(client *http.Client) *ServiceOptionsParams { + + return &ServiceOptionsParams{ + HTTPClient: client, + } +} + +/*ServiceOptionsParams contains all the parameters to send to the API endpoint +for the service options operation typically these are written to a http.Request +*/ +type ServiceOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the service options params +func (o *ServiceOptionsParams) WithTimeout(timeout time.Duration) *ServiceOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the service options params +func (o *ServiceOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the service options params +func (o *ServiceOptionsParams) WithContext(ctx context.Context) *ServiceOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the service options params +func (o *ServiceOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the service options params +func (o *ServiceOptionsParams) WithHTTPClient(client *http.Client) *ServiceOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the service options params +func (o *ServiceOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ServiceOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cors/service_options_responses.go b/api/devops/v0.0.1/devops_client/cors/service_options_responses.go new file mode 100644 index 0000000..92b0086 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cors/service_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// ServiceOptionsReader is a Reader for the ServiceOptions structure. +type ServiceOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ServiceOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewServiceOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewServiceOptionsOK creates a ServiceOptionsOK with default headers values +func NewServiceOptionsOK() *ServiceOptionsOK { + return &ServiceOptionsOK{} +} + +/*ServiceOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type ServiceOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *ServiceOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /services/observable][%d] serviceOptionsOK ", 200) +} + +func (o *ServiceOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cors/services_options_parameters.go b/api/devops/v0.0.1/devops_client/cors/services_options_parameters.go new file mode 100644 index 0000000..14a3167 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cors/services_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewServicesOptionsParams creates a new ServicesOptionsParams object +// with the default values initialized. +func NewServicesOptionsParams() *ServicesOptionsParams { + + return &ServicesOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewServicesOptionsParamsWithTimeout creates a new ServicesOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewServicesOptionsParamsWithTimeout(timeout time.Duration) *ServicesOptionsParams { + + return &ServicesOptionsParams{ + + timeout: timeout, + } +} + +// NewServicesOptionsParamsWithContext creates a new ServicesOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewServicesOptionsParamsWithContext(ctx context.Context) *ServicesOptionsParams { + + return &ServicesOptionsParams{ + + Context: ctx, + } +} + +// NewServicesOptionsParamsWithHTTPClient creates a new ServicesOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewServicesOptionsParamsWithHTTPClient(client *http.Client) *ServicesOptionsParams { + + return &ServicesOptionsParams{ + HTTPClient: client, + } +} + +/*ServicesOptionsParams contains all the parameters to send to the API endpoint +for the services options operation typically these are written to a http.Request +*/ +type ServicesOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the services options params +func (o *ServicesOptionsParams) WithTimeout(timeout time.Duration) *ServicesOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the services options params +func (o *ServicesOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the services options params +func (o *ServicesOptionsParams) WithContext(ctx context.Context) *ServicesOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the services options params +func (o *ServicesOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the services options params +func (o *ServicesOptionsParams) WithHTTPClient(client *http.Client) *ServicesOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the services options params +func (o *ServicesOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ServicesOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cors/services_options_responses.go b/api/devops/v0.0.1/devops_client/cors/services_options_responses.go new file mode 100644 index 0000000..69f9f80 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cors/services_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// ServicesOptionsReader is a Reader for the ServicesOptions structure. +type ServicesOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ServicesOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewServicesOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewServicesOptionsOK creates a ServicesOptionsOK with default headers values +func NewServicesOptionsOK() *ServicesOptionsOK { + return &ServicesOptionsOK{} +} + +/*ServicesOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type ServicesOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *ServicesOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /services][%d] servicesOptionsOK ", 200) +} + +func (o *ServicesOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cors/template_options_parameters.go b/api/devops/v0.0.1/devops_client/cors/template_options_parameters.go new file mode 100644 index 0000000..f1b5627 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cors/template_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewTemplateOptionsParams creates a new TemplateOptionsParams object +// with the default values initialized. +func NewTemplateOptionsParams() *TemplateOptionsParams { + + return &TemplateOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewTemplateOptionsParamsWithTimeout creates a new TemplateOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewTemplateOptionsParamsWithTimeout(timeout time.Duration) *TemplateOptionsParams { + + return &TemplateOptionsParams{ + + timeout: timeout, + } +} + +// NewTemplateOptionsParamsWithContext creates a new TemplateOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewTemplateOptionsParamsWithContext(ctx context.Context) *TemplateOptionsParams { + + return &TemplateOptionsParams{ + + Context: ctx, + } +} + +// NewTemplateOptionsParamsWithHTTPClient creates a new TemplateOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewTemplateOptionsParamsWithHTTPClient(client *http.Client) *TemplateOptionsParams { + + return &TemplateOptionsParams{ + HTTPClient: client, + } +} + +/*TemplateOptionsParams contains all the parameters to send to the API endpoint +for the template options operation typically these are written to a http.Request +*/ +type TemplateOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the template options params +func (o *TemplateOptionsParams) WithTimeout(timeout time.Duration) *TemplateOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the template options params +func (o *TemplateOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the template options params +func (o *TemplateOptionsParams) WithContext(ctx context.Context) *TemplateOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the template options params +func (o *TemplateOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the template options params +func (o *TemplateOptionsParams) WithHTTPClient(client *http.Client) *TemplateOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the template options params +func (o *TemplateOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *TemplateOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cors/template_options_responses.go b/api/devops/v0.0.1/devops_client/cors/template_options_responses.go new file mode 100644 index 0000000..61cec04 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cors/template_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// TemplateOptionsReader is a Reader for the TemplateOptions structure. +type TemplateOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TemplateOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewTemplateOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewTemplateOptionsOK creates a TemplateOptionsOK with default headers values +func NewTemplateOptionsOK() *TemplateOptionsOK { + return &TemplateOptionsOK{} +} + +/*TemplateOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type TemplateOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *TemplateOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /templates/observable][%d] templateOptionsOK ", 200) +} + +func (o *TemplateOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cors/templates_options_parameters.go b/api/devops/v0.0.1/devops_client/cors/templates_options_parameters.go new file mode 100644 index 0000000..50d8457 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cors/templates_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewTemplatesOptionsParams creates a new TemplatesOptionsParams object +// with the default values initialized. +func NewTemplatesOptionsParams() *TemplatesOptionsParams { + + return &TemplatesOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewTemplatesOptionsParamsWithTimeout creates a new TemplatesOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewTemplatesOptionsParamsWithTimeout(timeout time.Duration) *TemplatesOptionsParams { + + return &TemplatesOptionsParams{ + + timeout: timeout, + } +} + +// NewTemplatesOptionsParamsWithContext creates a new TemplatesOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewTemplatesOptionsParamsWithContext(ctx context.Context) *TemplatesOptionsParams { + + return &TemplatesOptionsParams{ + + Context: ctx, + } +} + +// NewTemplatesOptionsParamsWithHTTPClient creates a new TemplatesOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewTemplatesOptionsParamsWithHTTPClient(client *http.Client) *TemplatesOptionsParams { + + return &TemplatesOptionsParams{ + HTTPClient: client, + } +} + +/*TemplatesOptionsParams contains all the parameters to send to the API endpoint +for the templates options operation typically these are written to a http.Request +*/ +type TemplatesOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the templates options params +func (o *TemplatesOptionsParams) WithTimeout(timeout time.Duration) *TemplatesOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the templates options params +func (o *TemplatesOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the templates options params +func (o *TemplatesOptionsParams) WithContext(ctx context.Context) *TemplatesOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the templates options params +func (o *TemplatesOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the templates options params +func (o *TemplatesOptionsParams) WithHTTPClient(client *http.Client) *TemplatesOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the templates options params +func (o *TemplatesOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *TemplatesOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cors/templates_options_responses.go b/api/devops/v0.0.1/devops_client/cors/templates_options_responses.go new file mode 100644 index 0000000..01f303f --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cors/templates_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// TemplatesOptionsReader is a Reader for the TemplatesOptions structure. +type TemplatesOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TemplatesOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewTemplatesOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewTemplatesOptionsOK creates a TemplatesOptionsOK with default headers values +func NewTemplatesOptionsOK() *TemplatesOptionsOK { + return &TemplatesOptionsOK{} +} + +/*TemplatesOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type TemplatesOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *TemplatesOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /templates][%d] templatesOptionsOK ", 200) +} + +func (o *TemplatesOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cors/tenant_options_parameters.go b/api/devops/v0.0.1/devops_client/cors/tenant_options_parameters.go new file mode 100644 index 0000000..a909dc4 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cors/tenant_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewTenantOptionsParams creates a new TenantOptionsParams object +// with the default values initialized. +func NewTenantOptionsParams() *TenantOptionsParams { + + return &TenantOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewTenantOptionsParamsWithTimeout creates a new TenantOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewTenantOptionsParamsWithTimeout(timeout time.Duration) *TenantOptionsParams { + + return &TenantOptionsParams{ + + timeout: timeout, + } +} + +// NewTenantOptionsParamsWithContext creates a new TenantOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewTenantOptionsParamsWithContext(ctx context.Context) *TenantOptionsParams { + + return &TenantOptionsParams{ + + Context: ctx, + } +} + +// NewTenantOptionsParamsWithHTTPClient creates a new TenantOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewTenantOptionsParamsWithHTTPClient(client *http.Client) *TenantOptionsParams { + + return &TenantOptionsParams{ + HTTPClient: client, + } +} + +/*TenantOptionsParams contains all the parameters to send to the API endpoint +for the tenant options operation typically these are written to a http.Request +*/ +type TenantOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the tenant options params +func (o *TenantOptionsParams) WithTimeout(timeout time.Duration) *TenantOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenant options params +func (o *TenantOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenant options params +func (o *TenantOptionsParams) WithContext(ctx context.Context) *TenantOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenant options params +func (o *TenantOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenant options params +func (o *TenantOptionsParams) WithHTTPClient(client *http.Client) *TenantOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenant options params +func (o *TenantOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *TenantOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cors/tenant_options_responses.go b/api/devops/v0.0.1/devops_client/cors/tenant_options_responses.go new file mode 100644 index 0000000..7dabc9c --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cors/tenant_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// TenantOptionsReader is a Reader for the TenantOptions structure. +type TenantOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenantOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewTenantOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewTenantOptionsOK creates a TenantOptionsOK with default headers values +func NewTenantOptionsOK() *TenantOptionsOK { + return &TenantOptionsOK{} +} + +/*TenantOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type TenantOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *TenantOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /tenants/observable][%d] tenantOptionsOK ", 200) +} + +func (o *TenantOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cors/tenants_options_parameters.go b/api/devops/v0.0.1/devops_client/cors/tenants_options_parameters.go new file mode 100644 index 0000000..9771c3b --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cors/tenants_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewTenantsOptionsParams creates a new TenantsOptionsParams object +// with the default values initialized. +func NewTenantsOptionsParams() *TenantsOptionsParams { + + return &TenantsOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewTenantsOptionsParamsWithTimeout creates a new TenantsOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewTenantsOptionsParamsWithTimeout(timeout time.Duration) *TenantsOptionsParams { + + return &TenantsOptionsParams{ + + timeout: timeout, + } +} + +// NewTenantsOptionsParamsWithContext creates a new TenantsOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewTenantsOptionsParamsWithContext(ctx context.Context) *TenantsOptionsParams { + + return &TenantsOptionsParams{ + + Context: ctx, + } +} + +// NewTenantsOptionsParamsWithHTTPClient creates a new TenantsOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewTenantsOptionsParamsWithHTTPClient(client *http.Client) *TenantsOptionsParams { + + return &TenantsOptionsParams{ + HTTPClient: client, + } +} + +/*TenantsOptionsParams contains all the parameters to send to the API endpoint +for the tenants options operation typically these are written to a http.Request +*/ +type TenantsOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the tenants options params +func (o *TenantsOptionsParams) WithTimeout(timeout time.Duration) *TenantsOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tenants options params +func (o *TenantsOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tenants options params +func (o *TenantsOptionsParams) WithContext(ctx context.Context) *TenantsOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tenants options params +func (o *TenantsOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tenants options params +func (o *TenantsOptionsParams) WithHTTPClient(client *http.Client) *TenantsOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tenants options params +func (o *TenantsOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *TenantsOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cors/tenants_options_responses.go b/api/devops/v0.0.1/devops_client/cors/tenants_options_responses.go new file mode 100644 index 0000000..8d8dc73 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cors/tenants_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// TenantsOptionsReader is a Reader for the TenantsOptions structure. +type TenantsOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TenantsOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewTenantsOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewTenantsOptionsOK creates a TenantsOptionsOK with default headers values +func NewTenantsOptionsOK() *TenantsOptionsOK { + return &TenantsOptionsOK{} +} + +/*TenantsOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type TenantsOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *TenantsOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /tenants][%d] tenantsOptionsOK ", 200) +} + +func (o *TenantsOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cors/user_options_parameters.go b/api/devops/v0.0.1/devops_client/cors/user_options_parameters.go new file mode 100644 index 0000000..e17f8c3 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cors/user_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewUserOptionsParams creates a new UserOptionsParams object +// with the default values initialized. +func NewUserOptionsParams() *UserOptionsParams { + + return &UserOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewUserOptionsParamsWithTimeout creates a new UserOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewUserOptionsParamsWithTimeout(timeout time.Duration) *UserOptionsParams { + + return &UserOptionsParams{ + + timeout: timeout, + } +} + +// NewUserOptionsParamsWithContext creates a new UserOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewUserOptionsParamsWithContext(ctx context.Context) *UserOptionsParams { + + return &UserOptionsParams{ + + Context: ctx, + } +} + +// NewUserOptionsParamsWithHTTPClient creates a new UserOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewUserOptionsParamsWithHTTPClient(client *http.Client) *UserOptionsParams { + + return &UserOptionsParams{ + HTTPClient: client, + } +} + +/*UserOptionsParams contains all the parameters to send to the API endpoint +for the user options operation typically these are written to a http.Request +*/ +type UserOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the user options params +func (o *UserOptionsParams) WithTimeout(timeout time.Duration) *UserOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the user options params +func (o *UserOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the user options params +func (o *UserOptionsParams) WithContext(ctx context.Context) *UserOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the user options params +func (o *UserOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the user options params +func (o *UserOptionsParams) WithHTTPClient(client *http.Client) *UserOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the user options params +func (o *UserOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *UserOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cors/user_options_responses.go b/api/devops/v0.0.1/devops_client/cors/user_options_responses.go new file mode 100644 index 0000000..fa79da3 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cors/user_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// UserOptionsReader is a Reader for the UserOptions structure. +type UserOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *UserOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewUserOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewUserOptionsOK creates a UserOptionsOK with default headers values +func NewUserOptionsOK() *UserOptionsOK { + return &UserOptionsOK{} +} + +/*UserOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type UserOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *UserOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /users/observable][%d] userOptionsOK ", 200) +} + +func (o *UserOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cors/users_options_parameters.go b/api/devops/v0.0.1/devops_client/cors/users_options_parameters.go new file mode 100644 index 0000000..f444b01 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cors/users_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewUsersOptionsParams creates a new UsersOptionsParams object +// with the default values initialized. +func NewUsersOptionsParams() *UsersOptionsParams { + + return &UsersOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewUsersOptionsParamsWithTimeout creates a new UsersOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewUsersOptionsParamsWithTimeout(timeout time.Duration) *UsersOptionsParams { + + return &UsersOptionsParams{ + + timeout: timeout, + } +} + +// NewUsersOptionsParamsWithContext creates a new UsersOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewUsersOptionsParamsWithContext(ctx context.Context) *UsersOptionsParams { + + return &UsersOptionsParams{ + + Context: ctx, + } +} + +// NewUsersOptionsParamsWithHTTPClient creates a new UsersOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewUsersOptionsParamsWithHTTPClient(client *http.Client) *UsersOptionsParams { + + return &UsersOptionsParams{ + HTTPClient: client, + } +} + +/*UsersOptionsParams contains all the parameters to send to the API endpoint +for the users options operation typically these are written to a http.Request +*/ +type UsersOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the users options params +func (o *UsersOptionsParams) WithTimeout(timeout time.Duration) *UsersOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the users options params +func (o *UsersOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the users options params +func (o *UsersOptionsParams) WithContext(ctx context.Context) *UsersOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the users options params +func (o *UsersOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the users options params +func (o *UsersOptionsParams) WithHTTPClient(client *http.Client) *UsersOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the users options params +func (o *UsersOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *UsersOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/cors/users_options_responses.go b/api/devops/v0.0.1/devops_client/cors/users_options_responses.go new file mode 100644 index 0000000..a3fb3c6 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/cors/users_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// UsersOptionsReader is a Reader for the UsersOptions structure. +type UsersOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *UsersOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewUsersOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewUsersOptionsOK creates a UsersOptionsOK with default headers values +func NewUsersOptionsOK() *UsersOptionsOK { + return &UsersOptionsOK{} +} + +/*UsersOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type UsersOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *UsersOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /users][%d] usersOptionsOK ", 200) +} + +func (o *UsersOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/database/database_client.go b/api/devops/v0.0.1/devops_client/database/database_client.go new file mode 100644 index 0000000..a75a0f8 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/database/database_client.go @@ -0,0 +1,235 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package database + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new database API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for database API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetDatabase(params *GetDatabaseParams, authInfo runtime.ClientAuthInfoWriter) (*GetDatabaseOK, error) + + GetDatabases(params *GetDatabasesParams, authInfo runtime.ClientAuthInfoWriter) (*GetDatabasesOK, error) + + GetDatabasesObservable(params *GetDatabasesObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetDatabasesObservableOK, error) + + PostDatabases(params *PostDatabasesParams, authInfo runtime.ClientAuthInfoWriter) (*PostDatabasesOK, error) + + PutDatabases(params *PutDatabasesParams, authInfo runtime.ClientAuthInfoWriter) (*PutDatabasesOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetDatabase gets a single database object + + Return a single Database object from datastore as a Singleton +*/ +func (a *Client) GetDatabase(params *GetDatabaseParams, authInfo runtime.ClientAuthInfoWriter) (*GetDatabaseOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetDatabaseParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getDatabase", + Method: "GET", + PathPattern: "/databases/{databaseIdPath}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetDatabaseReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetDatabaseOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getDatabase: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetDatabases gets a list databases + + Return a list of Database records from the datastore +*/ +func (a *Client) GetDatabases(params *GetDatabasesParams, authInfo runtime.ClientAuthInfoWriter) (*GetDatabasesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetDatabasesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getDatabases", + Method: "GET", + PathPattern: "/databases", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetDatabasesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetDatabasesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getDatabases: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetDatabasesObservable gets databases in an observable array + + Returns a Database retrieval in a observable array +*/ +func (a *Client) GetDatabasesObservable(params *GetDatabasesObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetDatabasesObservableOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetDatabasesObservableParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getDatabasesObservable", + Method: "GET", + PathPattern: "/databases/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetDatabasesObservableReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetDatabasesObservableOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getDatabasesObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostDatabases creates new databases + + Create Databases in Taxnexus +*/ +func (a *Client) PostDatabases(params *PostDatabasesParams, authInfo runtime.ClientAuthInfoWriter) (*PostDatabasesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostDatabasesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postDatabases", + Method: "POST", + PathPattern: "/databases", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostDatabasesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostDatabasesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postDatabases: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PutDatabases updates databases + + Update Database in Taxnexus +*/ +func (a *Client) PutDatabases(params *PutDatabasesParams, authInfo runtime.ClientAuthInfoWriter) (*PutDatabasesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPutDatabasesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "putDatabases", + Method: "PUT", + PathPattern: "/databases", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PutDatabasesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PutDatabasesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for putDatabases: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/devops/v0.0.1/devops_client/database/get_database_parameters.go b/api/devops/v0.0.1/devops_client/database/get_database_parameters.go new file mode 100644 index 0000000..3cc5071 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/database/get_database_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package database + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetDatabaseParams creates a new GetDatabaseParams object +// with the default values initialized. +func NewGetDatabaseParams() *GetDatabaseParams { + var () + return &GetDatabaseParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetDatabaseParamsWithTimeout creates a new GetDatabaseParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetDatabaseParamsWithTimeout(timeout time.Duration) *GetDatabaseParams { + var () + return &GetDatabaseParams{ + + timeout: timeout, + } +} + +// NewGetDatabaseParamsWithContext creates a new GetDatabaseParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetDatabaseParamsWithContext(ctx context.Context) *GetDatabaseParams { + var () + return &GetDatabaseParams{ + + Context: ctx, + } +} + +// NewGetDatabaseParamsWithHTTPClient creates a new GetDatabaseParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetDatabaseParamsWithHTTPClient(client *http.Client) *GetDatabaseParams { + var () + return &GetDatabaseParams{ + HTTPClient: client, + } +} + +/*GetDatabaseParams contains all the parameters to send to the API endpoint +for the get database operation typically these are written to a http.Request +*/ +type GetDatabaseParams struct { + + /*DatabaseIDPath + Taxnexus Record Id of a Database + + */ + DatabaseIDPath string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get database params +func (o *GetDatabaseParams) WithTimeout(timeout time.Duration) *GetDatabaseParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get database params +func (o *GetDatabaseParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get database params +func (o *GetDatabaseParams) WithContext(ctx context.Context) *GetDatabaseParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get database params +func (o *GetDatabaseParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get database params +func (o *GetDatabaseParams) WithHTTPClient(client *http.Client) *GetDatabaseParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get database params +func (o *GetDatabaseParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDatabaseIDPath adds the databaseIDPath to the get database params +func (o *GetDatabaseParams) WithDatabaseIDPath(databaseIDPath string) *GetDatabaseParams { + o.SetDatabaseIDPath(databaseIDPath) + return o +} + +// SetDatabaseIDPath adds the databaseIdPath to the get database params +func (o *GetDatabaseParams) SetDatabaseIDPath(databaseIDPath string) { + o.DatabaseIDPath = databaseIDPath +} + +// WriteToRequest writes these params to a swagger request +func (o *GetDatabaseParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param databaseIdPath + if err := r.SetPathParam("databaseIdPath", o.DatabaseIDPath); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/database/get_database_responses.go b/api/devops/v0.0.1/devops_client/database/get_database_responses.go new file mode 100644 index 0000000..fb9f6ac --- /dev/null +++ b/api/devops/v0.0.1/devops_client/database/get_database_responses.go @@ -0,0 +1,313 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package database + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// GetDatabaseReader is a Reader for the GetDatabase structure. +type GetDatabaseReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetDatabaseReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetDatabaseOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetDatabaseUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetDatabaseForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetDatabaseNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetDatabaseUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetDatabaseInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetDatabaseOK creates a GetDatabaseOK with default headers values +func NewGetDatabaseOK() *GetDatabaseOK { + return &GetDatabaseOK{} +} + +/*GetDatabaseOK handles this case with default header values. + +Single Database record response +*/ +type GetDatabaseOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Database +} + +func (o *GetDatabaseOK) Error() string { + return fmt.Sprintf("[GET /databases/{databaseIdPath}][%d] getDatabaseOK %+v", 200, o.Payload) +} + +func (o *GetDatabaseOK) GetPayload() *devops_models.Database { + return o.Payload +} + +func (o *GetDatabaseOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Database) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetDatabaseUnauthorized creates a GetDatabaseUnauthorized with default headers values +func NewGetDatabaseUnauthorized() *GetDatabaseUnauthorized { + return &GetDatabaseUnauthorized{} +} + +/*GetDatabaseUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetDatabaseUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetDatabaseUnauthorized) Error() string { + return fmt.Sprintf("[GET /databases/{databaseIdPath}][%d] getDatabaseUnauthorized %+v", 401, o.Payload) +} + +func (o *GetDatabaseUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetDatabaseUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetDatabaseForbidden creates a GetDatabaseForbidden with default headers values +func NewGetDatabaseForbidden() *GetDatabaseForbidden { + return &GetDatabaseForbidden{} +} + +/*GetDatabaseForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetDatabaseForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetDatabaseForbidden) Error() string { + return fmt.Sprintf("[GET /databases/{databaseIdPath}][%d] getDatabaseForbidden %+v", 403, o.Payload) +} + +func (o *GetDatabaseForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetDatabaseForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetDatabaseNotFound creates a GetDatabaseNotFound with default headers values +func NewGetDatabaseNotFound() *GetDatabaseNotFound { + return &GetDatabaseNotFound{} +} + +/*GetDatabaseNotFound handles this case with default header values. + +Resource was not found +*/ +type GetDatabaseNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetDatabaseNotFound) Error() string { + return fmt.Sprintf("[GET /databases/{databaseIdPath}][%d] getDatabaseNotFound %+v", 404, o.Payload) +} + +func (o *GetDatabaseNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetDatabaseNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetDatabaseUnprocessableEntity creates a GetDatabaseUnprocessableEntity with default headers values +func NewGetDatabaseUnprocessableEntity() *GetDatabaseUnprocessableEntity { + return &GetDatabaseUnprocessableEntity{} +} + +/*GetDatabaseUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetDatabaseUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetDatabaseUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /databases/{databaseIdPath}][%d] getDatabaseUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetDatabaseUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetDatabaseUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetDatabaseInternalServerError creates a GetDatabaseInternalServerError with default headers values +func NewGetDatabaseInternalServerError() *GetDatabaseInternalServerError { + return &GetDatabaseInternalServerError{} +} + +/*GetDatabaseInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetDatabaseInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetDatabaseInternalServerError) Error() string { + return fmt.Sprintf("[GET /databases/{databaseIdPath}][%d] getDatabaseInternalServerError %+v", 500, o.Payload) +} + +func (o *GetDatabaseInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetDatabaseInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/database/get_databases_observable_parameters.go b/api/devops/v0.0.1/devops_client/database/get_databases_observable_parameters.go new file mode 100644 index 0000000..f8fd2e7 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/database/get_databases_observable_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package database + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetDatabasesObservableParams creates a new GetDatabasesObservableParams object +// with the default values initialized. +func NewGetDatabasesObservableParams() *GetDatabasesObservableParams { + + return &GetDatabasesObservableParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetDatabasesObservableParamsWithTimeout creates a new GetDatabasesObservableParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetDatabasesObservableParamsWithTimeout(timeout time.Duration) *GetDatabasesObservableParams { + + return &GetDatabasesObservableParams{ + + timeout: timeout, + } +} + +// NewGetDatabasesObservableParamsWithContext creates a new GetDatabasesObservableParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetDatabasesObservableParamsWithContext(ctx context.Context) *GetDatabasesObservableParams { + + return &GetDatabasesObservableParams{ + + Context: ctx, + } +} + +// NewGetDatabasesObservableParamsWithHTTPClient creates a new GetDatabasesObservableParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetDatabasesObservableParamsWithHTTPClient(client *http.Client) *GetDatabasesObservableParams { + + return &GetDatabasesObservableParams{ + HTTPClient: client, + } +} + +/*GetDatabasesObservableParams contains all the parameters to send to the API endpoint +for the get databases observable operation typically these are written to a http.Request +*/ +type GetDatabasesObservableParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get databases observable params +func (o *GetDatabasesObservableParams) WithTimeout(timeout time.Duration) *GetDatabasesObservableParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get databases observable params +func (o *GetDatabasesObservableParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get databases observable params +func (o *GetDatabasesObservableParams) WithContext(ctx context.Context) *GetDatabasesObservableParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get databases observable params +func (o *GetDatabasesObservableParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get databases observable params +func (o *GetDatabasesObservableParams) WithHTTPClient(client *http.Client) *GetDatabasesObservableParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get databases observable params +func (o *GetDatabasesObservableParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *GetDatabasesObservableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/database/get_databases_observable_responses.go b/api/devops/v0.0.1/devops_client/database/get_databases_observable_responses.go new file mode 100644 index 0000000..716fd69 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/database/get_databases_observable_responses.go @@ -0,0 +1,311 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package database + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// GetDatabasesObservableReader is a Reader for the GetDatabasesObservable structure. +type GetDatabasesObservableReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetDatabasesObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetDatabasesObservableOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetDatabasesObservableUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetDatabasesObservableForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetDatabasesObservableNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetDatabasesObservableUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetDatabasesObservableInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetDatabasesObservableOK creates a GetDatabasesObservableOK with default headers values +func NewGetDatabasesObservableOK() *GetDatabasesObservableOK { + return &GetDatabasesObservableOK{} +} + +/*GetDatabasesObservableOK handles this case with default header values. + +Single Database record response +*/ +type GetDatabasesObservableOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload []*devops_models.Database +} + +func (o *GetDatabasesObservableOK) Error() string { + return fmt.Sprintf("[GET /databases/observable][%d] getDatabasesObservableOK %+v", 200, o.Payload) +} + +func (o *GetDatabasesObservableOK) GetPayload() []*devops_models.Database { + return o.Payload +} + +func (o *GetDatabasesObservableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetDatabasesObservableUnauthorized creates a GetDatabasesObservableUnauthorized with default headers values +func NewGetDatabasesObservableUnauthorized() *GetDatabasesObservableUnauthorized { + return &GetDatabasesObservableUnauthorized{} +} + +/*GetDatabasesObservableUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetDatabasesObservableUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetDatabasesObservableUnauthorized) Error() string { + return fmt.Sprintf("[GET /databases/observable][%d] getDatabasesObservableUnauthorized %+v", 401, o.Payload) +} + +func (o *GetDatabasesObservableUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetDatabasesObservableUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetDatabasesObservableForbidden creates a GetDatabasesObservableForbidden with default headers values +func NewGetDatabasesObservableForbidden() *GetDatabasesObservableForbidden { + return &GetDatabasesObservableForbidden{} +} + +/*GetDatabasesObservableForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetDatabasesObservableForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetDatabasesObservableForbidden) Error() string { + return fmt.Sprintf("[GET /databases/observable][%d] getDatabasesObservableForbidden %+v", 403, o.Payload) +} + +func (o *GetDatabasesObservableForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetDatabasesObservableForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetDatabasesObservableNotFound creates a GetDatabasesObservableNotFound with default headers values +func NewGetDatabasesObservableNotFound() *GetDatabasesObservableNotFound { + return &GetDatabasesObservableNotFound{} +} + +/*GetDatabasesObservableNotFound handles this case with default header values. + +Resource was not found +*/ +type GetDatabasesObservableNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetDatabasesObservableNotFound) Error() string { + return fmt.Sprintf("[GET /databases/observable][%d] getDatabasesObservableNotFound %+v", 404, o.Payload) +} + +func (o *GetDatabasesObservableNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetDatabasesObservableNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetDatabasesObservableUnprocessableEntity creates a GetDatabasesObservableUnprocessableEntity with default headers values +func NewGetDatabasesObservableUnprocessableEntity() *GetDatabasesObservableUnprocessableEntity { + return &GetDatabasesObservableUnprocessableEntity{} +} + +/*GetDatabasesObservableUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetDatabasesObservableUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetDatabasesObservableUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /databases/observable][%d] getDatabasesObservableUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetDatabasesObservableUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetDatabasesObservableUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetDatabasesObservableInternalServerError creates a GetDatabasesObservableInternalServerError with default headers values +func NewGetDatabasesObservableInternalServerError() *GetDatabasesObservableInternalServerError { + return &GetDatabasesObservableInternalServerError{} +} + +/*GetDatabasesObservableInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetDatabasesObservableInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetDatabasesObservableInternalServerError) Error() string { + return fmt.Sprintf("[GET /databases/observable][%d] getDatabasesObservableInternalServerError %+v", 500, o.Payload) +} + +func (o *GetDatabasesObservableInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetDatabasesObservableInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/database/get_databases_parameters.go b/api/devops/v0.0.1/devops_client/database/get_databases_parameters.go new file mode 100644 index 0000000..91884c7 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/database/get_databases_parameters.go @@ -0,0 +1,247 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package database + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetDatabasesParams creates a new GetDatabasesParams object +// with the default values initialized. +func NewGetDatabasesParams() *GetDatabasesParams { + var () + return &GetDatabasesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetDatabasesParamsWithTimeout creates a new GetDatabasesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetDatabasesParamsWithTimeout(timeout time.Duration) *GetDatabasesParams { + var () + return &GetDatabasesParams{ + + timeout: timeout, + } +} + +// NewGetDatabasesParamsWithContext creates a new GetDatabasesParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetDatabasesParamsWithContext(ctx context.Context) *GetDatabasesParams { + var () + return &GetDatabasesParams{ + + Context: ctx, + } +} + +// NewGetDatabasesParamsWithHTTPClient creates a new GetDatabasesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetDatabasesParamsWithHTTPClient(client *http.Client) *GetDatabasesParams { + var () + return &GetDatabasesParams{ + HTTPClient: client, + } +} + +/*GetDatabasesParams contains all the parameters to send to the API endpoint +for the get databases operation typically these are written to a http.Request +*/ +type GetDatabasesParams struct { + + /*CompanyID + Taxnexus Record Id of a Company + + */ + CompanyID *string + /*DatabaseID + Taxnexus Record Id of a Database + + */ + DatabaseID *string + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get databases params +func (o *GetDatabasesParams) WithTimeout(timeout time.Duration) *GetDatabasesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get databases params +func (o *GetDatabasesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get databases params +func (o *GetDatabasesParams) WithContext(ctx context.Context) *GetDatabasesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get databases params +func (o *GetDatabasesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get databases params +func (o *GetDatabasesParams) WithHTTPClient(client *http.Client) *GetDatabasesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get databases params +func (o *GetDatabasesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCompanyID adds the companyID to the get databases params +func (o *GetDatabasesParams) WithCompanyID(companyID *string) *GetDatabasesParams { + o.SetCompanyID(companyID) + return o +} + +// SetCompanyID adds the companyId to the get databases params +func (o *GetDatabasesParams) SetCompanyID(companyID *string) { + o.CompanyID = companyID +} + +// WithDatabaseID adds the databaseID to the get databases params +func (o *GetDatabasesParams) WithDatabaseID(databaseID *string) *GetDatabasesParams { + o.SetDatabaseID(databaseID) + return o +} + +// SetDatabaseID adds the databaseId to the get databases params +func (o *GetDatabasesParams) SetDatabaseID(databaseID *string) { + o.DatabaseID = databaseID +} + +// WithLimit adds the limit to the get databases params +func (o *GetDatabasesParams) WithLimit(limit *int64) *GetDatabasesParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get databases params +func (o *GetDatabasesParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get databases params +func (o *GetDatabasesParams) WithOffset(offset *int64) *GetDatabasesParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get databases params +func (o *GetDatabasesParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *GetDatabasesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CompanyID != nil { + + // query param companyId + var qrCompanyID string + if o.CompanyID != nil { + qrCompanyID = *o.CompanyID + } + qCompanyID := qrCompanyID + if qCompanyID != "" { + if err := r.SetQueryParam("companyId", qCompanyID); err != nil { + return err + } + } + + } + + if o.DatabaseID != nil { + + // query param databaseId + var qrDatabaseID string + if o.DatabaseID != nil { + qrDatabaseID = *o.DatabaseID + } + qDatabaseID := qrDatabaseID + if qDatabaseID != "" { + if err := r.SetQueryParam("databaseId", qDatabaseID); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/database/get_databases_responses.go b/api/devops/v0.0.1/devops_client/database/get_databases_responses.go new file mode 100644 index 0000000..fa0fc08 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/database/get_databases_responses.go @@ -0,0 +1,308 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package database + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// GetDatabasesReader is a Reader for the GetDatabases structure. +type GetDatabasesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetDatabasesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetDatabasesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetDatabasesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetDatabasesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetDatabasesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetDatabasesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetDatabasesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetDatabasesOK creates a GetDatabasesOK with default headers values +func NewGetDatabasesOK() *GetDatabasesOK { + return &GetDatabasesOK{} +} + +/*GetDatabasesOK handles this case with default header values. + +Taxnexus Response with Database objects +*/ +type GetDatabasesOK struct { + AccessControlAllowOrigin string + + Payload *devops_models.DatabaseResponse +} + +func (o *GetDatabasesOK) Error() string { + return fmt.Sprintf("[GET /databases][%d] getDatabasesOK %+v", 200, o.Payload) +} + +func (o *GetDatabasesOK) GetPayload() *devops_models.DatabaseResponse { + return o.Payload +} + +func (o *GetDatabasesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.DatabaseResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetDatabasesUnauthorized creates a GetDatabasesUnauthorized with default headers values +func NewGetDatabasesUnauthorized() *GetDatabasesUnauthorized { + return &GetDatabasesUnauthorized{} +} + +/*GetDatabasesUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetDatabasesUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetDatabasesUnauthorized) Error() string { + return fmt.Sprintf("[GET /databases][%d] getDatabasesUnauthorized %+v", 401, o.Payload) +} + +func (o *GetDatabasesUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetDatabasesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetDatabasesForbidden creates a GetDatabasesForbidden with default headers values +func NewGetDatabasesForbidden() *GetDatabasesForbidden { + return &GetDatabasesForbidden{} +} + +/*GetDatabasesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetDatabasesForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetDatabasesForbidden) Error() string { + return fmt.Sprintf("[GET /databases][%d] getDatabasesForbidden %+v", 403, o.Payload) +} + +func (o *GetDatabasesForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetDatabasesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetDatabasesNotFound creates a GetDatabasesNotFound with default headers values +func NewGetDatabasesNotFound() *GetDatabasesNotFound { + return &GetDatabasesNotFound{} +} + +/*GetDatabasesNotFound handles this case with default header values. + +Resource was not found +*/ +type GetDatabasesNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetDatabasesNotFound) Error() string { + return fmt.Sprintf("[GET /databases][%d] getDatabasesNotFound %+v", 404, o.Payload) +} + +func (o *GetDatabasesNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetDatabasesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetDatabasesUnprocessableEntity creates a GetDatabasesUnprocessableEntity with default headers values +func NewGetDatabasesUnprocessableEntity() *GetDatabasesUnprocessableEntity { + return &GetDatabasesUnprocessableEntity{} +} + +/*GetDatabasesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetDatabasesUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetDatabasesUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /databases][%d] getDatabasesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetDatabasesUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetDatabasesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetDatabasesInternalServerError creates a GetDatabasesInternalServerError with default headers values +func NewGetDatabasesInternalServerError() *GetDatabasesInternalServerError { + return &GetDatabasesInternalServerError{} +} + +/*GetDatabasesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetDatabasesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetDatabasesInternalServerError) Error() string { + return fmt.Sprintf("[GET /databases][%d] getDatabasesInternalServerError %+v", 500, o.Payload) +} + +func (o *GetDatabasesInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetDatabasesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/database/post_databases_parameters.go b/api/devops/v0.0.1/devops_client/database/post_databases_parameters.go new file mode 100644 index 0000000..8e270a9 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/database/post_databases_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package database + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// NewPostDatabasesParams creates a new PostDatabasesParams object +// with the default values initialized. +func NewPostDatabasesParams() *PostDatabasesParams { + var () + return &PostDatabasesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostDatabasesParamsWithTimeout creates a new PostDatabasesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostDatabasesParamsWithTimeout(timeout time.Duration) *PostDatabasesParams { + var () + return &PostDatabasesParams{ + + timeout: timeout, + } +} + +// NewPostDatabasesParamsWithContext creates a new PostDatabasesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostDatabasesParamsWithContext(ctx context.Context) *PostDatabasesParams { + var () + return &PostDatabasesParams{ + + Context: ctx, + } +} + +// NewPostDatabasesParamsWithHTTPClient creates a new PostDatabasesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostDatabasesParamsWithHTTPClient(client *http.Client) *PostDatabasesParams { + var () + return &PostDatabasesParams{ + HTTPClient: client, + } +} + +/*PostDatabasesParams contains all the parameters to send to the API endpoint +for the post databases operation typically these are written to a http.Request +*/ +type PostDatabasesParams struct { + + /*DatabaseRequest + An array of Database records + + */ + DatabaseRequest *devops_models.DatabaseRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post databases params +func (o *PostDatabasesParams) WithTimeout(timeout time.Duration) *PostDatabasesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post databases params +func (o *PostDatabasesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post databases params +func (o *PostDatabasesParams) WithContext(ctx context.Context) *PostDatabasesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post databases params +func (o *PostDatabasesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post databases params +func (o *PostDatabasesParams) WithHTTPClient(client *http.Client) *PostDatabasesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post databases params +func (o *PostDatabasesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDatabaseRequest adds the databaseRequest to the post databases params +func (o *PostDatabasesParams) WithDatabaseRequest(databaseRequest *devops_models.DatabaseRequest) *PostDatabasesParams { + o.SetDatabaseRequest(databaseRequest) + return o +} + +// SetDatabaseRequest adds the databaseRequest to the post databases params +func (o *PostDatabasesParams) SetDatabaseRequest(databaseRequest *devops_models.DatabaseRequest) { + o.DatabaseRequest = databaseRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostDatabasesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.DatabaseRequest != nil { + if err := r.SetBodyParam(o.DatabaseRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/database/post_databases_responses.go b/api/devops/v0.0.1/devops_client/database/post_databases_responses.go new file mode 100644 index 0000000..65d6c03 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/database/post_databases_responses.go @@ -0,0 +1,308 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package database + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// PostDatabasesReader is a Reader for the PostDatabases structure. +type PostDatabasesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostDatabasesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostDatabasesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostDatabasesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostDatabasesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostDatabasesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostDatabasesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostDatabasesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostDatabasesOK creates a PostDatabasesOK with default headers values +func NewPostDatabasesOK() *PostDatabasesOK { + return &PostDatabasesOK{} +} + +/*PostDatabasesOK handles this case with default header values. + +Taxnexus Response with Database objects +*/ +type PostDatabasesOK struct { + AccessControlAllowOrigin string + + Payload *devops_models.DatabaseResponse +} + +func (o *PostDatabasesOK) Error() string { + return fmt.Sprintf("[POST /databases][%d] postDatabasesOK %+v", 200, o.Payload) +} + +func (o *PostDatabasesOK) GetPayload() *devops_models.DatabaseResponse { + return o.Payload +} + +func (o *PostDatabasesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.DatabaseResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostDatabasesUnauthorized creates a PostDatabasesUnauthorized with default headers values +func NewPostDatabasesUnauthorized() *PostDatabasesUnauthorized { + return &PostDatabasesUnauthorized{} +} + +/*PostDatabasesUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostDatabasesUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *PostDatabasesUnauthorized) Error() string { + return fmt.Sprintf("[POST /databases][%d] postDatabasesUnauthorized %+v", 401, o.Payload) +} + +func (o *PostDatabasesUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostDatabasesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostDatabasesForbidden creates a PostDatabasesForbidden with default headers values +func NewPostDatabasesForbidden() *PostDatabasesForbidden { + return &PostDatabasesForbidden{} +} + +/*PostDatabasesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostDatabasesForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PostDatabasesForbidden) Error() string { + return fmt.Sprintf("[POST /databases][%d] postDatabasesForbidden %+v", 403, o.Payload) +} + +func (o *PostDatabasesForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostDatabasesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostDatabasesNotFound creates a PostDatabasesNotFound with default headers values +func NewPostDatabasesNotFound() *PostDatabasesNotFound { + return &PostDatabasesNotFound{} +} + +/*PostDatabasesNotFound handles this case with default header values. + +Resource was not found +*/ +type PostDatabasesNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PostDatabasesNotFound) Error() string { + return fmt.Sprintf("[POST /databases][%d] postDatabasesNotFound %+v", 404, o.Payload) +} + +func (o *PostDatabasesNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostDatabasesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostDatabasesUnprocessableEntity creates a PostDatabasesUnprocessableEntity with default headers values +func NewPostDatabasesUnprocessableEntity() *PostDatabasesUnprocessableEntity { + return &PostDatabasesUnprocessableEntity{} +} + +/*PostDatabasesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostDatabasesUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *PostDatabasesUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /databases][%d] postDatabasesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostDatabasesUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostDatabasesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostDatabasesInternalServerError creates a PostDatabasesInternalServerError with default headers values +func NewPostDatabasesInternalServerError() *PostDatabasesInternalServerError { + return &PostDatabasesInternalServerError{} +} + +/*PostDatabasesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostDatabasesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PostDatabasesInternalServerError) Error() string { + return fmt.Sprintf("[POST /databases][%d] postDatabasesInternalServerError %+v", 500, o.Payload) +} + +func (o *PostDatabasesInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostDatabasesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/database/put_databases_parameters.go b/api/devops/v0.0.1/devops_client/database/put_databases_parameters.go new file mode 100644 index 0000000..29ea3e1 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/database/put_databases_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package database + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// NewPutDatabasesParams creates a new PutDatabasesParams object +// with the default values initialized. +func NewPutDatabasesParams() *PutDatabasesParams { + var () + return &PutDatabasesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPutDatabasesParamsWithTimeout creates a new PutDatabasesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPutDatabasesParamsWithTimeout(timeout time.Duration) *PutDatabasesParams { + var () + return &PutDatabasesParams{ + + timeout: timeout, + } +} + +// NewPutDatabasesParamsWithContext creates a new PutDatabasesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPutDatabasesParamsWithContext(ctx context.Context) *PutDatabasesParams { + var () + return &PutDatabasesParams{ + + Context: ctx, + } +} + +// NewPutDatabasesParamsWithHTTPClient creates a new PutDatabasesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPutDatabasesParamsWithHTTPClient(client *http.Client) *PutDatabasesParams { + var () + return &PutDatabasesParams{ + HTTPClient: client, + } +} + +/*PutDatabasesParams contains all the parameters to send to the API endpoint +for the put databases operation typically these are written to a http.Request +*/ +type PutDatabasesParams struct { + + /*DatabaseRequest + An array of Database records + + */ + DatabaseRequest *devops_models.DatabaseRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the put databases params +func (o *PutDatabasesParams) WithTimeout(timeout time.Duration) *PutDatabasesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the put databases params +func (o *PutDatabasesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the put databases params +func (o *PutDatabasesParams) WithContext(ctx context.Context) *PutDatabasesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the put databases params +func (o *PutDatabasesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the put databases params +func (o *PutDatabasesParams) WithHTTPClient(client *http.Client) *PutDatabasesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the put databases params +func (o *PutDatabasesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDatabaseRequest adds the databaseRequest to the put databases params +func (o *PutDatabasesParams) WithDatabaseRequest(databaseRequest *devops_models.DatabaseRequest) *PutDatabasesParams { + o.SetDatabaseRequest(databaseRequest) + return o +} + +// SetDatabaseRequest adds the databaseRequest to the put databases params +func (o *PutDatabasesParams) SetDatabaseRequest(databaseRequest *devops_models.DatabaseRequest) { + o.DatabaseRequest = databaseRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PutDatabasesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.DatabaseRequest != nil { + if err := r.SetBodyParam(o.DatabaseRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/database/put_databases_responses.go b/api/devops/v0.0.1/devops_client/database/put_databases_responses.go new file mode 100644 index 0000000..c5fd2eb --- /dev/null +++ b/api/devops/v0.0.1/devops_client/database/put_databases_responses.go @@ -0,0 +1,308 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package database + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// PutDatabasesReader is a Reader for the PutDatabases structure. +type PutDatabasesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PutDatabasesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPutDatabasesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPutDatabasesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPutDatabasesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPutDatabasesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPutDatabasesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPutDatabasesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPutDatabasesOK creates a PutDatabasesOK with default headers values +func NewPutDatabasesOK() *PutDatabasesOK { + return &PutDatabasesOK{} +} + +/*PutDatabasesOK handles this case with default header values. + +Taxnexus Response with Database objects +*/ +type PutDatabasesOK struct { + AccessControlAllowOrigin string + + Payload *devops_models.DatabaseResponse +} + +func (o *PutDatabasesOK) Error() string { + return fmt.Sprintf("[PUT /databases][%d] putDatabasesOK %+v", 200, o.Payload) +} + +func (o *PutDatabasesOK) GetPayload() *devops_models.DatabaseResponse { + return o.Payload +} + +func (o *PutDatabasesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.DatabaseResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutDatabasesUnauthorized creates a PutDatabasesUnauthorized with default headers values +func NewPutDatabasesUnauthorized() *PutDatabasesUnauthorized { + return &PutDatabasesUnauthorized{} +} + +/*PutDatabasesUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PutDatabasesUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *PutDatabasesUnauthorized) Error() string { + return fmt.Sprintf("[PUT /databases][%d] putDatabasesUnauthorized %+v", 401, o.Payload) +} + +func (o *PutDatabasesUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutDatabasesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutDatabasesForbidden creates a PutDatabasesForbidden with default headers values +func NewPutDatabasesForbidden() *PutDatabasesForbidden { + return &PutDatabasesForbidden{} +} + +/*PutDatabasesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PutDatabasesForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PutDatabasesForbidden) Error() string { + return fmt.Sprintf("[PUT /databases][%d] putDatabasesForbidden %+v", 403, o.Payload) +} + +func (o *PutDatabasesForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutDatabasesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutDatabasesNotFound creates a PutDatabasesNotFound with default headers values +func NewPutDatabasesNotFound() *PutDatabasesNotFound { + return &PutDatabasesNotFound{} +} + +/*PutDatabasesNotFound handles this case with default header values. + +Resource was not found +*/ +type PutDatabasesNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PutDatabasesNotFound) Error() string { + return fmt.Sprintf("[PUT /databases][%d] putDatabasesNotFound %+v", 404, o.Payload) +} + +func (o *PutDatabasesNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutDatabasesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutDatabasesUnprocessableEntity creates a PutDatabasesUnprocessableEntity with default headers values +func NewPutDatabasesUnprocessableEntity() *PutDatabasesUnprocessableEntity { + return &PutDatabasesUnprocessableEntity{} +} + +/*PutDatabasesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PutDatabasesUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *PutDatabasesUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /databases][%d] putDatabasesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutDatabasesUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutDatabasesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutDatabasesInternalServerError creates a PutDatabasesInternalServerError with default headers values +func NewPutDatabasesInternalServerError() *PutDatabasesInternalServerError { + return &PutDatabasesInternalServerError{} +} + +/*PutDatabasesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PutDatabasesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PutDatabasesInternalServerError) Error() string { + return fmt.Sprintf("[PUT /databases][%d] putDatabasesInternalServerError %+v", 500, o.Payload) +} + +func (o *PutDatabasesInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutDatabasesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/devops_client.go b/api/devops/v0.0.1/devops_client/devops_client.go new file mode 100644 index 0000000..d0a7248 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/devops_client.go @@ -0,0 +1,156 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_client + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_client/cluster" + "github.com/taxnexus/lib/api/devops/devops_client/cors" + "github.com/taxnexus/lib/api/devops/devops_client/database" + "github.com/taxnexus/lib/api/devops/devops_client/ingest" + "github.com/taxnexus/lib/api/devops/devops_client/job" + "github.com/taxnexus/lib/api/devops/devops_client/service" + "github.com/taxnexus/lib/api/devops/devops_client/template" + "github.com/taxnexus/lib/api/devops/devops_client/tenant" + "github.com/taxnexus/lib/api/devops/devops_client/user" +) + +// Default devops HTTP client. +var Default = NewHTTPClient(nil) + +const ( + // DefaultHost is the default Host + // found in Meta (info) section of spec file + DefaultHost string = "devops.fabric.tnxs.net:8080" + // DefaultBasePath is the default BasePath + // found in Meta (info) section of spec file + DefaultBasePath string = "/v1" +) + +// DefaultSchemes are the default schemes found in Meta (info) section of spec file +var DefaultSchemes = []string{"http"} + +// NewHTTPClient creates a new devops HTTP client. +func NewHTTPClient(formats strfmt.Registry) *Devops { + return NewHTTPClientWithConfig(formats, nil) +} + +// NewHTTPClientWithConfig creates a new devops HTTP client, +// using a customizable transport config. +func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *Devops { + // ensure nullable parameters have default + if cfg == nil { + cfg = DefaultTransportConfig() + } + + // create transport and client + transport := httptransport.New(cfg.Host, cfg.BasePath, cfg.Schemes) + return New(transport, formats) +} + +// New creates a new devops client +func New(transport runtime.ClientTransport, formats strfmt.Registry) *Devops { + // ensure nullable parameters have default + if formats == nil { + formats = strfmt.Default + } + + cli := new(Devops) + cli.Transport = transport + cli.Cluster = cluster.New(transport, formats) + cli.Cors = cors.New(transport, formats) + cli.Database = database.New(transport, formats) + cli.Ingest = ingest.New(transport, formats) + cli.Job = job.New(transport, formats) + cli.Service = service.New(transport, formats) + cli.Template = template.New(transport, formats) + cli.Tenant = tenant.New(transport, formats) + cli.User = user.New(transport, formats) + return cli +} + +// DefaultTransportConfig creates a TransportConfig with the +// default settings taken from the meta section of the spec file. +func DefaultTransportConfig() *TransportConfig { + return &TransportConfig{ + Host: DefaultHost, + BasePath: DefaultBasePath, + Schemes: DefaultSchemes, + } +} + +// TransportConfig contains the transport related info, +// found in the meta section of the spec file. +type TransportConfig struct { + Host string + BasePath string + Schemes []string +} + +// WithHost overrides the default host, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithHost(host string) *TransportConfig { + cfg.Host = host + return cfg +} + +// WithBasePath overrides the default basePath, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithBasePath(basePath string) *TransportConfig { + cfg.BasePath = basePath + return cfg +} + +// WithSchemes overrides the default schemes, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { + cfg.Schemes = schemes + return cfg +} + +// Devops is a client for devops +type Devops struct { + Cluster cluster.ClientService + + Cors cors.ClientService + + Database database.ClientService + + Ingest ingest.ClientService + + Job job.ClientService + + Service service.ClientService + + Template template.ClientService + + Tenant tenant.ClientService + + User user.ClientService + + Transport runtime.ClientTransport +} + +// SetTransport changes the transport on the client and all its subresources +func (c *Devops) SetTransport(transport runtime.ClientTransport) { + c.Transport = transport + c.Cluster.SetTransport(transport) + c.Cors.SetTransport(transport) + c.Database.SetTransport(transport) + c.Ingest.SetTransport(transport) + c.Job.SetTransport(transport) + c.Service.SetTransport(transport) + c.Template.SetTransport(transport) + c.Tenant.SetTransport(transport) + c.User.SetTransport(transport) +} diff --git a/api/devops/v0.0.1/devops_client/ingest/get_ingest_parameters.go b/api/devops/v0.0.1/devops_client/ingest/get_ingest_parameters.go new file mode 100644 index 0000000..b02c019 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/ingest/get_ingest_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ingest + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetIngestParams creates a new GetIngestParams object +// with the default values initialized. +func NewGetIngestParams() *GetIngestParams { + var () + return &GetIngestParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetIngestParamsWithTimeout creates a new GetIngestParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetIngestParamsWithTimeout(timeout time.Duration) *GetIngestParams { + var () + return &GetIngestParams{ + + timeout: timeout, + } +} + +// NewGetIngestParamsWithContext creates a new GetIngestParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetIngestParamsWithContext(ctx context.Context) *GetIngestParams { + var () + return &GetIngestParams{ + + Context: ctx, + } +} + +// NewGetIngestParamsWithHTTPClient creates a new GetIngestParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetIngestParamsWithHTTPClient(client *http.Client) *GetIngestParams { + var () + return &GetIngestParams{ + HTTPClient: client, + } +} + +/*GetIngestParams contains all the parameters to send to the API endpoint +for the get ingest operation typically these are written to a http.Request +*/ +type GetIngestParams struct { + + /*IngestIDPath + Taxnexus Record Id of a Ingest + + */ + IngestIDPath string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get ingest params +func (o *GetIngestParams) WithTimeout(timeout time.Duration) *GetIngestParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get ingest params +func (o *GetIngestParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get ingest params +func (o *GetIngestParams) WithContext(ctx context.Context) *GetIngestParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get ingest params +func (o *GetIngestParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get ingest params +func (o *GetIngestParams) WithHTTPClient(client *http.Client) *GetIngestParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get ingest params +func (o *GetIngestParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithIngestIDPath adds the ingestIDPath to the get ingest params +func (o *GetIngestParams) WithIngestIDPath(ingestIDPath string) *GetIngestParams { + o.SetIngestIDPath(ingestIDPath) + return o +} + +// SetIngestIDPath adds the ingestIdPath to the get ingest params +func (o *GetIngestParams) SetIngestIDPath(ingestIDPath string) { + o.IngestIDPath = ingestIDPath +} + +// WriteToRequest writes these params to a swagger request +func (o *GetIngestParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param ingestIdPath + if err := r.SetPathParam("ingestIdPath", o.IngestIDPath); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/ingest/get_ingest_responses.go b/api/devops/v0.0.1/devops_client/ingest/get_ingest_responses.go new file mode 100644 index 0000000..bbccf21 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/ingest/get_ingest_responses.go @@ -0,0 +1,313 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ingest + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// GetIngestReader is a Reader for the GetIngest structure. +type GetIngestReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetIngestReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetIngestOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetIngestUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetIngestForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetIngestNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetIngestUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetIngestInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetIngestOK creates a GetIngestOK with default headers values +func NewGetIngestOK() *GetIngestOK { + return &GetIngestOK{} +} + +/*GetIngestOK handles this case with default header values. + +Single Ingest record response +*/ +type GetIngestOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Ingest +} + +func (o *GetIngestOK) Error() string { + return fmt.Sprintf("[GET /ingests/{ingestIdPath}][%d] getIngestOK %+v", 200, o.Payload) +} + +func (o *GetIngestOK) GetPayload() *devops_models.Ingest { + return o.Payload +} + +func (o *GetIngestOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Ingest) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetIngestUnauthorized creates a GetIngestUnauthorized with default headers values +func NewGetIngestUnauthorized() *GetIngestUnauthorized { + return &GetIngestUnauthorized{} +} + +/*GetIngestUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetIngestUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetIngestUnauthorized) Error() string { + return fmt.Sprintf("[GET /ingests/{ingestIdPath}][%d] getIngestUnauthorized %+v", 401, o.Payload) +} + +func (o *GetIngestUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetIngestUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetIngestForbidden creates a GetIngestForbidden with default headers values +func NewGetIngestForbidden() *GetIngestForbidden { + return &GetIngestForbidden{} +} + +/*GetIngestForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetIngestForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetIngestForbidden) Error() string { + return fmt.Sprintf("[GET /ingests/{ingestIdPath}][%d] getIngestForbidden %+v", 403, o.Payload) +} + +func (o *GetIngestForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetIngestForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetIngestNotFound creates a GetIngestNotFound with default headers values +func NewGetIngestNotFound() *GetIngestNotFound { + return &GetIngestNotFound{} +} + +/*GetIngestNotFound handles this case with default header values. + +Resource was not found +*/ +type GetIngestNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetIngestNotFound) Error() string { + return fmt.Sprintf("[GET /ingests/{ingestIdPath}][%d] getIngestNotFound %+v", 404, o.Payload) +} + +func (o *GetIngestNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetIngestNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetIngestUnprocessableEntity creates a GetIngestUnprocessableEntity with default headers values +func NewGetIngestUnprocessableEntity() *GetIngestUnprocessableEntity { + return &GetIngestUnprocessableEntity{} +} + +/*GetIngestUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetIngestUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetIngestUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /ingests/{ingestIdPath}][%d] getIngestUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetIngestUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetIngestUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetIngestInternalServerError creates a GetIngestInternalServerError with default headers values +func NewGetIngestInternalServerError() *GetIngestInternalServerError { + return &GetIngestInternalServerError{} +} + +/*GetIngestInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetIngestInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetIngestInternalServerError) Error() string { + return fmt.Sprintf("[GET /ingests/{ingestIdPath}][%d] getIngestInternalServerError %+v", 500, o.Payload) +} + +func (o *GetIngestInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetIngestInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/ingest/get_ingests_observable_parameters.go b/api/devops/v0.0.1/devops_client/ingest/get_ingests_observable_parameters.go new file mode 100644 index 0000000..3657077 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/ingest/get_ingests_observable_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ingest + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetIngestsObservableParams creates a new GetIngestsObservableParams object +// with the default values initialized. +func NewGetIngestsObservableParams() *GetIngestsObservableParams { + + return &GetIngestsObservableParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetIngestsObservableParamsWithTimeout creates a new GetIngestsObservableParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetIngestsObservableParamsWithTimeout(timeout time.Duration) *GetIngestsObservableParams { + + return &GetIngestsObservableParams{ + + timeout: timeout, + } +} + +// NewGetIngestsObservableParamsWithContext creates a new GetIngestsObservableParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetIngestsObservableParamsWithContext(ctx context.Context) *GetIngestsObservableParams { + + return &GetIngestsObservableParams{ + + Context: ctx, + } +} + +// NewGetIngestsObservableParamsWithHTTPClient creates a new GetIngestsObservableParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetIngestsObservableParamsWithHTTPClient(client *http.Client) *GetIngestsObservableParams { + + return &GetIngestsObservableParams{ + HTTPClient: client, + } +} + +/*GetIngestsObservableParams contains all the parameters to send to the API endpoint +for the get ingests observable operation typically these are written to a http.Request +*/ +type GetIngestsObservableParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get ingests observable params +func (o *GetIngestsObservableParams) WithTimeout(timeout time.Duration) *GetIngestsObservableParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get ingests observable params +func (o *GetIngestsObservableParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get ingests observable params +func (o *GetIngestsObservableParams) WithContext(ctx context.Context) *GetIngestsObservableParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get ingests observable params +func (o *GetIngestsObservableParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get ingests observable params +func (o *GetIngestsObservableParams) WithHTTPClient(client *http.Client) *GetIngestsObservableParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get ingests observable params +func (o *GetIngestsObservableParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *GetIngestsObservableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/ingest/get_ingests_observable_responses.go b/api/devops/v0.0.1/devops_client/ingest/get_ingests_observable_responses.go new file mode 100644 index 0000000..96fedd2 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/ingest/get_ingests_observable_responses.go @@ -0,0 +1,311 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ingest + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// GetIngestsObservableReader is a Reader for the GetIngestsObservable structure. +type GetIngestsObservableReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetIngestsObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetIngestsObservableOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetIngestsObservableUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetIngestsObservableForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetIngestsObservableNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetIngestsObservableUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetIngestsObservableInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetIngestsObservableOK creates a GetIngestsObservableOK with default headers values +func NewGetIngestsObservableOK() *GetIngestsObservableOK { + return &GetIngestsObservableOK{} +} + +/*GetIngestsObservableOK handles this case with default header values. + +Single Ingest record response +*/ +type GetIngestsObservableOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload []*devops_models.Ingest +} + +func (o *GetIngestsObservableOK) Error() string { + return fmt.Sprintf("[GET /ingests/observable][%d] getIngestsObservableOK %+v", 200, o.Payload) +} + +func (o *GetIngestsObservableOK) GetPayload() []*devops_models.Ingest { + return o.Payload +} + +func (o *GetIngestsObservableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetIngestsObservableUnauthorized creates a GetIngestsObservableUnauthorized with default headers values +func NewGetIngestsObservableUnauthorized() *GetIngestsObservableUnauthorized { + return &GetIngestsObservableUnauthorized{} +} + +/*GetIngestsObservableUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetIngestsObservableUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetIngestsObservableUnauthorized) Error() string { + return fmt.Sprintf("[GET /ingests/observable][%d] getIngestsObservableUnauthorized %+v", 401, o.Payload) +} + +func (o *GetIngestsObservableUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetIngestsObservableUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetIngestsObservableForbidden creates a GetIngestsObservableForbidden with default headers values +func NewGetIngestsObservableForbidden() *GetIngestsObservableForbidden { + return &GetIngestsObservableForbidden{} +} + +/*GetIngestsObservableForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetIngestsObservableForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetIngestsObservableForbidden) Error() string { + return fmt.Sprintf("[GET /ingests/observable][%d] getIngestsObservableForbidden %+v", 403, o.Payload) +} + +func (o *GetIngestsObservableForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetIngestsObservableForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetIngestsObservableNotFound creates a GetIngestsObservableNotFound with default headers values +func NewGetIngestsObservableNotFound() *GetIngestsObservableNotFound { + return &GetIngestsObservableNotFound{} +} + +/*GetIngestsObservableNotFound handles this case with default header values. + +Resource was not found +*/ +type GetIngestsObservableNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetIngestsObservableNotFound) Error() string { + return fmt.Sprintf("[GET /ingests/observable][%d] getIngestsObservableNotFound %+v", 404, o.Payload) +} + +func (o *GetIngestsObservableNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetIngestsObservableNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetIngestsObservableUnprocessableEntity creates a GetIngestsObservableUnprocessableEntity with default headers values +func NewGetIngestsObservableUnprocessableEntity() *GetIngestsObservableUnprocessableEntity { + return &GetIngestsObservableUnprocessableEntity{} +} + +/*GetIngestsObservableUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetIngestsObservableUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetIngestsObservableUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /ingests/observable][%d] getIngestsObservableUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetIngestsObservableUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetIngestsObservableUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetIngestsObservableInternalServerError creates a GetIngestsObservableInternalServerError with default headers values +func NewGetIngestsObservableInternalServerError() *GetIngestsObservableInternalServerError { + return &GetIngestsObservableInternalServerError{} +} + +/*GetIngestsObservableInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetIngestsObservableInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetIngestsObservableInternalServerError) Error() string { + return fmt.Sprintf("[GET /ingests/observable][%d] getIngestsObservableInternalServerError %+v", 500, o.Payload) +} + +func (o *GetIngestsObservableInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetIngestsObservableInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/ingest/get_ingests_parameters.go b/api/devops/v0.0.1/devops_client/ingest/get_ingests_parameters.go new file mode 100644 index 0000000..843ea8e --- /dev/null +++ b/api/devops/v0.0.1/devops_client/ingest/get_ingests_parameters.go @@ -0,0 +1,279 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ingest + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetIngestsParams creates a new GetIngestsParams object +// with the default values initialized. +func NewGetIngestsParams() *GetIngestsParams { + var () + return &GetIngestsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetIngestsParamsWithTimeout creates a new GetIngestsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetIngestsParamsWithTimeout(timeout time.Duration) *GetIngestsParams { + var () + return &GetIngestsParams{ + + timeout: timeout, + } +} + +// NewGetIngestsParamsWithContext creates a new GetIngestsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetIngestsParamsWithContext(ctx context.Context) *GetIngestsParams { + var () + return &GetIngestsParams{ + + Context: ctx, + } +} + +// NewGetIngestsParamsWithHTTPClient creates a new GetIngestsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetIngestsParamsWithHTTPClient(client *http.Client) *GetIngestsParams { + var () + return &GetIngestsParams{ + HTTPClient: client, + } +} + +/*GetIngestsParams contains all the parameters to send to the API endpoint +for the get ingests operation typically these are written to a http.Request +*/ +type GetIngestsParams struct { + + /*AccountID + Taxnexus Record Id of an Account + + */ + AccountID *string + /*CompanyID + Taxnexus Record Id of a Company + + */ + CompanyID *string + /*IngestID + Taxnexus Record Id of an Ingest + + */ + IngestID *string + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get ingests params +func (o *GetIngestsParams) WithTimeout(timeout time.Duration) *GetIngestsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get ingests params +func (o *GetIngestsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get ingests params +func (o *GetIngestsParams) WithContext(ctx context.Context) *GetIngestsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get ingests params +func (o *GetIngestsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get ingests params +func (o *GetIngestsParams) WithHTTPClient(client *http.Client) *GetIngestsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get ingests params +func (o *GetIngestsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAccountID adds the accountID to the get ingests params +func (o *GetIngestsParams) WithAccountID(accountID *string) *GetIngestsParams { + o.SetAccountID(accountID) + return o +} + +// SetAccountID adds the accountId to the get ingests params +func (o *GetIngestsParams) SetAccountID(accountID *string) { + o.AccountID = accountID +} + +// WithCompanyID adds the companyID to the get ingests params +func (o *GetIngestsParams) WithCompanyID(companyID *string) *GetIngestsParams { + o.SetCompanyID(companyID) + return o +} + +// SetCompanyID adds the companyId to the get ingests params +func (o *GetIngestsParams) SetCompanyID(companyID *string) { + o.CompanyID = companyID +} + +// WithIngestID adds the ingestID to the get ingests params +func (o *GetIngestsParams) WithIngestID(ingestID *string) *GetIngestsParams { + o.SetIngestID(ingestID) + return o +} + +// SetIngestID adds the ingestId to the get ingests params +func (o *GetIngestsParams) SetIngestID(ingestID *string) { + o.IngestID = ingestID +} + +// WithLimit adds the limit to the get ingests params +func (o *GetIngestsParams) WithLimit(limit *int64) *GetIngestsParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get ingests params +func (o *GetIngestsParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get ingests params +func (o *GetIngestsParams) WithOffset(offset *int64) *GetIngestsParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get ingests params +func (o *GetIngestsParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *GetIngestsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AccountID != nil { + + // query param accountId + var qrAccountID string + if o.AccountID != nil { + qrAccountID = *o.AccountID + } + qAccountID := qrAccountID + if qAccountID != "" { + if err := r.SetQueryParam("accountId", qAccountID); err != nil { + return err + } + } + + } + + if o.CompanyID != nil { + + // query param companyId + var qrCompanyID string + if o.CompanyID != nil { + qrCompanyID = *o.CompanyID + } + qCompanyID := qrCompanyID + if qCompanyID != "" { + if err := r.SetQueryParam("companyId", qCompanyID); err != nil { + return err + } + } + + } + + if o.IngestID != nil { + + // query param ingestId + var qrIngestID string + if o.IngestID != nil { + qrIngestID = *o.IngestID + } + qIngestID := qrIngestID + if qIngestID != "" { + if err := r.SetQueryParam("ingestId", qIngestID); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/ingest/get_ingests_responses.go b/api/devops/v0.0.1/devops_client/ingest/get_ingests_responses.go new file mode 100644 index 0000000..615e4a6 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/ingest/get_ingests_responses.go @@ -0,0 +1,313 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ingest + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// GetIngestsReader is a Reader for the GetIngests structure. +type GetIngestsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetIngestsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetIngestsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetIngestsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetIngestsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetIngestsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetIngestsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetIngestsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetIngestsOK creates a GetIngestsOK with default headers values +func NewGetIngestsOK() *GetIngestsOK { + return &GetIngestsOK{} +} + +/*GetIngestsOK handles this case with default header values. + +Taxnexus Response with Ingest objects +*/ +type GetIngestsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.IngestResponse +} + +func (o *GetIngestsOK) Error() string { + return fmt.Sprintf("[GET /ingests][%d] getIngestsOK %+v", 200, o.Payload) +} + +func (o *GetIngestsOK) GetPayload() *devops_models.IngestResponse { + return o.Payload +} + +func (o *GetIngestsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.IngestResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetIngestsUnauthorized creates a GetIngestsUnauthorized with default headers values +func NewGetIngestsUnauthorized() *GetIngestsUnauthorized { + return &GetIngestsUnauthorized{} +} + +/*GetIngestsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetIngestsUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetIngestsUnauthorized) Error() string { + return fmt.Sprintf("[GET /ingests][%d] getIngestsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetIngestsUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetIngestsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetIngestsForbidden creates a GetIngestsForbidden with default headers values +func NewGetIngestsForbidden() *GetIngestsForbidden { + return &GetIngestsForbidden{} +} + +/*GetIngestsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetIngestsForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetIngestsForbidden) Error() string { + return fmt.Sprintf("[GET /ingests][%d] getIngestsForbidden %+v", 403, o.Payload) +} + +func (o *GetIngestsForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetIngestsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetIngestsNotFound creates a GetIngestsNotFound with default headers values +func NewGetIngestsNotFound() *GetIngestsNotFound { + return &GetIngestsNotFound{} +} + +/*GetIngestsNotFound handles this case with default header values. + +Resource was not found +*/ +type GetIngestsNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetIngestsNotFound) Error() string { + return fmt.Sprintf("[GET /ingests][%d] getIngestsNotFound %+v", 404, o.Payload) +} + +func (o *GetIngestsNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetIngestsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetIngestsUnprocessableEntity creates a GetIngestsUnprocessableEntity with default headers values +func NewGetIngestsUnprocessableEntity() *GetIngestsUnprocessableEntity { + return &GetIngestsUnprocessableEntity{} +} + +/*GetIngestsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetIngestsUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetIngestsUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /ingests][%d] getIngestsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetIngestsUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetIngestsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetIngestsInternalServerError creates a GetIngestsInternalServerError with default headers values +func NewGetIngestsInternalServerError() *GetIngestsInternalServerError { + return &GetIngestsInternalServerError{} +} + +/*GetIngestsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetIngestsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetIngestsInternalServerError) Error() string { + return fmt.Sprintf("[GET /ingests][%d] getIngestsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetIngestsInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetIngestsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/ingest/ingest_client.go b/api/devops/v0.0.1/devops_client/ingest/ingest_client.go new file mode 100644 index 0000000..465178b --- /dev/null +++ b/api/devops/v0.0.1/devops_client/ingest/ingest_client.go @@ -0,0 +1,235 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ingest + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new ingest API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for ingest API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetIngest(params *GetIngestParams, authInfo runtime.ClientAuthInfoWriter) (*GetIngestOK, error) + + GetIngests(params *GetIngestsParams, authInfo runtime.ClientAuthInfoWriter) (*GetIngestsOK, error) + + GetIngestsObservable(params *GetIngestsObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetIngestsObservableOK, error) + + PostIngests(params *PostIngestsParams, authInfo runtime.ClientAuthInfoWriter) (*PostIngestsOK, error) + + PutIngests(params *PutIngestsParams, authInfo runtime.ClientAuthInfoWriter) (*PutIngestsOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetIngest gets a single ingest object + + Return a single Ingest object from datastore as a Singleton +*/ +func (a *Client) GetIngest(params *GetIngestParams, authInfo runtime.ClientAuthInfoWriter) (*GetIngestOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetIngestParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getIngest", + Method: "GET", + PathPattern: "/ingests/{ingestIdPath}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetIngestReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetIngestOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getIngest: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetIngests gets a list ingests + + Return a list of Ingest records +*/ +func (a *Client) GetIngests(params *GetIngestsParams, authInfo runtime.ClientAuthInfoWriter) (*GetIngestsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetIngestsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getIngests", + Method: "GET", + PathPattern: "/ingests", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetIngestsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetIngestsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getIngests: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetIngestsObservable gets ingests in an observable array + + Returns a Ingest retrieval in a observable array +*/ +func (a *Client) GetIngestsObservable(params *GetIngestsObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetIngestsObservableOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetIngestsObservableParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getIngestsObservable", + Method: "GET", + PathPattern: "/ingests/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetIngestsObservableReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetIngestsObservableOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getIngestsObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostIngests creates new ingests + + Create new Ingests +*/ +func (a *Client) PostIngests(params *PostIngestsParams, authInfo runtime.ClientAuthInfoWriter) (*PostIngestsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostIngestsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postIngests", + Method: "POST", + PathPattern: "/ingests", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostIngestsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostIngestsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postIngests: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PutIngests updates ingests + + Update Ingests +*/ +func (a *Client) PutIngests(params *PutIngestsParams, authInfo runtime.ClientAuthInfoWriter) (*PutIngestsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPutIngestsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "putIngests", + Method: "PUT", + PathPattern: "/ingests", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PutIngestsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PutIngestsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for putIngests: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/devops/v0.0.1/devops_client/ingest/post_ingests_parameters.go b/api/devops/v0.0.1/devops_client/ingest/post_ingests_parameters.go new file mode 100644 index 0000000..a413b1b --- /dev/null +++ b/api/devops/v0.0.1/devops_client/ingest/post_ingests_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ingest + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// NewPostIngestsParams creates a new PostIngestsParams object +// with the default values initialized. +func NewPostIngestsParams() *PostIngestsParams { + var () + return &PostIngestsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostIngestsParamsWithTimeout creates a new PostIngestsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostIngestsParamsWithTimeout(timeout time.Duration) *PostIngestsParams { + var () + return &PostIngestsParams{ + + timeout: timeout, + } +} + +// NewPostIngestsParamsWithContext creates a new PostIngestsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostIngestsParamsWithContext(ctx context.Context) *PostIngestsParams { + var () + return &PostIngestsParams{ + + Context: ctx, + } +} + +// NewPostIngestsParamsWithHTTPClient creates a new PostIngestsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostIngestsParamsWithHTTPClient(client *http.Client) *PostIngestsParams { + var () + return &PostIngestsParams{ + HTTPClient: client, + } +} + +/*PostIngestsParams contains all the parameters to send to the API endpoint +for the post ingests operation typically these are written to a http.Request +*/ +type PostIngestsParams struct { + + /*IngestRequest + An array of Ingest records + + */ + IngestRequest *devops_models.IngestRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post ingests params +func (o *PostIngestsParams) WithTimeout(timeout time.Duration) *PostIngestsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post ingests params +func (o *PostIngestsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post ingests params +func (o *PostIngestsParams) WithContext(ctx context.Context) *PostIngestsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post ingests params +func (o *PostIngestsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post ingests params +func (o *PostIngestsParams) WithHTTPClient(client *http.Client) *PostIngestsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post ingests params +func (o *PostIngestsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithIngestRequest adds the ingestRequest to the post ingests params +func (o *PostIngestsParams) WithIngestRequest(ingestRequest *devops_models.IngestRequest) *PostIngestsParams { + o.SetIngestRequest(ingestRequest) + return o +} + +// SetIngestRequest adds the ingestRequest to the post ingests params +func (o *PostIngestsParams) SetIngestRequest(ingestRequest *devops_models.IngestRequest) { + o.IngestRequest = ingestRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostIngestsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.IngestRequest != nil { + if err := r.SetBodyParam(o.IngestRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/ingest/post_ingests_responses.go b/api/devops/v0.0.1/devops_client/ingest/post_ingests_responses.go new file mode 100644 index 0000000..b4ee2c0 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/ingest/post_ingests_responses.go @@ -0,0 +1,313 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ingest + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// PostIngestsReader is a Reader for the PostIngests structure. +type PostIngestsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostIngestsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostIngestsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostIngestsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostIngestsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostIngestsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostIngestsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostIngestsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostIngestsOK creates a PostIngestsOK with default headers values +func NewPostIngestsOK() *PostIngestsOK { + return &PostIngestsOK{} +} + +/*PostIngestsOK handles this case with default header values. + +Taxnexus Response with Ingest objects +*/ +type PostIngestsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.IngestResponse +} + +func (o *PostIngestsOK) Error() string { + return fmt.Sprintf("[POST /ingests][%d] postIngestsOK %+v", 200, o.Payload) +} + +func (o *PostIngestsOK) GetPayload() *devops_models.IngestResponse { + return o.Payload +} + +func (o *PostIngestsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.IngestResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostIngestsUnauthorized creates a PostIngestsUnauthorized with default headers values +func NewPostIngestsUnauthorized() *PostIngestsUnauthorized { + return &PostIngestsUnauthorized{} +} + +/*PostIngestsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostIngestsUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *PostIngestsUnauthorized) Error() string { + return fmt.Sprintf("[POST /ingests][%d] postIngestsUnauthorized %+v", 401, o.Payload) +} + +func (o *PostIngestsUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostIngestsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostIngestsForbidden creates a PostIngestsForbidden with default headers values +func NewPostIngestsForbidden() *PostIngestsForbidden { + return &PostIngestsForbidden{} +} + +/*PostIngestsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostIngestsForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PostIngestsForbidden) Error() string { + return fmt.Sprintf("[POST /ingests][%d] postIngestsForbidden %+v", 403, o.Payload) +} + +func (o *PostIngestsForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostIngestsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostIngestsNotFound creates a PostIngestsNotFound with default headers values +func NewPostIngestsNotFound() *PostIngestsNotFound { + return &PostIngestsNotFound{} +} + +/*PostIngestsNotFound handles this case with default header values. + +Resource was not found +*/ +type PostIngestsNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PostIngestsNotFound) Error() string { + return fmt.Sprintf("[POST /ingests][%d] postIngestsNotFound %+v", 404, o.Payload) +} + +func (o *PostIngestsNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostIngestsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostIngestsUnprocessableEntity creates a PostIngestsUnprocessableEntity with default headers values +func NewPostIngestsUnprocessableEntity() *PostIngestsUnprocessableEntity { + return &PostIngestsUnprocessableEntity{} +} + +/*PostIngestsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostIngestsUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *PostIngestsUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /ingests][%d] postIngestsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostIngestsUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostIngestsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostIngestsInternalServerError creates a PostIngestsInternalServerError with default headers values +func NewPostIngestsInternalServerError() *PostIngestsInternalServerError { + return &PostIngestsInternalServerError{} +} + +/*PostIngestsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostIngestsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PostIngestsInternalServerError) Error() string { + return fmt.Sprintf("[POST /ingests][%d] postIngestsInternalServerError %+v", 500, o.Payload) +} + +func (o *PostIngestsInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostIngestsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/ingest/put_ingests_parameters.go b/api/devops/v0.0.1/devops_client/ingest/put_ingests_parameters.go new file mode 100644 index 0000000..1c3deca --- /dev/null +++ b/api/devops/v0.0.1/devops_client/ingest/put_ingests_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ingest + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// NewPutIngestsParams creates a new PutIngestsParams object +// with the default values initialized. +func NewPutIngestsParams() *PutIngestsParams { + var () + return &PutIngestsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPutIngestsParamsWithTimeout creates a new PutIngestsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPutIngestsParamsWithTimeout(timeout time.Duration) *PutIngestsParams { + var () + return &PutIngestsParams{ + + timeout: timeout, + } +} + +// NewPutIngestsParamsWithContext creates a new PutIngestsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPutIngestsParamsWithContext(ctx context.Context) *PutIngestsParams { + var () + return &PutIngestsParams{ + + Context: ctx, + } +} + +// NewPutIngestsParamsWithHTTPClient creates a new PutIngestsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPutIngestsParamsWithHTTPClient(client *http.Client) *PutIngestsParams { + var () + return &PutIngestsParams{ + HTTPClient: client, + } +} + +/*PutIngestsParams contains all the parameters to send to the API endpoint +for the put ingests operation typically these are written to a http.Request +*/ +type PutIngestsParams struct { + + /*IngestRequest + An array of Ingest records + + */ + IngestRequest *devops_models.IngestRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the put ingests params +func (o *PutIngestsParams) WithTimeout(timeout time.Duration) *PutIngestsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the put ingests params +func (o *PutIngestsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the put ingests params +func (o *PutIngestsParams) WithContext(ctx context.Context) *PutIngestsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the put ingests params +func (o *PutIngestsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the put ingests params +func (o *PutIngestsParams) WithHTTPClient(client *http.Client) *PutIngestsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the put ingests params +func (o *PutIngestsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithIngestRequest adds the ingestRequest to the put ingests params +func (o *PutIngestsParams) WithIngestRequest(ingestRequest *devops_models.IngestRequest) *PutIngestsParams { + o.SetIngestRequest(ingestRequest) + return o +} + +// SetIngestRequest adds the ingestRequest to the put ingests params +func (o *PutIngestsParams) SetIngestRequest(ingestRequest *devops_models.IngestRequest) { + o.IngestRequest = ingestRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PutIngestsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.IngestRequest != nil { + if err := r.SetBodyParam(o.IngestRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/ingest/put_ingests_responses.go b/api/devops/v0.0.1/devops_client/ingest/put_ingests_responses.go new file mode 100644 index 0000000..01232bc --- /dev/null +++ b/api/devops/v0.0.1/devops_client/ingest/put_ingests_responses.go @@ -0,0 +1,313 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ingest + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// PutIngestsReader is a Reader for the PutIngests structure. +type PutIngestsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PutIngestsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPutIngestsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPutIngestsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPutIngestsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPutIngestsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPutIngestsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPutIngestsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPutIngestsOK creates a PutIngestsOK with default headers values +func NewPutIngestsOK() *PutIngestsOK { + return &PutIngestsOK{} +} + +/*PutIngestsOK handles this case with default header values. + +Taxnexus Response with Ingest objects +*/ +type PutIngestsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.IngestResponse +} + +func (o *PutIngestsOK) Error() string { + return fmt.Sprintf("[PUT /ingests][%d] putIngestsOK %+v", 200, o.Payload) +} + +func (o *PutIngestsOK) GetPayload() *devops_models.IngestResponse { + return o.Payload +} + +func (o *PutIngestsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.IngestResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutIngestsUnauthorized creates a PutIngestsUnauthorized with default headers values +func NewPutIngestsUnauthorized() *PutIngestsUnauthorized { + return &PutIngestsUnauthorized{} +} + +/*PutIngestsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PutIngestsUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *PutIngestsUnauthorized) Error() string { + return fmt.Sprintf("[PUT /ingests][%d] putIngestsUnauthorized %+v", 401, o.Payload) +} + +func (o *PutIngestsUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutIngestsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutIngestsForbidden creates a PutIngestsForbidden with default headers values +func NewPutIngestsForbidden() *PutIngestsForbidden { + return &PutIngestsForbidden{} +} + +/*PutIngestsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PutIngestsForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PutIngestsForbidden) Error() string { + return fmt.Sprintf("[PUT /ingests][%d] putIngestsForbidden %+v", 403, o.Payload) +} + +func (o *PutIngestsForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutIngestsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutIngestsNotFound creates a PutIngestsNotFound with default headers values +func NewPutIngestsNotFound() *PutIngestsNotFound { + return &PutIngestsNotFound{} +} + +/*PutIngestsNotFound handles this case with default header values. + +Resource was not found +*/ +type PutIngestsNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PutIngestsNotFound) Error() string { + return fmt.Sprintf("[PUT /ingests][%d] putIngestsNotFound %+v", 404, o.Payload) +} + +func (o *PutIngestsNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutIngestsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutIngestsUnprocessableEntity creates a PutIngestsUnprocessableEntity with default headers values +func NewPutIngestsUnprocessableEntity() *PutIngestsUnprocessableEntity { + return &PutIngestsUnprocessableEntity{} +} + +/*PutIngestsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PutIngestsUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *PutIngestsUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /ingests][%d] putIngestsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutIngestsUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutIngestsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutIngestsInternalServerError creates a PutIngestsInternalServerError with default headers values +func NewPutIngestsInternalServerError() *PutIngestsInternalServerError { + return &PutIngestsInternalServerError{} +} + +/*PutIngestsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PutIngestsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PutIngestsInternalServerError) Error() string { + return fmt.Sprintf("[PUT /ingests][%d] putIngestsInternalServerError %+v", 500, o.Payload) +} + +func (o *PutIngestsInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutIngestsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/job/get_job_parameters.go b/api/devops/v0.0.1/devops_client/job/get_job_parameters.go new file mode 100644 index 0000000..f6e8136 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/job/get_job_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package job + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetJobParams creates a new GetJobParams object +// with the default values initialized. +func NewGetJobParams() *GetJobParams { + var () + return &GetJobParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetJobParamsWithTimeout creates a new GetJobParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetJobParamsWithTimeout(timeout time.Duration) *GetJobParams { + var () + return &GetJobParams{ + + timeout: timeout, + } +} + +// NewGetJobParamsWithContext creates a new GetJobParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetJobParamsWithContext(ctx context.Context) *GetJobParams { + var () + return &GetJobParams{ + + Context: ctx, + } +} + +// NewGetJobParamsWithHTTPClient creates a new GetJobParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetJobParamsWithHTTPClient(client *http.Client) *GetJobParams { + var () + return &GetJobParams{ + HTTPClient: client, + } +} + +/*GetJobParams contains all the parameters to send to the API endpoint +for the get job operation typically these are written to a http.Request +*/ +type GetJobParams struct { + + /*JobIDPath + Taxnexus Record Id of a Job + + */ + JobIDPath string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get job params +func (o *GetJobParams) WithTimeout(timeout time.Duration) *GetJobParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get job params +func (o *GetJobParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get job params +func (o *GetJobParams) WithContext(ctx context.Context) *GetJobParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get job params +func (o *GetJobParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get job params +func (o *GetJobParams) WithHTTPClient(client *http.Client) *GetJobParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get job params +func (o *GetJobParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithJobIDPath adds the jobIDPath to the get job params +func (o *GetJobParams) WithJobIDPath(jobIDPath string) *GetJobParams { + o.SetJobIDPath(jobIDPath) + return o +} + +// SetJobIDPath adds the jobIdPath to the get job params +func (o *GetJobParams) SetJobIDPath(jobIDPath string) { + o.JobIDPath = jobIDPath +} + +// WriteToRequest writes these params to a swagger request +func (o *GetJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param jobIdPath + if err := r.SetPathParam("jobIdPath", o.JobIDPath); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/job/get_job_responses.go b/api/devops/v0.0.1/devops_client/job/get_job_responses.go new file mode 100644 index 0000000..30229d6 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/job/get_job_responses.go @@ -0,0 +1,313 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package job + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// GetJobReader is a Reader for the GetJob structure. +type GetJobReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetJobOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetJobUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetJobForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetJobNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetJobUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetJobInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetJobOK creates a GetJobOK with default headers values +func NewGetJobOK() *GetJobOK { + return &GetJobOK{} +} + +/*GetJobOK handles this case with default header values. + +Single Job record response +*/ +type GetJobOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Job +} + +func (o *GetJobOK) Error() string { + return fmt.Sprintf("[GET /jobs/{jobIdPath}][%d] getJobOK %+v", 200, o.Payload) +} + +func (o *GetJobOK) GetPayload() *devops_models.Job { + return o.Payload +} + +func (o *GetJobOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Job) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetJobUnauthorized creates a GetJobUnauthorized with default headers values +func NewGetJobUnauthorized() *GetJobUnauthorized { + return &GetJobUnauthorized{} +} + +/*GetJobUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetJobUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetJobUnauthorized) Error() string { + return fmt.Sprintf("[GET /jobs/{jobIdPath}][%d] getJobUnauthorized %+v", 401, o.Payload) +} + +func (o *GetJobUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetJobUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetJobForbidden creates a GetJobForbidden with default headers values +func NewGetJobForbidden() *GetJobForbidden { + return &GetJobForbidden{} +} + +/*GetJobForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetJobForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetJobForbidden) Error() string { + return fmt.Sprintf("[GET /jobs/{jobIdPath}][%d] getJobForbidden %+v", 403, o.Payload) +} + +func (o *GetJobForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetJobForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetJobNotFound creates a GetJobNotFound with default headers values +func NewGetJobNotFound() *GetJobNotFound { + return &GetJobNotFound{} +} + +/*GetJobNotFound handles this case with default header values. + +Resource was not found +*/ +type GetJobNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetJobNotFound) Error() string { + return fmt.Sprintf("[GET /jobs/{jobIdPath}][%d] getJobNotFound %+v", 404, o.Payload) +} + +func (o *GetJobNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetJobNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetJobUnprocessableEntity creates a GetJobUnprocessableEntity with default headers values +func NewGetJobUnprocessableEntity() *GetJobUnprocessableEntity { + return &GetJobUnprocessableEntity{} +} + +/*GetJobUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetJobUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetJobUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /jobs/{jobIdPath}][%d] getJobUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetJobUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetJobUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetJobInternalServerError creates a GetJobInternalServerError with default headers values +func NewGetJobInternalServerError() *GetJobInternalServerError { + return &GetJobInternalServerError{} +} + +/*GetJobInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetJobInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetJobInternalServerError) Error() string { + return fmt.Sprintf("[GET /jobs/{jobIdPath}][%d] getJobInternalServerError %+v", 500, o.Payload) +} + +func (o *GetJobInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetJobInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/job/get_jobs_observable_parameters.go b/api/devops/v0.0.1/devops_client/job/get_jobs_observable_parameters.go new file mode 100644 index 0000000..92d5929 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/job/get_jobs_observable_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package job + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetJobsObservableParams creates a new GetJobsObservableParams object +// with the default values initialized. +func NewGetJobsObservableParams() *GetJobsObservableParams { + + return &GetJobsObservableParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetJobsObservableParamsWithTimeout creates a new GetJobsObservableParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetJobsObservableParamsWithTimeout(timeout time.Duration) *GetJobsObservableParams { + + return &GetJobsObservableParams{ + + timeout: timeout, + } +} + +// NewGetJobsObservableParamsWithContext creates a new GetJobsObservableParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetJobsObservableParamsWithContext(ctx context.Context) *GetJobsObservableParams { + + return &GetJobsObservableParams{ + + Context: ctx, + } +} + +// NewGetJobsObservableParamsWithHTTPClient creates a new GetJobsObservableParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetJobsObservableParamsWithHTTPClient(client *http.Client) *GetJobsObservableParams { + + return &GetJobsObservableParams{ + HTTPClient: client, + } +} + +/*GetJobsObservableParams contains all the parameters to send to the API endpoint +for the get jobs observable operation typically these are written to a http.Request +*/ +type GetJobsObservableParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get jobs observable params +func (o *GetJobsObservableParams) WithTimeout(timeout time.Duration) *GetJobsObservableParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get jobs observable params +func (o *GetJobsObservableParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get jobs observable params +func (o *GetJobsObservableParams) WithContext(ctx context.Context) *GetJobsObservableParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get jobs observable params +func (o *GetJobsObservableParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get jobs observable params +func (o *GetJobsObservableParams) WithHTTPClient(client *http.Client) *GetJobsObservableParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get jobs observable params +func (o *GetJobsObservableParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *GetJobsObservableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/job/get_jobs_observable_responses.go b/api/devops/v0.0.1/devops_client/job/get_jobs_observable_responses.go new file mode 100644 index 0000000..f067eed --- /dev/null +++ b/api/devops/v0.0.1/devops_client/job/get_jobs_observable_responses.go @@ -0,0 +1,311 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package job + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// GetJobsObservableReader is a Reader for the GetJobsObservable structure. +type GetJobsObservableReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetJobsObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetJobsObservableOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetJobsObservableUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetJobsObservableForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetJobsObservableNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetJobsObservableUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetJobsObservableInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetJobsObservableOK creates a GetJobsObservableOK with default headers values +func NewGetJobsObservableOK() *GetJobsObservableOK { + return &GetJobsObservableOK{} +} + +/*GetJobsObservableOK handles this case with default header values. + +Single Job record response +*/ +type GetJobsObservableOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload []*devops_models.Job +} + +func (o *GetJobsObservableOK) Error() string { + return fmt.Sprintf("[GET /jobs/observable][%d] getJobsObservableOK %+v", 200, o.Payload) +} + +func (o *GetJobsObservableOK) GetPayload() []*devops_models.Job { + return o.Payload +} + +func (o *GetJobsObservableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetJobsObservableUnauthorized creates a GetJobsObservableUnauthorized with default headers values +func NewGetJobsObservableUnauthorized() *GetJobsObservableUnauthorized { + return &GetJobsObservableUnauthorized{} +} + +/*GetJobsObservableUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetJobsObservableUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetJobsObservableUnauthorized) Error() string { + return fmt.Sprintf("[GET /jobs/observable][%d] getJobsObservableUnauthorized %+v", 401, o.Payload) +} + +func (o *GetJobsObservableUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetJobsObservableUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetJobsObservableForbidden creates a GetJobsObservableForbidden with default headers values +func NewGetJobsObservableForbidden() *GetJobsObservableForbidden { + return &GetJobsObservableForbidden{} +} + +/*GetJobsObservableForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetJobsObservableForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetJobsObservableForbidden) Error() string { + return fmt.Sprintf("[GET /jobs/observable][%d] getJobsObservableForbidden %+v", 403, o.Payload) +} + +func (o *GetJobsObservableForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetJobsObservableForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetJobsObservableNotFound creates a GetJobsObservableNotFound with default headers values +func NewGetJobsObservableNotFound() *GetJobsObservableNotFound { + return &GetJobsObservableNotFound{} +} + +/*GetJobsObservableNotFound handles this case with default header values. + +Resource was not found +*/ +type GetJobsObservableNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetJobsObservableNotFound) Error() string { + return fmt.Sprintf("[GET /jobs/observable][%d] getJobsObservableNotFound %+v", 404, o.Payload) +} + +func (o *GetJobsObservableNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetJobsObservableNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetJobsObservableUnprocessableEntity creates a GetJobsObservableUnprocessableEntity with default headers values +func NewGetJobsObservableUnprocessableEntity() *GetJobsObservableUnprocessableEntity { + return &GetJobsObservableUnprocessableEntity{} +} + +/*GetJobsObservableUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetJobsObservableUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetJobsObservableUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /jobs/observable][%d] getJobsObservableUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetJobsObservableUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetJobsObservableUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetJobsObservableInternalServerError creates a GetJobsObservableInternalServerError with default headers values +func NewGetJobsObservableInternalServerError() *GetJobsObservableInternalServerError { + return &GetJobsObservableInternalServerError{} +} + +/*GetJobsObservableInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetJobsObservableInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetJobsObservableInternalServerError) Error() string { + return fmt.Sprintf("[GET /jobs/observable][%d] getJobsObservableInternalServerError %+v", 500, o.Payload) +} + +func (o *GetJobsObservableInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetJobsObservableInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/job/get_jobs_parameters.go b/api/devops/v0.0.1/devops_client/job/get_jobs_parameters.go new file mode 100644 index 0000000..d787e9d --- /dev/null +++ b/api/devops/v0.0.1/devops_client/job/get_jobs_parameters.go @@ -0,0 +1,311 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package job + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetJobsParams creates a new GetJobsParams object +// with the default values initialized. +func NewGetJobsParams() *GetJobsParams { + var () + return &GetJobsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetJobsParamsWithTimeout creates a new GetJobsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetJobsParamsWithTimeout(timeout time.Duration) *GetJobsParams { + var () + return &GetJobsParams{ + + timeout: timeout, + } +} + +// NewGetJobsParamsWithContext creates a new GetJobsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetJobsParamsWithContext(ctx context.Context) *GetJobsParams { + var () + return &GetJobsParams{ + + Context: ctx, + } +} + +// NewGetJobsParamsWithHTTPClient creates a new GetJobsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetJobsParamsWithHTTPClient(client *http.Client) *GetJobsParams { + var () + return &GetJobsParams{ + HTTPClient: client, + } +} + +/*GetJobsParams contains all the parameters to send to the API endpoint +for the get jobs operation typically these are written to a http.Request +*/ +type GetJobsParams struct { + + /*AccountID + Taxnexus Record Id of an Account + + */ + AccountID *string + /*Active + Retrieve active records only? + + */ + Active *bool + /*CompanyID + Taxnexus Record Id of a Company + + */ + CompanyID *string + /*JobID + Taxnexus Record Id of a Job + + */ + JobID *string + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get jobs params +func (o *GetJobsParams) WithTimeout(timeout time.Duration) *GetJobsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get jobs params +func (o *GetJobsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get jobs params +func (o *GetJobsParams) WithContext(ctx context.Context) *GetJobsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get jobs params +func (o *GetJobsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get jobs params +func (o *GetJobsParams) WithHTTPClient(client *http.Client) *GetJobsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get jobs params +func (o *GetJobsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAccountID adds the accountID to the get jobs params +func (o *GetJobsParams) WithAccountID(accountID *string) *GetJobsParams { + o.SetAccountID(accountID) + return o +} + +// SetAccountID adds the accountId to the get jobs params +func (o *GetJobsParams) SetAccountID(accountID *string) { + o.AccountID = accountID +} + +// WithActive adds the active to the get jobs params +func (o *GetJobsParams) WithActive(active *bool) *GetJobsParams { + o.SetActive(active) + return o +} + +// SetActive adds the active to the get jobs params +func (o *GetJobsParams) SetActive(active *bool) { + o.Active = active +} + +// WithCompanyID adds the companyID to the get jobs params +func (o *GetJobsParams) WithCompanyID(companyID *string) *GetJobsParams { + o.SetCompanyID(companyID) + return o +} + +// SetCompanyID adds the companyId to the get jobs params +func (o *GetJobsParams) SetCompanyID(companyID *string) { + o.CompanyID = companyID +} + +// WithJobID adds the jobID to the get jobs params +func (o *GetJobsParams) WithJobID(jobID *string) *GetJobsParams { + o.SetJobID(jobID) + return o +} + +// SetJobID adds the jobId to the get jobs params +func (o *GetJobsParams) SetJobID(jobID *string) { + o.JobID = jobID +} + +// WithLimit adds the limit to the get jobs params +func (o *GetJobsParams) WithLimit(limit *int64) *GetJobsParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get jobs params +func (o *GetJobsParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get jobs params +func (o *GetJobsParams) WithOffset(offset *int64) *GetJobsParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get jobs params +func (o *GetJobsParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *GetJobsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AccountID != nil { + + // query param accountId + var qrAccountID string + if o.AccountID != nil { + qrAccountID = *o.AccountID + } + qAccountID := qrAccountID + if qAccountID != "" { + if err := r.SetQueryParam("accountId", qAccountID); err != nil { + return err + } + } + + } + + if o.Active != nil { + + // query param active + var qrActive bool + if o.Active != nil { + qrActive = *o.Active + } + qActive := swag.FormatBool(qrActive) + if qActive != "" { + if err := r.SetQueryParam("active", qActive); err != nil { + return err + } + } + + } + + if o.CompanyID != nil { + + // query param companyId + var qrCompanyID string + if o.CompanyID != nil { + qrCompanyID = *o.CompanyID + } + qCompanyID := qrCompanyID + if qCompanyID != "" { + if err := r.SetQueryParam("companyId", qCompanyID); err != nil { + return err + } + } + + } + + if o.JobID != nil { + + // query param jobId + var qrJobID string + if o.JobID != nil { + qrJobID = *o.JobID + } + qJobID := qrJobID + if qJobID != "" { + if err := r.SetQueryParam("jobId", qJobID); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/job/get_jobs_responses.go b/api/devops/v0.0.1/devops_client/job/get_jobs_responses.go new file mode 100644 index 0000000..43c4f28 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/job/get_jobs_responses.go @@ -0,0 +1,313 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package job + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// GetJobsReader is a Reader for the GetJobs structure. +type GetJobsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetJobsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetJobsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetJobsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetJobsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetJobsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetJobsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetJobsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetJobsOK creates a GetJobsOK with default headers values +func NewGetJobsOK() *GetJobsOK { + return &GetJobsOK{} +} + +/*GetJobsOK handles this case with default header values. + +Taxnexus Response with Job objects +*/ +type GetJobsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.JobResponse +} + +func (o *GetJobsOK) Error() string { + return fmt.Sprintf("[GET /jobs][%d] getJobsOK %+v", 200, o.Payload) +} + +func (o *GetJobsOK) GetPayload() *devops_models.JobResponse { + return o.Payload +} + +func (o *GetJobsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.JobResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetJobsUnauthorized creates a GetJobsUnauthorized with default headers values +func NewGetJobsUnauthorized() *GetJobsUnauthorized { + return &GetJobsUnauthorized{} +} + +/*GetJobsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetJobsUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetJobsUnauthorized) Error() string { + return fmt.Sprintf("[GET /jobs][%d] getJobsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetJobsUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetJobsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetJobsForbidden creates a GetJobsForbidden with default headers values +func NewGetJobsForbidden() *GetJobsForbidden { + return &GetJobsForbidden{} +} + +/*GetJobsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetJobsForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetJobsForbidden) Error() string { + return fmt.Sprintf("[GET /jobs][%d] getJobsForbidden %+v", 403, o.Payload) +} + +func (o *GetJobsForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetJobsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetJobsNotFound creates a GetJobsNotFound with default headers values +func NewGetJobsNotFound() *GetJobsNotFound { + return &GetJobsNotFound{} +} + +/*GetJobsNotFound handles this case with default header values. + +Resource was not found +*/ +type GetJobsNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetJobsNotFound) Error() string { + return fmt.Sprintf("[GET /jobs][%d] getJobsNotFound %+v", 404, o.Payload) +} + +func (o *GetJobsNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetJobsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetJobsUnprocessableEntity creates a GetJobsUnprocessableEntity with default headers values +func NewGetJobsUnprocessableEntity() *GetJobsUnprocessableEntity { + return &GetJobsUnprocessableEntity{} +} + +/*GetJobsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetJobsUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetJobsUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /jobs][%d] getJobsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetJobsUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetJobsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetJobsInternalServerError creates a GetJobsInternalServerError with default headers values +func NewGetJobsInternalServerError() *GetJobsInternalServerError { + return &GetJobsInternalServerError{} +} + +/*GetJobsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetJobsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetJobsInternalServerError) Error() string { + return fmt.Sprintf("[GET /jobs][%d] getJobsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetJobsInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetJobsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/job/job_client.go b/api/devops/v0.0.1/devops_client/job/job_client.go new file mode 100644 index 0000000..03cfff1 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/job/job_client.go @@ -0,0 +1,235 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package job + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new job API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for job API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetJob(params *GetJobParams, authInfo runtime.ClientAuthInfoWriter) (*GetJobOK, error) + + GetJobs(params *GetJobsParams, authInfo runtime.ClientAuthInfoWriter) (*GetJobsOK, error) + + GetJobsObservable(params *GetJobsObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetJobsObservableOK, error) + + PostJobs(params *PostJobsParams, authInfo runtime.ClientAuthInfoWriter) (*PostJobsOK, error) + + PutJobs(params *PutJobsParams, authInfo runtime.ClientAuthInfoWriter) (*PutJobsOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetJob gets a single job object + + Return a single Job object from datastore as a Singleton +*/ +func (a *Client) GetJob(params *GetJobParams, authInfo runtime.ClientAuthInfoWriter) (*GetJobOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetJobParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getJob", + Method: "GET", + PathPattern: "/jobs/{jobIdPath}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetJobReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetJobOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getJob: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetJobs gets a list jobs + + Return a list of Job records from the datastore +*/ +func (a *Client) GetJobs(params *GetJobsParams, authInfo runtime.ClientAuthInfoWriter) (*GetJobsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetJobsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getJobs", + Method: "GET", + PathPattern: "/jobs", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetJobsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetJobsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getJobs: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetJobsObservable gets jobs in an observable array + + Returns a Job retrieval in a observable array +*/ +func (a *Client) GetJobsObservable(params *GetJobsObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetJobsObservableOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetJobsObservableParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getJobsObservable", + Method: "GET", + PathPattern: "/jobs/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetJobsObservableReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetJobsObservableOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getJobsObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostJobs creates new jobs + + Create and enqueue Jobs in Taxnexus +*/ +func (a *Client) PostJobs(params *PostJobsParams, authInfo runtime.ClientAuthInfoWriter) (*PostJobsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostJobsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postJobs", + Method: "POST", + PathPattern: "/jobs", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostJobsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostJobsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postJobs: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PutJobs updates jobs + + Update Jobs in Taxnexus +*/ +func (a *Client) PutJobs(params *PutJobsParams, authInfo runtime.ClientAuthInfoWriter) (*PutJobsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPutJobsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "putJobs", + Method: "PUT", + PathPattern: "/jobs", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PutJobsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PutJobsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for putJobs: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/devops/v0.0.1/devops_client/job/post_jobs_parameters.go b/api/devops/v0.0.1/devops_client/job/post_jobs_parameters.go new file mode 100644 index 0000000..fe8dd3a --- /dev/null +++ b/api/devops/v0.0.1/devops_client/job/post_jobs_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package job + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// NewPostJobsParams creates a new PostJobsParams object +// with the default values initialized. +func NewPostJobsParams() *PostJobsParams { + var () + return &PostJobsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostJobsParamsWithTimeout creates a new PostJobsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostJobsParamsWithTimeout(timeout time.Duration) *PostJobsParams { + var () + return &PostJobsParams{ + + timeout: timeout, + } +} + +// NewPostJobsParamsWithContext creates a new PostJobsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostJobsParamsWithContext(ctx context.Context) *PostJobsParams { + var () + return &PostJobsParams{ + + Context: ctx, + } +} + +// NewPostJobsParamsWithHTTPClient creates a new PostJobsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostJobsParamsWithHTTPClient(client *http.Client) *PostJobsParams { + var () + return &PostJobsParams{ + HTTPClient: client, + } +} + +/*PostJobsParams contains all the parameters to send to the API endpoint +for the post jobs operation typically these are written to a http.Request +*/ +type PostJobsParams struct { + + /*JobRequest + An array of Job records + + */ + JobRequest *devops_models.JobRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post jobs params +func (o *PostJobsParams) WithTimeout(timeout time.Duration) *PostJobsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post jobs params +func (o *PostJobsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post jobs params +func (o *PostJobsParams) WithContext(ctx context.Context) *PostJobsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post jobs params +func (o *PostJobsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post jobs params +func (o *PostJobsParams) WithHTTPClient(client *http.Client) *PostJobsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post jobs params +func (o *PostJobsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithJobRequest adds the jobRequest to the post jobs params +func (o *PostJobsParams) WithJobRequest(jobRequest *devops_models.JobRequest) *PostJobsParams { + o.SetJobRequest(jobRequest) + return o +} + +// SetJobRequest adds the jobRequest to the post jobs params +func (o *PostJobsParams) SetJobRequest(jobRequest *devops_models.JobRequest) { + o.JobRequest = jobRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostJobsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.JobRequest != nil { + if err := r.SetBodyParam(o.JobRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/job/post_jobs_responses.go b/api/devops/v0.0.1/devops_client/job/post_jobs_responses.go new file mode 100644 index 0000000..263e82a --- /dev/null +++ b/api/devops/v0.0.1/devops_client/job/post_jobs_responses.go @@ -0,0 +1,313 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package job + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// PostJobsReader is a Reader for the PostJobs structure. +type PostJobsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostJobsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostJobsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostJobsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostJobsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostJobsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostJobsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostJobsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostJobsOK creates a PostJobsOK with default headers values +func NewPostJobsOK() *PostJobsOK { + return &PostJobsOK{} +} + +/*PostJobsOK handles this case with default header values. + +Taxnexus Response with Job objects +*/ +type PostJobsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.JobResponse +} + +func (o *PostJobsOK) Error() string { + return fmt.Sprintf("[POST /jobs][%d] postJobsOK %+v", 200, o.Payload) +} + +func (o *PostJobsOK) GetPayload() *devops_models.JobResponse { + return o.Payload +} + +func (o *PostJobsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.JobResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostJobsUnauthorized creates a PostJobsUnauthorized with default headers values +func NewPostJobsUnauthorized() *PostJobsUnauthorized { + return &PostJobsUnauthorized{} +} + +/*PostJobsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostJobsUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *PostJobsUnauthorized) Error() string { + return fmt.Sprintf("[POST /jobs][%d] postJobsUnauthorized %+v", 401, o.Payload) +} + +func (o *PostJobsUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostJobsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostJobsForbidden creates a PostJobsForbidden with default headers values +func NewPostJobsForbidden() *PostJobsForbidden { + return &PostJobsForbidden{} +} + +/*PostJobsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostJobsForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PostJobsForbidden) Error() string { + return fmt.Sprintf("[POST /jobs][%d] postJobsForbidden %+v", 403, o.Payload) +} + +func (o *PostJobsForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostJobsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostJobsNotFound creates a PostJobsNotFound with default headers values +func NewPostJobsNotFound() *PostJobsNotFound { + return &PostJobsNotFound{} +} + +/*PostJobsNotFound handles this case with default header values. + +Resource was not found +*/ +type PostJobsNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PostJobsNotFound) Error() string { + return fmt.Sprintf("[POST /jobs][%d] postJobsNotFound %+v", 404, o.Payload) +} + +func (o *PostJobsNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostJobsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostJobsUnprocessableEntity creates a PostJobsUnprocessableEntity with default headers values +func NewPostJobsUnprocessableEntity() *PostJobsUnprocessableEntity { + return &PostJobsUnprocessableEntity{} +} + +/*PostJobsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostJobsUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *PostJobsUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /jobs][%d] postJobsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostJobsUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostJobsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostJobsInternalServerError creates a PostJobsInternalServerError with default headers values +func NewPostJobsInternalServerError() *PostJobsInternalServerError { + return &PostJobsInternalServerError{} +} + +/*PostJobsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostJobsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PostJobsInternalServerError) Error() string { + return fmt.Sprintf("[POST /jobs][%d] postJobsInternalServerError %+v", 500, o.Payload) +} + +func (o *PostJobsInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostJobsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/job/put_jobs_parameters.go b/api/devops/v0.0.1/devops_client/job/put_jobs_parameters.go new file mode 100644 index 0000000..c2fb67d --- /dev/null +++ b/api/devops/v0.0.1/devops_client/job/put_jobs_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package job + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// NewPutJobsParams creates a new PutJobsParams object +// with the default values initialized. +func NewPutJobsParams() *PutJobsParams { + var () + return &PutJobsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPutJobsParamsWithTimeout creates a new PutJobsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPutJobsParamsWithTimeout(timeout time.Duration) *PutJobsParams { + var () + return &PutJobsParams{ + + timeout: timeout, + } +} + +// NewPutJobsParamsWithContext creates a new PutJobsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPutJobsParamsWithContext(ctx context.Context) *PutJobsParams { + var () + return &PutJobsParams{ + + Context: ctx, + } +} + +// NewPutJobsParamsWithHTTPClient creates a new PutJobsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPutJobsParamsWithHTTPClient(client *http.Client) *PutJobsParams { + var () + return &PutJobsParams{ + HTTPClient: client, + } +} + +/*PutJobsParams contains all the parameters to send to the API endpoint +for the put jobs operation typically these are written to a http.Request +*/ +type PutJobsParams struct { + + /*JobRequest + An array of Job records + + */ + JobRequest *devops_models.JobRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the put jobs params +func (o *PutJobsParams) WithTimeout(timeout time.Duration) *PutJobsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the put jobs params +func (o *PutJobsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the put jobs params +func (o *PutJobsParams) WithContext(ctx context.Context) *PutJobsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the put jobs params +func (o *PutJobsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the put jobs params +func (o *PutJobsParams) WithHTTPClient(client *http.Client) *PutJobsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the put jobs params +func (o *PutJobsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithJobRequest adds the jobRequest to the put jobs params +func (o *PutJobsParams) WithJobRequest(jobRequest *devops_models.JobRequest) *PutJobsParams { + o.SetJobRequest(jobRequest) + return o +} + +// SetJobRequest adds the jobRequest to the put jobs params +func (o *PutJobsParams) SetJobRequest(jobRequest *devops_models.JobRequest) { + o.JobRequest = jobRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PutJobsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.JobRequest != nil { + if err := r.SetBodyParam(o.JobRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/job/put_jobs_responses.go b/api/devops/v0.0.1/devops_client/job/put_jobs_responses.go new file mode 100644 index 0000000..0d9138b --- /dev/null +++ b/api/devops/v0.0.1/devops_client/job/put_jobs_responses.go @@ -0,0 +1,313 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package job + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// PutJobsReader is a Reader for the PutJobs structure. +type PutJobsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PutJobsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPutJobsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPutJobsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPutJobsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPutJobsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPutJobsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPutJobsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPutJobsOK creates a PutJobsOK with default headers values +func NewPutJobsOK() *PutJobsOK { + return &PutJobsOK{} +} + +/*PutJobsOK handles this case with default header values. + +Taxnexus Response with Job objects +*/ +type PutJobsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.JobResponse +} + +func (o *PutJobsOK) Error() string { + return fmt.Sprintf("[PUT /jobs][%d] putJobsOK %+v", 200, o.Payload) +} + +func (o *PutJobsOK) GetPayload() *devops_models.JobResponse { + return o.Payload +} + +func (o *PutJobsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.JobResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutJobsUnauthorized creates a PutJobsUnauthorized with default headers values +func NewPutJobsUnauthorized() *PutJobsUnauthorized { + return &PutJobsUnauthorized{} +} + +/*PutJobsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PutJobsUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *PutJobsUnauthorized) Error() string { + return fmt.Sprintf("[PUT /jobs][%d] putJobsUnauthorized %+v", 401, o.Payload) +} + +func (o *PutJobsUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutJobsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutJobsForbidden creates a PutJobsForbidden with default headers values +func NewPutJobsForbidden() *PutJobsForbidden { + return &PutJobsForbidden{} +} + +/*PutJobsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PutJobsForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PutJobsForbidden) Error() string { + return fmt.Sprintf("[PUT /jobs][%d] putJobsForbidden %+v", 403, o.Payload) +} + +func (o *PutJobsForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutJobsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutJobsNotFound creates a PutJobsNotFound with default headers values +func NewPutJobsNotFound() *PutJobsNotFound { + return &PutJobsNotFound{} +} + +/*PutJobsNotFound handles this case with default header values. + +Resource was not found +*/ +type PutJobsNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PutJobsNotFound) Error() string { + return fmt.Sprintf("[PUT /jobs][%d] putJobsNotFound %+v", 404, o.Payload) +} + +func (o *PutJobsNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutJobsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutJobsUnprocessableEntity creates a PutJobsUnprocessableEntity with default headers values +func NewPutJobsUnprocessableEntity() *PutJobsUnprocessableEntity { + return &PutJobsUnprocessableEntity{} +} + +/*PutJobsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PutJobsUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *PutJobsUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /jobs][%d] putJobsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutJobsUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutJobsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutJobsInternalServerError creates a PutJobsInternalServerError with default headers values +func NewPutJobsInternalServerError() *PutJobsInternalServerError { + return &PutJobsInternalServerError{} +} + +/*PutJobsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PutJobsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PutJobsInternalServerError) Error() string { + return fmt.Sprintf("[PUT /jobs][%d] putJobsInternalServerError %+v", 500, o.Payload) +} + +func (o *PutJobsInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutJobsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/service/get_service_parameters.go b/api/devops/v0.0.1/devops_client/service/get_service_parameters.go new file mode 100644 index 0000000..793972e --- /dev/null +++ b/api/devops/v0.0.1/devops_client/service/get_service_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetServiceParams creates a new GetServiceParams object +// with the default values initialized. +func NewGetServiceParams() *GetServiceParams { + var () + return &GetServiceParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetServiceParamsWithTimeout creates a new GetServiceParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetServiceParamsWithTimeout(timeout time.Duration) *GetServiceParams { + var () + return &GetServiceParams{ + + timeout: timeout, + } +} + +// NewGetServiceParamsWithContext creates a new GetServiceParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetServiceParamsWithContext(ctx context.Context) *GetServiceParams { + var () + return &GetServiceParams{ + + Context: ctx, + } +} + +// NewGetServiceParamsWithHTTPClient creates a new GetServiceParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetServiceParamsWithHTTPClient(client *http.Client) *GetServiceParams { + var () + return &GetServiceParams{ + HTTPClient: client, + } +} + +/*GetServiceParams contains all the parameters to send to the API endpoint +for the get service operation typically these are written to a http.Request +*/ +type GetServiceParams struct { + + /*ServiceIDPath + Taxnexus Record Id of a Service + + */ + ServiceIDPath string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get service params +func (o *GetServiceParams) WithTimeout(timeout time.Duration) *GetServiceParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get service params +func (o *GetServiceParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get service params +func (o *GetServiceParams) WithContext(ctx context.Context) *GetServiceParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get service params +func (o *GetServiceParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get service params +func (o *GetServiceParams) WithHTTPClient(client *http.Client) *GetServiceParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get service params +func (o *GetServiceParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithServiceIDPath adds the serviceIDPath to the get service params +func (o *GetServiceParams) WithServiceIDPath(serviceIDPath string) *GetServiceParams { + o.SetServiceIDPath(serviceIDPath) + return o +} + +// SetServiceIDPath adds the serviceIdPath to the get service params +func (o *GetServiceParams) SetServiceIDPath(serviceIDPath string) { + o.ServiceIDPath = serviceIDPath +} + +// WriteToRequest writes these params to a swagger request +func (o *GetServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param serviceIdPath + if err := r.SetPathParam("serviceIdPath", o.ServiceIDPath); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/service/get_service_responses.go b/api/devops/v0.0.1/devops_client/service/get_service_responses.go new file mode 100644 index 0000000..5493d13 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/service/get_service_responses.go @@ -0,0 +1,313 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// GetServiceReader is a Reader for the GetService structure. +type GetServiceReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetServiceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetServiceOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetServiceUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetServiceForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetServiceNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetServiceUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetServiceInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetServiceOK creates a GetServiceOK with default headers values +func NewGetServiceOK() *GetServiceOK { + return &GetServiceOK{} +} + +/*GetServiceOK handles this case with default header values. + +Single Service record response +*/ +type GetServiceOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Service +} + +func (o *GetServiceOK) Error() string { + return fmt.Sprintf("[GET /services/{serviceIdPath}][%d] getServiceOK %+v", 200, o.Payload) +} + +func (o *GetServiceOK) GetPayload() *devops_models.Service { + return o.Payload +} + +func (o *GetServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Service) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetServiceUnauthorized creates a GetServiceUnauthorized with default headers values +func NewGetServiceUnauthorized() *GetServiceUnauthorized { + return &GetServiceUnauthorized{} +} + +/*GetServiceUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetServiceUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetServiceUnauthorized) Error() string { + return fmt.Sprintf("[GET /services/{serviceIdPath}][%d] getServiceUnauthorized %+v", 401, o.Payload) +} + +func (o *GetServiceUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetServiceUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetServiceForbidden creates a GetServiceForbidden with default headers values +func NewGetServiceForbidden() *GetServiceForbidden { + return &GetServiceForbidden{} +} + +/*GetServiceForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetServiceForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetServiceForbidden) Error() string { + return fmt.Sprintf("[GET /services/{serviceIdPath}][%d] getServiceForbidden %+v", 403, o.Payload) +} + +func (o *GetServiceForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetServiceForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetServiceNotFound creates a GetServiceNotFound with default headers values +func NewGetServiceNotFound() *GetServiceNotFound { + return &GetServiceNotFound{} +} + +/*GetServiceNotFound handles this case with default header values. + +Resource was not found +*/ +type GetServiceNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetServiceNotFound) Error() string { + return fmt.Sprintf("[GET /services/{serviceIdPath}][%d] getServiceNotFound %+v", 404, o.Payload) +} + +func (o *GetServiceNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetServiceNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetServiceUnprocessableEntity creates a GetServiceUnprocessableEntity with default headers values +func NewGetServiceUnprocessableEntity() *GetServiceUnprocessableEntity { + return &GetServiceUnprocessableEntity{} +} + +/*GetServiceUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetServiceUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetServiceUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /services/{serviceIdPath}][%d] getServiceUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetServiceUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetServiceUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetServiceInternalServerError creates a GetServiceInternalServerError with default headers values +func NewGetServiceInternalServerError() *GetServiceInternalServerError { + return &GetServiceInternalServerError{} +} + +/*GetServiceInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetServiceInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetServiceInternalServerError) Error() string { + return fmt.Sprintf("[GET /services/{serviceIdPath}][%d] getServiceInternalServerError %+v", 500, o.Payload) +} + +func (o *GetServiceInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetServiceInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/service/get_services_observable_parameters.go b/api/devops/v0.0.1/devops_client/service/get_services_observable_parameters.go new file mode 100644 index 0000000..4d3663a --- /dev/null +++ b/api/devops/v0.0.1/devops_client/service/get_services_observable_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetServicesObservableParams creates a new GetServicesObservableParams object +// with the default values initialized. +func NewGetServicesObservableParams() *GetServicesObservableParams { + + return &GetServicesObservableParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetServicesObservableParamsWithTimeout creates a new GetServicesObservableParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetServicesObservableParamsWithTimeout(timeout time.Duration) *GetServicesObservableParams { + + return &GetServicesObservableParams{ + + timeout: timeout, + } +} + +// NewGetServicesObservableParamsWithContext creates a new GetServicesObservableParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetServicesObservableParamsWithContext(ctx context.Context) *GetServicesObservableParams { + + return &GetServicesObservableParams{ + + Context: ctx, + } +} + +// NewGetServicesObservableParamsWithHTTPClient creates a new GetServicesObservableParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetServicesObservableParamsWithHTTPClient(client *http.Client) *GetServicesObservableParams { + + return &GetServicesObservableParams{ + HTTPClient: client, + } +} + +/*GetServicesObservableParams contains all the parameters to send to the API endpoint +for the get services observable operation typically these are written to a http.Request +*/ +type GetServicesObservableParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get services observable params +func (o *GetServicesObservableParams) WithTimeout(timeout time.Duration) *GetServicesObservableParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get services observable params +func (o *GetServicesObservableParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get services observable params +func (o *GetServicesObservableParams) WithContext(ctx context.Context) *GetServicesObservableParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get services observable params +func (o *GetServicesObservableParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get services observable params +func (o *GetServicesObservableParams) WithHTTPClient(client *http.Client) *GetServicesObservableParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get services observable params +func (o *GetServicesObservableParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *GetServicesObservableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/service/get_services_observable_responses.go b/api/devops/v0.0.1/devops_client/service/get_services_observable_responses.go new file mode 100644 index 0000000..b1dc5ca --- /dev/null +++ b/api/devops/v0.0.1/devops_client/service/get_services_observable_responses.go @@ -0,0 +1,311 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// GetServicesObservableReader is a Reader for the GetServicesObservable structure. +type GetServicesObservableReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetServicesObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetServicesObservableOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetServicesObservableUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetServicesObservableForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetServicesObservableNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetServicesObservableUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetServicesObservableInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetServicesObservableOK creates a GetServicesObservableOK with default headers values +func NewGetServicesObservableOK() *GetServicesObservableOK { + return &GetServicesObservableOK{} +} + +/*GetServicesObservableOK handles this case with default header values. + +Simple Service record response +*/ +type GetServicesObservableOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload []*devops_models.Service +} + +func (o *GetServicesObservableOK) Error() string { + return fmt.Sprintf("[GET /services/observable][%d] getServicesObservableOK %+v", 200, o.Payload) +} + +func (o *GetServicesObservableOK) GetPayload() []*devops_models.Service { + return o.Payload +} + +func (o *GetServicesObservableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetServicesObservableUnauthorized creates a GetServicesObservableUnauthorized with default headers values +func NewGetServicesObservableUnauthorized() *GetServicesObservableUnauthorized { + return &GetServicesObservableUnauthorized{} +} + +/*GetServicesObservableUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetServicesObservableUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetServicesObservableUnauthorized) Error() string { + return fmt.Sprintf("[GET /services/observable][%d] getServicesObservableUnauthorized %+v", 401, o.Payload) +} + +func (o *GetServicesObservableUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetServicesObservableUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetServicesObservableForbidden creates a GetServicesObservableForbidden with default headers values +func NewGetServicesObservableForbidden() *GetServicesObservableForbidden { + return &GetServicesObservableForbidden{} +} + +/*GetServicesObservableForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetServicesObservableForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetServicesObservableForbidden) Error() string { + return fmt.Sprintf("[GET /services/observable][%d] getServicesObservableForbidden %+v", 403, o.Payload) +} + +func (o *GetServicesObservableForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetServicesObservableForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetServicesObservableNotFound creates a GetServicesObservableNotFound with default headers values +func NewGetServicesObservableNotFound() *GetServicesObservableNotFound { + return &GetServicesObservableNotFound{} +} + +/*GetServicesObservableNotFound handles this case with default header values. + +Resource was not found +*/ +type GetServicesObservableNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetServicesObservableNotFound) Error() string { + return fmt.Sprintf("[GET /services/observable][%d] getServicesObservableNotFound %+v", 404, o.Payload) +} + +func (o *GetServicesObservableNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetServicesObservableNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetServicesObservableUnprocessableEntity creates a GetServicesObservableUnprocessableEntity with default headers values +func NewGetServicesObservableUnprocessableEntity() *GetServicesObservableUnprocessableEntity { + return &GetServicesObservableUnprocessableEntity{} +} + +/*GetServicesObservableUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetServicesObservableUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetServicesObservableUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /services/observable][%d] getServicesObservableUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetServicesObservableUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetServicesObservableUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetServicesObservableInternalServerError creates a GetServicesObservableInternalServerError with default headers values +func NewGetServicesObservableInternalServerError() *GetServicesObservableInternalServerError { + return &GetServicesObservableInternalServerError{} +} + +/*GetServicesObservableInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetServicesObservableInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetServicesObservableInternalServerError) Error() string { + return fmt.Sprintf("[GET /services/observable][%d] getServicesObservableInternalServerError %+v", 500, o.Payload) +} + +func (o *GetServicesObservableInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetServicesObservableInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/service/get_services_parameters.go b/api/devops/v0.0.1/devops_client/service/get_services_parameters.go new file mode 100644 index 0000000..819a157 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/service/get_services_parameters.go @@ -0,0 +1,215 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetServicesParams creates a new GetServicesParams object +// with the default values initialized. +func NewGetServicesParams() *GetServicesParams { + var () + return &GetServicesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetServicesParamsWithTimeout creates a new GetServicesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetServicesParamsWithTimeout(timeout time.Duration) *GetServicesParams { + var () + return &GetServicesParams{ + + timeout: timeout, + } +} + +// NewGetServicesParamsWithContext creates a new GetServicesParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetServicesParamsWithContext(ctx context.Context) *GetServicesParams { + var () + return &GetServicesParams{ + + Context: ctx, + } +} + +// NewGetServicesParamsWithHTTPClient creates a new GetServicesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetServicesParamsWithHTTPClient(client *http.Client) *GetServicesParams { + var () + return &GetServicesParams{ + HTTPClient: client, + } +} + +/*GetServicesParams contains all the parameters to send to the API endpoint +for the get services operation typically these are written to a http.Request +*/ +type GetServicesParams struct { + + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + /*ServiceID + Service ID + + */ + ServiceID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get services params +func (o *GetServicesParams) WithTimeout(timeout time.Duration) *GetServicesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get services params +func (o *GetServicesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get services params +func (o *GetServicesParams) WithContext(ctx context.Context) *GetServicesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get services params +func (o *GetServicesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get services params +func (o *GetServicesParams) WithHTTPClient(client *http.Client) *GetServicesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get services params +func (o *GetServicesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithLimit adds the limit to the get services params +func (o *GetServicesParams) WithLimit(limit *int64) *GetServicesParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get services params +func (o *GetServicesParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get services params +func (o *GetServicesParams) WithOffset(offset *int64) *GetServicesParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get services params +func (o *GetServicesParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithServiceID adds the serviceID to the get services params +func (o *GetServicesParams) WithServiceID(serviceID *string) *GetServicesParams { + o.SetServiceID(serviceID) + return o +} + +// SetServiceID adds the serviceId to the get services params +func (o *GetServicesParams) SetServiceID(serviceID *string) { + o.ServiceID = serviceID +} + +// WriteToRequest writes these params to a swagger request +func (o *GetServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.ServiceID != nil { + + // query param serviceId + var qrServiceID string + if o.ServiceID != nil { + qrServiceID = *o.ServiceID + } + qServiceID := qrServiceID + if qServiceID != "" { + if err := r.SetQueryParam("serviceId", qServiceID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/service/get_services_responses.go b/api/devops/v0.0.1/devops_client/service/get_services_responses.go new file mode 100644 index 0000000..2aa1ade --- /dev/null +++ b/api/devops/v0.0.1/devops_client/service/get_services_responses.go @@ -0,0 +1,313 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// GetServicesReader is a Reader for the GetServices structure. +type GetServicesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetServicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetServicesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetServicesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetServicesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetServicesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetServicesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetServicesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetServicesOK creates a GetServicesOK with default headers values +func NewGetServicesOK() *GetServicesOK { + return &GetServicesOK{} +} + +/*GetServicesOK handles this case with default header values. + +Taxnexus Response with Service objects +*/ +type GetServicesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.ServiceResponse +} + +func (o *GetServicesOK) Error() string { + return fmt.Sprintf("[GET /services][%d] getServicesOK %+v", 200, o.Payload) +} + +func (o *GetServicesOK) GetPayload() *devops_models.ServiceResponse { + return o.Payload +} + +func (o *GetServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.ServiceResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetServicesUnauthorized creates a GetServicesUnauthorized with default headers values +func NewGetServicesUnauthorized() *GetServicesUnauthorized { + return &GetServicesUnauthorized{} +} + +/*GetServicesUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetServicesUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetServicesUnauthorized) Error() string { + return fmt.Sprintf("[GET /services][%d] getServicesUnauthorized %+v", 401, o.Payload) +} + +func (o *GetServicesUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetServicesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetServicesForbidden creates a GetServicesForbidden with default headers values +func NewGetServicesForbidden() *GetServicesForbidden { + return &GetServicesForbidden{} +} + +/*GetServicesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetServicesForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetServicesForbidden) Error() string { + return fmt.Sprintf("[GET /services][%d] getServicesForbidden %+v", 403, o.Payload) +} + +func (o *GetServicesForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetServicesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetServicesNotFound creates a GetServicesNotFound with default headers values +func NewGetServicesNotFound() *GetServicesNotFound { + return &GetServicesNotFound{} +} + +/*GetServicesNotFound handles this case with default header values. + +Resource was not found +*/ +type GetServicesNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetServicesNotFound) Error() string { + return fmt.Sprintf("[GET /services][%d] getServicesNotFound %+v", 404, o.Payload) +} + +func (o *GetServicesNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetServicesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetServicesUnprocessableEntity creates a GetServicesUnprocessableEntity with default headers values +func NewGetServicesUnprocessableEntity() *GetServicesUnprocessableEntity { + return &GetServicesUnprocessableEntity{} +} + +/*GetServicesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetServicesUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetServicesUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /services][%d] getServicesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetServicesUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetServicesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetServicesInternalServerError creates a GetServicesInternalServerError with default headers values +func NewGetServicesInternalServerError() *GetServicesInternalServerError { + return &GetServicesInternalServerError{} +} + +/*GetServicesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetServicesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetServicesInternalServerError) Error() string { + return fmt.Sprintf("[GET /services][%d] getServicesInternalServerError %+v", 500, o.Payload) +} + +func (o *GetServicesInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetServicesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/service/post_services_parameters.go b/api/devops/v0.0.1/devops_client/service/post_services_parameters.go new file mode 100644 index 0000000..f10c1f2 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/service/post_services_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// NewPostServicesParams creates a new PostServicesParams object +// with the default values initialized. +func NewPostServicesParams() *PostServicesParams { + var () + return &PostServicesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostServicesParamsWithTimeout creates a new PostServicesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostServicesParamsWithTimeout(timeout time.Duration) *PostServicesParams { + var () + return &PostServicesParams{ + + timeout: timeout, + } +} + +// NewPostServicesParamsWithContext creates a new PostServicesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostServicesParamsWithContext(ctx context.Context) *PostServicesParams { + var () + return &PostServicesParams{ + + Context: ctx, + } +} + +// NewPostServicesParamsWithHTTPClient creates a new PostServicesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostServicesParamsWithHTTPClient(client *http.Client) *PostServicesParams { + var () + return &PostServicesParams{ + HTTPClient: client, + } +} + +/*PostServicesParams contains all the parameters to send to the API endpoint +for the post services operation typically these are written to a http.Request +*/ +type PostServicesParams struct { + + /*ServiceRequest + An array of Service records + + */ + ServiceRequest *devops_models.ServiceRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post services params +func (o *PostServicesParams) WithTimeout(timeout time.Duration) *PostServicesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post services params +func (o *PostServicesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post services params +func (o *PostServicesParams) WithContext(ctx context.Context) *PostServicesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post services params +func (o *PostServicesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post services params +func (o *PostServicesParams) WithHTTPClient(client *http.Client) *PostServicesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post services params +func (o *PostServicesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithServiceRequest adds the serviceRequest to the post services params +func (o *PostServicesParams) WithServiceRequest(serviceRequest *devops_models.ServiceRequest) *PostServicesParams { + o.SetServiceRequest(serviceRequest) + return o +} + +// SetServiceRequest adds the serviceRequest to the post services params +func (o *PostServicesParams) SetServiceRequest(serviceRequest *devops_models.ServiceRequest) { + o.ServiceRequest = serviceRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ServiceRequest != nil { + if err := r.SetBodyParam(o.ServiceRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/service/post_services_responses.go b/api/devops/v0.0.1/devops_client/service/post_services_responses.go new file mode 100644 index 0000000..c2080cc --- /dev/null +++ b/api/devops/v0.0.1/devops_client/service/post_services_responses.go @@ -0,0 +1,313 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// PostServicesReader is a Reader for the PostServices structure. +type PostServicesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostServicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostServicesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostServicesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostServicesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostServicesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostServicesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostServicesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostServicesOK creates a PostServicesOK with default headers values +func NewPostServicesOK() *PostServicesOK { + return &PostServicesOK{} +} + +/*PostServicesOK handles this case with default header values. + +Taxnexus Response with Service objects +*/ +type PostServicesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.ServiceResponse +} + +func (o *PostServicesOK) Error() string { + return fmt.Sprintf("[POST /services][%d] postServicesOK %+v", 200, o.Payload) +} + +func (o *PostServicesOK) GetPayload() *devops_models.ServiceResponse { + return o.Payload +} + +func (o *PostServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.ServiceResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostServicesUnauthorized creates a PostServicesUnauthorized with default headers values +func NewPostServicesUnauthorized() *PostServicesUnauthorized { + return &PostServicesUnauthorized{} +} + +/*PostServicesUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostServicesUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *PostServicesUnauthorized) Error() string { + return fmt.Sprintf("[POST /services][%d] postServicesUnauthorized %+v", 401, o.Payload) +} + +func (o *PostServicesUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostServicesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostServicesForbidden creates a PostServicesForbidden with default headers values +func NewPostServicesForbidden() *PostServicesForbidden { + return &PostServicesForbidden{} +} + +/*PostServicesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostServicesForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PostServicesForbidden) Error() string { + return fmt.Sprintf("[POST /services][%d] postServicesForbidden %+v", 403, o.Payload) +} + +func (o *PostServicesForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostServicesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostServicesNotFound creates a PostServicesNotFound with default headers values +func NewPostServicesNotFound() *PostServicesNotFound { + return &PostServicesNotFound{} +} + +/*PostServicesNotFound handles this case with default header values. + +Resource was not found +*/ +type PostServicesNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PostServicesNotFound) Error() string { + return fmt.Sprintf("[POST /services][%d] postServicesNotFound %+v", 404, o.Payload) +} + +func (o *PostServicesNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostServicesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostServicesUnprocessableEntity creates a PostServicesUnprocessableEntity with default headers values +func NewPostServicesUnprocessableEntity() *PostServicesUnprocessableEntity { + return &PostServicesUnprocessableEntity{} +} + +/*PostServicesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostServicesUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *PostServicesUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /services][%d] postServicesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostServicesUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostServicesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostServicesInternalServerError creates a PostServicesInternalServerError with default headers values +func NewPostServicesInternalServerError() *PostServicesInternalServerError { + return &PostServicesInternalServerError{} +} + +/*PostServicesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostServicesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PostServicesInternalServerError) Error() string { + return fmt.Sprintf("[POST /services][%d] postServicesInternalServerError %+v", 500, o.Payload) +} + +func (o *PostServicesInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostServicesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/service/put_services_parameters.go b/api/devops/v0.0.1/devops_client/service/put_services_parameters.go new file mode 100644 index 0000000..cb0673e --- /dev/null +++ b/api/devops/v0.0.1/devops_client/service/put_services_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// NewPutServicesParams creates a new PutServicesParams object +// with the default values initialized. +func NewPutServicesParams() *PutServicesParams { + var () + return &PutServicesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPutServicesParamsWithTimeout creates a new PutServicesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPutServicesParamsWithTimeout(timeout time.Duration) *PutServicesParams { + var () + return &PutServicesParams{ + + timeout: timeout, + } +} + +// NewPutServicesParamsWithContext creates a new PutServicesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPutServicesParamsWithContext(ctx context.Context) *PutServicesParams { + var () + return &PutServicesParams{ + + Context: ctx, + } +} + +// NewPutServicesParamsWithHTTPClient creates a new PutServicesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPutServicesParamsWithHTTPClient(client *http.Client) *PutServicesParams { + var () + return &PutServicesParams{ + HTTPClient: client, + } +} + +/*PutServicesParams contains all the parameters to send to the API endpoint +for the put services operation typically these are written to a http.Request +*/ +type PutServicesParams struct { + + /*ServiceRequest + An array of Service records + + */ + ServiceRequest *devops_models.ServiceRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the put services params +func (o *PutServicesParams) WithTimeout(timeout time.Duration) *PutServicesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the put services params +func (o *PutServicesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the put services params +func (o *PutServicesParams) WithContext(ctx context.Context) *PutServicesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the put services params +func (o *PutServicesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the put services params +func (o *PutServicesParams) WithHTTPClient(client *http.Client) *PutServicesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the put services params +func (o *PutServicesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithServiceRequest adds the serviceRequest to the put services params +func (o *PutServicesParams) WithServiceRequest(serviceRequest *devops_models.ServiceRequest) *PutServicesParams { + o.SetServiceRequest(serviceRequest) + return o +} + +// SetServiceRequest adds the serviceRequest to the put services params +func (o *PutServicesParams) SetServiceRequest(serviceRequest *devops_models.ServiceRequest) { + o.ServiceRequest = serviceRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PutServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ServiceRequest != nil { + if err := r.SetBodyParam(o.ServiceRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/service/put_services_responses.go b/api/devops/v0.0.1/devops_client/service/put_services_responses.go new file mode 100644 index 0000000..5bff568 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/service/put_services_responses.go @@ -0,0 +1,313 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// PutServicesReader is a Reader for the PutServices structure. +type PutServicesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PutServicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPutServicesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPutServicesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPutServicesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPutServicesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPutServicesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPutServicesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPutServicesOK creates a PutServicesOK with default headers values +func NewPutServicesOK() *PutServicesOK { + return &PutServicesOK{} +} + +/*PutServicesOK handles this case with default header values. + +Taxnexus Response with Service objects +*/ +type PutServicesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.ServiceResponse +} + +func (o *PutServicesOK) Error() string { + return fmt.Sprintf("[PUT /services][%d] putServicesOK %+v", 200, o.Payload) +} + +func (o *PutServicesOK) GetPayload() *devops_models.ServiceResponse { + return o.Payload +} + +func (o *PutServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.ServiceResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutServicesUnauthorized creates a PutServicesUnauthorized with default headers values +func NewPutServicesUnauthorized() *PutServicesUnauthorized { + return &PutServicesUnauthorized{} +} + +/*PutServicesUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PutServicesUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *PutServicesUnauthorized) Error() string { + return fmt.Sprintf("[PUT /services][%d] putServicesUnauthorized %+v", 401, o.Payload) +} + +func (o *PutServicesUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutServicesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutServicesForbidden creates a PutServicesForbidden with default headers values +func NewPutServicesForbidden() *PutServicesForbidden { + return &PutServicesForbidden{} +} + +/*PutServicesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PutServicesForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PutServicesForbidden) Error() string { + return fmt.Sprintf("[PUT /services][%d] putServicesForbidden %+v", 403, o.Payload) +} + +func (o *PutServicesForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutServicesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutServicesNotFound creates a PutServicesNotFound with default headers values +func NewPutServicesNotFound() *PutServicesNotFound { + return &PutServicesNotFound{} +} + +/*PutServicesNotFound handles this case with default header values. + +Resource was not found +*/ +type PutServicesNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PutServicesNotFound) Error() string { + return fmt.Sprintf("[PUT /services][%d] putServicesNotFound %+v", 404, o.Payload) +} + +func (o *PutServicesNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutServicesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutServicesUnprocessableEntity creates a PutServicesUnprocessableEntity with default headers values +func NewPutServicesUnprocessableEntity() *PutServicesUnprocessableEntity { + return &PutServicesUnprocessableEntity{} +} + +/*PutServicesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PutServicesUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *PutServicesUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /services][%d] putServicesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutServicesUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutServicesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutServicesInternalServerError creates a PutServicesInternalServerError with default headers values +func NewPutServicesInternalServerError() *PutServicesInternalServerError { + return &PutServicesInternalServerError{} +} + +/*PutServicesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PutServicesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PutServicesInternalServerError) Error() string { + return fmt.Sprintf("[PUT /services][%d] putServicesInternalServerError %+v", 500, o.Payload) +} + +func (o *PutServicesInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutServicesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/service/service_client.go b/api/devops/v0.0.1/devops_client/service/service_client.go new file mode 100644 index 0000000..b8a4815 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/service/service_client.go @@ -0,0 +1,235 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new service API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for service API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetService(params *GetServiceParams, authInfo runtime.ClientAuthInfoWriter) (*GetServiceOK, error) + + GetServices(params *GetServicesParams, authInfo runtime.ClientAuthInfoWriter) (*GetServicesOK, error) + + GetServicesObservable(params *GetServicesObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetServicesObservableOK, error) + + PostServices(params *PostServicesParams, authInfo runtime.ClientAuthInfoWriter) (*PostServicesOK, error) + + PutServices(params *PutServicesParams, authInfo runtime.ClientAuthInfoWriter) (*PutServicesOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetService gets a single service object + + Return a single Service object from datastore as a Singleton +*/ +func (a *Client) GetService(params *GetServiceParams, authInfo runtime.ClientAuthInfoWriter) (*GetServiceOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetServiceParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getService", + Method: "GET", + PathPattern: "/services/{serviceIdPath}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetServiceReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetServiceOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getService: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetServices gets a list of services + + Return a list of Services records from the datastore +*/ +func (a *Client) GetServices(params *GetServicesParams, authInfo runtime.ClientAuthInfoWriter) (*GetServicesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetServicesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getServices", + Method: "GET", + PathPattern: "/services", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetServicesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetServicesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getServices: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetServicesObservable gets services in an observable array + + Returns a Service retrieval in a observable array +*/ +func (a *Client) GetServicesObservable(params *GetServicesObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetServicesObservableOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetServicesObservableParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getServicesObservable", + Method: "GET", + PathPattern: "/services/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetServicesObservableReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetServicesObservableOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getServicesObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostServices creates new services + + Create Services in Taxnexus +*/ +func (a *Client) PostServices(params *PostServicesParams, authInfo runtime.ClientAuthInfoWriter) (*PostServicesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostServicesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postServices", + Method: "POST", + PathPattern: "/services", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostServicesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostServicesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postServices: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PutServices updates services + + Update Services in Taxnexus +*/ +func (a *Client) PutServices(params *PutServicesParams, authInfo runtime.ClientAuthInfoWriter) (*PutServicesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPutServicesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "putServices", + Method: "PUT", + PathPattern: "/services", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PutServicesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PutServicesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for putServices: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/devops/v0.0.1/devops_client/template/get_template_parameters.go b/api/devops/v0.0.1/devops_client/template/get_template_parameters.go new file mode 100644 index 0000000..99c729c --- /dev/null +++ b/api/devops/v0.0.1/devops_client/template/get_template_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package template + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetTemplateParams creates a new GetTemplateParams object +// with the default values initialized. +func NewGetTemplateParams() *GetTemplateParams { + var () + return &GetTemplateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetTemplateParamsWithTimeout creates a new GetTemplateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetTemplateParamsWithTimeout(timeout time.Duration) *GetTemplateParams { + var () + return &GetTemplateParams{ + + timeout: timeout, + } +} + +// NewGetTemplateParamsWithContext creates a new GetTemplateParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetTemplateParamsWithContext(ctx context.Context) *GetTemplateParams { + var () + return &GetTemplateParams{ + + Context: ctx, + } +} + +// NewGetTemplateParamsWithHTTPClient creates a new GetTemplateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetTemplateParamsWithHTTPClient(client *http.Client) *GetTemplateParams { + var () + return &GetTemplateParams{ + HTTPClient: client, + } +} + +/*GetTemplateParams contains all the parameters to send to the API endpoint +for the get template operation typically these are written to a http.Request +*/ +type GetTemplateParams struct { + + /*TemplateIDPath + Taxnexus Record Id of a Template + + */ + TemplateIDPath string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get template params +func (o *GetTemplateParams) WithTimeout(timeout time.Duration) *GetTemplateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get template params +func (o *GetTemplateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get template params +func (o *GetTemplateParams) WithContext(ctx context.Context) *GetTemplateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get template params +func (o *GetTemplateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get template params +func (o *GetTemplateParams) WithHTTPClient(client *http.Client) *GetTemplateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get template params +func (o *GetTemplateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTemplateIDPath adds the templateIDPath to the get template params +func (o *GetTemplateParams) WithTemplateIDPath(templateIDPath string) *GetTemplateParams { + o.SetTemplateIDPath(templateIDPath) + return o +} + +// SetTemplateIDPath adds the templateIdPath to the get template params +func (o *GetTemplateParams) SetTemplateIDPath(templateIDPath string) { + o.TemplateIDPath = templateIDPath +} + +// WriteToRequest writes these params to a swagger request +func (o *GetTemplateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param templateIdPath + if err := r.SetPathParam("templateIdPath", o.TemplateIDPath); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/template/get_template_responses.go b/api/devops/v0.0.1/devops_client/template/get_template_responses.go new file mode 100644 index 0000000..3f37ba3 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/template/get_template_responses.go @@ -0,0 +1,313 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package template + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// GetTemplateReader is a Reader for the GetTemplate structure. +type GetTemplateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetTemplateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetTemplateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetTemplateUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetTemplateForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetTemplateNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetTemplateUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetTemplateInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetTemplateOK creates a GetTemplateOK with default headers values +func NewGetTemplateOK() *GetTemplateOK { + return &GetTemplateOK{} +} + +/*GetTemplateOK handles this case with default header values. + +Single Template record response +*/ +type GetTemplateOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Template +} + +func (o *GetTemplateOK) Error() string { + return fmt.Sprintf("[GET /templates/{templateIdPath}][%d] getTemplateOK %+v", 200, o.Payload) +} + +func (o *GetTemplateOK) GetPayload() *devops_models.Template { + return o.Payload +} + +func (o *GetTemplateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Template) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTemplateUnauthorized creates a GetTemplateUnauthorized with default headers values +func NewGetTemplateUnauthorized() *GetTemplateUnauthorized { + return &GetTemplateUnauthorized{} +} + +/*GetTemplateUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetTemplateUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetTemplateUnauthorized) Error() string { + return fmt.Sprintf("[GET /templates/{templateIdPath}][%d] getTemplateUnauthorized %+v", 401, o.Payload) +} + +func (o *GetTemplateUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetTemplateUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTemplateForbidden creates a GetTemplateForbidden with default headers values +func NewGetTemplateForbidden() *GetTemplateForbidden { + return &GetTemplateForbidden{} +} + +/*GetTemplateForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetTemplateForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetTemplateForbidden) Error() string { + return fmt.Sprintf("[GET /templates/{templateIdPath}][%d] getTemplateForbidden %+v", 403, o.Payload) +} + +func (o *GetTemplateForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetTemplateForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTemplateNotFound creates a GetTemplateNotFound with default headers values +func NewGetTemplateNotFound() *GetTemplateNotFound { + return &GetTemplateNotFound{} +} + +/*GetTemplateNotFound handles this case with default header values. + +Resource was not found +*/ +type GetTemplateNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetTemplateNotFound) Error() string { + return fmt.Sprintf("[GET /templates/{templateIdPath}][%d] getTemplateNotFound %+v", 404, o.Payload) +} + +func (o *GetTemplateNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetTemplateNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTemplateUnprocessableEntity creates a GetTemplateUnprocessableEntity with default headers values +func NewGetTemplateUnprocessableEntity() *GetTemplateUnprocessableEntity { + return &GetTemplateUnprocessableEntity{} +} + +/*GetTemplateUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetTemplateUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetTemplateUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /templates/{templateIdPath}][%d] getTemplateUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetTemplateUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetTemplateUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTemplateInternalServerError creates a GetTemplateInternalServerError with default headers values +func NewGetTemplateInternalServerError() *GetTemplateInternalServerError { + return &GetTemplateInternalServerError{} +} + +/*GetTemplateInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetTemplateInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetTemplateInternalServerError) Error() string { + return fmt.Sprintf("[GET /templates/{templateIdPath}][%d] getTemplateInternalServerError %+v", 500, o.Payload) +} + +func (o *GetTemplateInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetTemplateInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/template/get_templates_observable_parameters.go b/api/devops/v0.0.1/devops_client/template/get_templates_observable_parameters.go new file mode 100644 index 0000000..590d3a8 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/template/get_templates_observable_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package template + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetTemplatesObservableParams creates a new GetTemplatesObservableParams object +// with the default values initialized. +func NewGetTemplatesObservableParams() *GetTemplatesObservableParams { + + return &GetTemplatesObservableParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetTemplatesObservableParamsWithTimeout creates a new GetTemplatesObservableParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetTemplatesObservableParamsWithTimeout(timeout time.Duration) *GetTemplatesObservableParams { + + return &GetTemplatesObservableParams{ + + timeout: timeout, + } +} + +// NewGetTemplatesObservableParamsWithContext creates a new GetTemplatesObservableParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetTemplatesObservableParamsWithContext(ctx context.Context) *GetTemplatesObservableParams { + + return &GetTemplatesObservableParams{ + + Context: ctx, + } +} + +// NewGetTemplatesObservableParamsWithHTTPClient creates a new GetTemplatesObservableParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetTemplatesObservableParamsWithHTTPClient(client *http.Client) *GetTemplatesObservableParams { + + return &GetTemplatesObservableParams{ + HTTPClient: client, + } +} + +/*GetTemplatesObservableParams contains all the parameters to send to the API endpoint +for the get templates observable operation typically these are written to a http.Request +*/ +type GetTemplatesObservableParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get templates observable params +func (o *GetTemplatesObservableParams) WithTimeout(timeout time.Duration) *GetTemplatesObservableParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get templates observable params +func (o *GetTemplatesObservableParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get templates observable params +func (o *GetTemplatesObservableParams) WithContext(ctx context.Context) *GetTemplatesObservableParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get templates observable params +func (o *GetTemplatesObservableParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get templates observable params +func (o *GetTemplatesObservableParams) WithHTTPClient(client *http.Client) *GetTemplatesObservableParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get templates observable params +func (o *GetTemplatesObservableParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *GetTemplatesObservableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/template/get_templates_observable_responses.go b/api/devops/v0.0.1/devops_client/template/get_templates_observable_responses.go new file mode 100644 index 0000000..02d7e33 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/template/get_templates_observable_responses.go @@ -0,0 +1,311 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package template + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// GetTemplatesObservableReader is a Reader for the GetTemplatesObservable structure. +type GetTemplatesObservableReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetTemplatesObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetTemplatesObservableOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetTemplatesObservableUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetTemplatesObservableForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetTemplatesObservableNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetTemplatesObservableUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetTemplatesObservableInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetTemplatesObservableOK creates a GetTemplatesObservableOK with default headers values +func NewGetTemplatesObservableOK() *GetTemplatesObservableOK { + return &GetTemplatesObservableOK{} +} + +/*GetTemplatesObservableOK handles this case with default header values. + +Simple Template record response +*/ +type GetTemplatesObservableOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload []*devops_models.Template +} + +func (o *GetTemplatesObservableOK) Error() string { + return fmt.Sprintf("[GET /templates/observable][%d] getTemplatesObservableOK %+v", 200, o.Payload) +} + +func (o *GetTemplatesObservableOK) GetPayload() []*devops_models.Template { + return o.Payload +} + +func (o *GetTemplatesObservableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTemplatesObservableUnauthorized creates a GetTemplatesObservableUnauthorized with default headers values +func NewGetTemplatesObservableUnauthorized() *GetTemplatesObservableUnauthorized { + return &GetTemplatesObservableUnauthorized{} +} + +/*GetTemplatesObservableUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetTemplatesObservableUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetTemplatesObservableUnauthorized) Error() string { + return fmt.Sprintf("[GET /templates/observable][%d] getTemplatesObservableUnauthorized %+v", 401, o.Payload) +} + +func (o *GetTemplatesObservableUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetTemplatesObservableUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTemplatesObservableForbidden creates a GetTemplatesObservableForbidden with default headers values +func NewGetTemplatesObservableForbidden() *GetTemplatesObservableForbidden { + return &GetTemplatesObservableForbidden{} +} + +/*GetTemplatesObservableForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetTemplatesObservableForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetTemplatesObservableForbidden) Error() string { + return fmt.Sprintf("[GET /templates/observable][%d] getTemplatesObservableForbidden %+v", 403, o.Payload) +} + +func (o *GetTemplatesObservableForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetTemplatesObservableForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTemplatesObservableNotFound creates a GetTemplatesObservableNotFound with default headers values +func NewGetTemplatesObservableNotFound() *GetTemplatesObservableNotFound { + return &GetTemplatesObservableNotFound{} +} + +/*GetTemplatesObservableNotFound handles this case with default header values. + +Resource was not found +*/ +type GetTemplatesObservableNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetTemplatesObservableNotFound) Error() string { + return fmt.Sprintf("[GET /templates/observable][%d] getTemplatesObservableNotFound %+v", 404, o.Payload) +} + +func (o *GetTemplatesObservableNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetTemplatesObservableNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTemplatesObservableUnprocessableEntity creates a GetTemplatesObservableUnprocessableEntity with default headers values +func NewGetTemplatesObservableUnprocessableEntity() *GetTemplatesObservableUnprocessableEntity { + return &GetTemplatesObservableUnprocessableEntity{} +} + +/*GetTemplatesObservableUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetTemplatesObservableUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetTemplatesObservableUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /templates/observable][%d] getTemplatesObservableUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetTemplatesObservableUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetTemplatesObservableUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTemplatesObservableInternalServerError creates a GetTemplatesObservableInternalServerError with default headers values +func NewGetTemplatesObservableInternalServerError() *GetTemplatesObservableInternalServerError { + return &GetTemplatesObservableInternalServerError{} +} + +/*GetTemplatesObservableInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetTemplatesObservableInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetTemplatesObservableInternalServerError) Error() string { + return fmt.Sprintf("[GET /templates/observable][%d] getTemplatesObservableInternalServerError %+v", 500, o.Payload) +} + +func (o *GetTemplatesObservableInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetTemplatesObservableInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/template/get_templates_parameters.go b/api/devops/v0.0.1/devops_client/template/get_templates_parameters.go new file mode 100644 index 0000000..b56d0d7 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/template/get_templates_parameters.go @@ -0,0 +1,311 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package template + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetTemplatesParams creates a new GetTemplatesParams object +// with the default values initialized. +func NewGetTemplatesParams() *GetTemplatesParams { + var () + return &GetTemplatesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetTemplatesParamsWithTimeout creates a new GetTemplatesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetTemplatesParamsWithTimeout(timeout time.Duration) *GetTemplatesParams { + var () + return &GetTemplatesParams{ + + timeout: timeout, + } +} + +// NewGetTemplatesParamsWithContext creates a new GetTemplatesParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetTemplatesParamsWithContext(ctx context.Context) *GetTemplatesParams { + var () + return &GetTemplatesParams{ + + Context: ctx, + } +} + +// NewGetTemplatesParamsWithHTTPClient creates a new GetTemplatesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetTemplatesParamsWithHTTPClient(client *http.Client) *GetTemplatesParams { + var () + return &GetTemplatesParams{ + HTTPClient: client, + } +} + +/*GetTemplatesParams contains all the parameters to send to the API endpoint +for the get templates operation typically these are written to a http.Request +*/ +type GetTemplatesParams struct { + + /*Active + Retrieve active records only? + + */ + Active *bool + /*IsMaster + Is Master Template? + + */ + IsMaster *bool + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*ObjectType + Object Type Name + + */ + ObjectType *string + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + /*TemplateID + Template ID + + */ + TemplateID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get templates params +func (o *GetTemplatesParams) WithTimeout(timeout time.Duration) *GetTemplatesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get templates params +func (o *GetTemplatesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get templates params +func (o *GetTemplatesParams) WithContext(ctx context.Context) *GetTemplatesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get templates params +func (o *GetTemplatesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get templates params +func (o *GetTemplatesParams) WithHTTPClient(client *http.Client) *GetTemplatesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get templates params +func (o *GetTemplatesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithActive adds the active to the get templates params +func (o *GetTemplatesParams) WithActive(active *bool) *GetTemplatesParams { + o.SetActive(active) + return o +} + +// SetActive adds the active to the get templates params +func (o *GetTemplatesParams) SetActive(active *bool) { + o.Active = active +} + +// WithIsMaster adds the isMaster to the get templates params +func (o *GetTemplatesParams) WithIsMaster(isMaster *bool) *GetTemplatesParams { + o.SetIsMaster(isMaster) + return o +} + +// SetIsMaster adds the isMaster to the get templates params +func (o *GetTemplatesParams) SetIsMaster(isMaster *bool) { + o.IsMaster = isMaster +} + +// WithLimit adds the limit to the get templates params +func (o *GetTemplatesParams) WithLimit(limit *int64) *GetTemplatesParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get templates params +func (o *GetTemplatesParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithObjectType adds the objectType to the get templates params +func (o *GetTemplatesParams) WithObjectType(objectType *string) *GetTemplatesParams { + o.SetObjectType(objectType) + return o +} + +// SetObjectType adds the objectType to the get templates params +func (o *GetTemplatesParams) SetObjectType(objectType *string) { + o.ObjectType = objectType +} + +// WithOffset adds the offset to the get templates params +func (o *GetTemplatesParams) WithOffset(offset *int64) *GetTemplatesParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get templates params +func (o *GetTemplatesParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithTemplateID adds the templateID to the get templates params +func (o *GetTemplatesParams) WithTemplateID(templateID *string) *GetTemplatesParams { + o.SetTemplateID(templateID) + return o +} + +// SetTemplateID adds the templateId to the get templates params +func (o *GetTemplatesParams) SetTemplateID(templateID *string) { + o.TemplateID = templateID +} + +// WriteToRequest writes these params to a swagger request +func (o *GetTemplatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Active != nil { + + // query param active + var qrActive bool + if o.Active != nil { + qrActive = *o.Active + } + qActive := swag.FormatBool(qrActive) + if qActive != "" { + if err := r.SetQueryParam("active", qActive); err != nil { + return err + } + } + + } + + if o.IsMaster != nil { + + // query param isMaster + var qrIsMaster bool + if o.IsMaster != nil { + qrIsMaster = *o.IsMaster + } + qIsMaster := swag.FormatBool(qrIsMaster) + if qIsMaster != "" { + if err := r.SetQueryParam("isMaster", qIsMaster); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.ObjectType != nil { + + // query param objectType + var qrObjectType string + if o.ObjectType != nil { + qrObjectType = *o.ObjectType + } + qObjectType := qrObjectType + if qObjectType != "" { + if err := r.SetQueryParam("objectType", qObjectType); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.TemplateID != nil { + + // query param templateId + var qrTemplateID string + if o.TemplateID != nil { + qrTemplateID = *o.TemplateID + } + qTemplateID := qrTemplateID + if qTemplateID != "" { + if err := r.SetQueryParam("templateId", qTemplateID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/template/get_templates_responses.go b/api/devops/v0.0.1/devops_client/template/get_templates_responses.go new file mode 100644 index 0000000..4e61362 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/template/get_templates_responses.go @@ -0,0 +1,313 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package template + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// GetTemplatesReader is a Reader for the GetTemplates structure. +type GetTemplatesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetTemplatesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetTemplatesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetTemplatesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetTemplatesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetTemplatesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetTemplatesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetTemplatesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetTemplatesOK creates a GetTemplatesOK with default headers values +func NewGetTemplatesOK() *GetTemplatesOK { + return &GetTemplatesOK{} +} + +/*GetTemplatesOK handles this case with default header values. + +Taxnexus Response with Template objects +*/ +type GetTemplatesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.TemplateResponse +} + +func (o *GetTemplatesOK) Error() string { + return fmt.Sprintf("[GET /templates][%d] getTemplatesOK %+v", 200, o.Payload) +} + +func (o *GetTemplatesOK) GetPayload() *devops_models.TemplateResponse { + return o.Payload +} + +func (o *GetTemplatesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.TemplateResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTemplatesUnauthorized creates a GetTemplatesUnauthorized with default headers values +func NewGetTemplatesUnauthorized() *GetTemplatesUnauthorized { + return &GetTemplatesUnauthorized{} +} + +/*GetTemplatesUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetTemplatesUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetTemplatesUnauthorized) Error() string { + return fmt.Sprintf("[GET /templates][%d] getTemplatesUnauthorized %+v", 401, o.Payload) +} + +func (o *GetTemplatesUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetTemplatesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTemplatesForbidden creates a GetTemplatesForbidden with default headers values +func NewGetTemplatesForbidden() *GetTemplatesForbidden { + return &GetTemplatesForbidden{} +} + +/*GetTemplatesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetTemplatesForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetTemplatesForbidden) Error() string { + return fmt.Sprintf("[GET /templates][%d] getTemplatesForbidden %+v", 403, o.Payload) +} + +func (o *GetTemplatesForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetTemplatesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTemplatesNotFound creates a GetTemplatesNotFound with default headers values +func NewGetTemplatesNotFound() *GetTemplatesNotFound { + return &GetTemplatesNotFound{} +} + +/*GetTemplatesNotFound handles this case with default header values. + +Resource was not found +*/ +type GetTemplatesNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetTemplatesNotFound) Error() string { + return fmt.Sprintf("[GET /templates][%d] getTemplatesNotFound %+v", 404, o.Payload) +} + +func (o *GetTemplatesNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetTemplatesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTemplatesUnprocessableEntity creates a GetTemplatesUnprocessableEntity with default headers values +func NewGetTemplatesUnprocessableEntity() *GetTemplatesUnprocessableEntity { + return &GetTemplatesUnprocessableEntity{} +} + +/*GetTemplatesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetTemplatesUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetTemplatesUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /templates][%d] getTemplatesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetTemplatesUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetTemplatesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTemplatesInternalServerError creates a GetTemplatesInternalServerError with default headers values +func NewGetTemplatesInternalServerError() *GetTemplatesInternalServerError { + return &GetTemplatesInternalServerError{} +} + +/*GetTemplatesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetTemplatesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetTemplatesInternalServerError) Error() string { + return fmt.Sprintf("[GET /templates][%d] getTemplatesInternalServerError %+v", 500, o.Payload) +} + +func (o *GetTemplatesInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetTemplatesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/template/post_templates_parameters.go b/api/devops/v0.0.1/devops_client/template/post_templates_parameters.go new file mode 100644 index 0000000..59cc23d --- /dev/null +++ b/api/devops/v0.0.1/devops_client/template/post_templates_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package template + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// NewPostTemplatesParams creates a new PostTemplatesParams object +// with the default values initialized. +func NewPostTemplatesParams() *PostTemplatesParams { + var () + return &PostTemplatesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostTemplatesParamsWithTimeout creates a new PostTemplatesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostTemplatesParamsWithTimeout(timeout time.Duration) *PostTemplatesParams { + var () + return &PostTemplatesParams{ + + timeout: timeout, + } +} + +// NewPostTemplatesParamsWithContext creates a new PostTemplatesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostTemplatesParamsWithContext(ctx context.Context) *PostTemplatesParams { + var () + return &PostTemplatesParams{ + + Context: ctx, + } +} + +// NewPostTemplatesParamsWithHTTPClient creates a new PostTemplatesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostTemplatesParamsWithHTTPClient(client *http.Client) *PostTemplatesParams { + var () + return &PostTemplatesParams{ + HTTPClient: client, + } +} + +/*PostTemplatesParams contains all the parameters to send to the API endpoint +for the post templates operation typically these are written to a http.Request +*/ +type PostTemplatesParams struct { + + /*TemplateRequest + An array of Template records + + */ + TemplateRequest *devops_models.TemplateRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post templates params +func (o *PostTemplatesParams) WithTimeout(timeout time.Duration) *PostTemplatesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post templates params +func (o *PostTemplatesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post templates params +func (o *PostTemplatesParams) WithContext(ctx context.Context) *PostTemplatesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post templates params +func (o *PostTemplatesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post templates params +func (o *PostTemplatesParams) WithHTTPClient(client *http.Client) *PostTemplatesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post templates params +func (o *PostTemplatesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTemplateRequest adds the templateRequest to the post templates params +func (o *PostTemplatesParams) WithTemplateRequest(templateRequest *devops_models.TemplateRequest) *PostTemplatesParams { + o.SetTemplateRequest(templateRequest) + return o +} + +// SetTemplateRequest adds the templateRequest to the post templates params +func (o *PostTemplatesParams) SetTemplateRequest(templateRequest *devops_models.TemplateRequest) { + o.TemplateRequest = templateRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostTemplatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.TemplateRequest != nil { + if err := r.SetBodyParam(o.TemplateRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/template/post_templates_responses.go b/api/devops/v0.0.1/devops_client/template/post_templates_responses.go new file mode 100644 index 0000000..9298f39 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/template/post_templates_responses.go @@ -0,0 +1,313 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package template + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// PostTemplatesReader is a Reader for the PostTemplates structure. +type PostTemplatesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostTemplatesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostTemplatesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostTemplatesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostTemplatesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostTemplatesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostTemplatesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostTemplatesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostTemplatesOK creates a PostTemplatesOK with default headers values +func NewPostTemplatesOK() *PostTemplatesOK { + return &PostTemplatesOK{} +} + +/*PostTemplatesOK handles this case with default header values. + +Taxnexus Response with Template objects +*/ +type PostTemplatesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.TemplateResponse +} + +func (o *PostTemplatesOK) Error() string { + return fmt.Sprintf("[POST /templates][%d] postTemplatesOK %+v", 200, o.Payload) +} + +func (o *PostTemplatesOK) GetPayload() *devops_models.TemplateResponse { + return o.Payload +} + +func (o *PostTemplatesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.TemplateResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTemplatesUnauthorized creates a PostTemplatesUnauthorized with default headers values +func NewPostTemplatesUnauthorized() *PostTemplatesUnauthorized { + return &PostTemplatesUnauthorized{} +} + +/*PostTemplatesUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostTemplatesUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *PostTemplatesUnauthorized) Error() string { + return fmt.Sprintf("[POST /templates][%d] postTemplatesUnauthorized %+v", 401, o.Payload) +} + +func (o *PostTemplatesUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostTemplatesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTemplatesForbidden creates a PostTemplatesForbidden with default headers values +func NewPostTemplatesForbidden() *PostTemplatesForbidden { + return &PostTemplatesForbidden{} +} + +/*PostTemplatesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostTemplatesForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PostTemplatesForbidden) Error() string { + return fmt.Sprintf("[POST /templates][%d] postTemplatesForbidden %+v", 403, o.Payload) +} + +func (o *PostTemplatesForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostTemplatesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTemplatesNotFound creates a PostTemplatesNotFound with default headers values +func NewPostTemplatesNotFound() *PostTemplatesNotFound { + return &PostTemplatesNotFound{} +} + +/*PostTemplatesNotFound handles this case with default header values. + +Resource was not found +*/ +type PostTemplatesNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PostTemplatesNotFound) Error() string { + return fmt.Sprintf("[POST /templates][%d] postTemplatesNotFound %+v", 404, o.Payload) +} + +func (o *PostTemplatesNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostTemplatesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTemplatesUnprocessableEntity creates a PostTemplatesUnprocessableEntity with default headers values +func NewPostTemplatesUnprocessableEntity() *PostTemplatesUnprocessableEntity { + return &PostTemplatesUnprocessableEntity{} +} + +/*PostTemplatesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostTemplatesUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *PostTemplatesUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /templates][%d] postTemplatesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostTemplatesUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostTemplatesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTemplatesInternalServerError creates a PostTemplatesInternalServerError with default headers values +func NewPostTemplatesInternalServerError() *PostTemplatesInternalServerError { + return &PostTemplatesInternalServerError{} +} + +/*PostTemplatesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostTemplatesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PostTemplatesInternalServerError) Error() string { + return fmt.Sprintf("[POST /templates][%d] postTemplatesInternalServerError %+v", 500, o.Payload) +} + +func (o *PostTemplatesInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostTemplatesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/template/template_client.go b/api/devops/v0.0.1/devops_client/template/template_client.go new file mode 100644 index 0000000..77737f3 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/template/template_client.go @@ -0,0 +1,196 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package template + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new template API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for template API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetTemplate(params *GetTemplateParams, authInfo runtime.ClientAuthInfoWriter) (*GetTemplateOK, error) + + GetTemplates(params *GetTemplatesParams, authInfo runtime.ClientAuthInfoWriter) (*GetTemplatesOK, error) + + GetTemplatesObservable(params *GetTemplatesObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetTemplatesObservableOK, error) + + PostTemplates(params *PostTemplatesParams, authInfo runtime.ClientAuthInfoWriter) (*PostTemplatesOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetTemplate gets a single template object + + Return a single Template object from datastore as a Singleton +*/ +func (a *Client) GetTemplate(params *GetTemplateParams, authInfo runtime.ClientAuthInfoWriter) (*GetTemplateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetTemplateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getTemplate", + Method: "GET", + PathPattern: "/templates/{templateIdPath}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetTemplateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetTemplateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getTemplate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetTemplates gets a list templates + + Return a list of Templates from the datastore +*/ +func (a *Client) GetTemplates(params *GetTemplatesParams, authInfo runtime.ClientAuthInfoWriter) (*GetTemplatesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetTemplatesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getTemplates", + Method: "GET", + PathPattern: "/templates", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetTemplatesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetTemplatesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getTemplates: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetTemplatesObservable gets templates in an observable array + + Returns a Template retrieval in a observable array +*/ +func (a *Client) GetTemplatesObservable(params *GetTemplatesObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetTemplatesObservableOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetTemplatesObservableParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getTemplatesObservable", + Method: "GET", + PathPattern: "/templates/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetTemplatesObservableReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetTemplatesObservableOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getTemplatesObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostTemplates creates new templates + + Create new Templates +*/ +func (a *Client) PostTemplates(params *PostTemplatesParams, authInfo runtime.ClientAuthInfoWriter) (*PostTemplatesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostTemplatesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postTemplates", + Method: "POST", + PathPattern: "/templates", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostTemplatesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostTemplatesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postTemplates: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/devops/v0.0.1/devops_client/tenant/get_tenant_parameters.go b/api/devops/v0.0.1/devops_client/tenant/get_tenant_parameters.go new file mode 100644 index 0000000..c16b740 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/tenant/get_tenant_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tenant + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetTenantParams creates a new GetTenantParams object +// with the default values initialized. +func NewGetTenantParams() *GetTenantParams { + var () + return &GetTenantParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetTenantParamsWithTimeout creates a new GetTenantParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetTenantParamsWithTimeout(timeout time.Duration) *GetTenantParams { + var () + return &GetTenantParams{ + + timeout: timeout, + } +} + +// NewGetTenantParamsWithContext creates a new GetTenantParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetTenantParamsWithContext(ctx context.Context) *GetTenantParams { + var () + return &GetTenantParams{ + + Context: ctx, + } +} + +// NewGetTenantParamsWithHTTPClient creates a new GetTenantParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetTenantParamsWithHTTPClient(client *http.Client) *GetTenantParams { + var () + return &GetTenantParams{ + HTTPClient: client, + } +} + +/*GetTenantParams contains all the parameters to send to the API endpoint +for the get tenant operation typically these are written to a http.Request +*/ +type GetTenantParams struct { + + /*TenantIDPath + Taxnexus Record Id of a Tenant + + */ + TenantIDPath string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get tenant params +func (o *GetTenantParams) WithTimeout(timeout time.Duration) *GetTenantParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get tenant params +func (o *GetTenantParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get tenant params +func (o *GetTenantParams) WithContext(ctx context.Context) *GetTenantParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get tenant params +func (o *GetTenantParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get tenant params +func (o *GetTenantParams) WithHTTPClient(client *http.Client) *GetTenantParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get tenant params +func (o *GetTenantParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTenantIDPath adds the tenantIDPath to the get tenant params +func (o *GetTenantParams) WithTenantIDPath(tenantIDPath string) *GetTenantParams { + o.SetTenantIDPath(tenantIDPath) + return o +} + +// SetTenantIDPath adds the tenantIdPath to the get tenant params +func (o *GetTenantParams) SetTenantIDPath(tenantIDPath string) { + o.TenantIDPath = tenantIDPath +} + +// WriteToRequest writes these params to a swagger request +func (o *GetTenantParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param tenantIdPath + if err := r.SetPathParam("tenantIdPath", o.TenantIDPath); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/tenant/get_tenant_responses.go b/api/devops/v0.0.1/devops_client/tenant/get_tenant_responses.go new file mode 100644 index 0000000..7596a6d --- /dev/null +++ b/api/devops/v0.0.1/devops_client/tenant/get_tenant_responses.go @@ -0,0 +1,313 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tenant + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// GetTenantReader is a Reader for the GetTenant structure. +type GetTenantReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetTenantReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetTenantOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetTenantUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetTenantForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetTenantNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetTenantUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetTenantInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetTenantOK creates a GetTenantOK with default headers values +func NewGetTenantOK() *GetTenantOK { + return &GetTenantOK{} +} + +/*GetTenantOK handles this case with default header values. + +Single Tenant record response +*/ +type GetTenantOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Tenant +} + +func (o *GetTenantOK) Error() string { + return fmt.Sprintf("[GET /tenants/{tenantIdPath}][%d] getTenantOK %+v", 200, o.Payload) +} + +func (o *GetTenantOK) GetPayload() *devops_models.Tenant { + return o.Payload +} + +func (o *GetTenantOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Tenant) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTenantUnauthorized creates a GetTenantUnauthorized with default headers values +func NewGetTenantUnauthorized() *GetTenantUnauthorized { + return &GetTenantUnauthorized{} +} + +/*GetTenantUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetTenantUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetTenantUnauthorized) Error() string { + return fmt.Sprintf("[GET /tenants/{tenantIdPath}][%d] getTenantUnauthorized %+v", 401, o.Payload) +} + +func (o *GetTenantUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetTenantUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTenantForbidden creates a GetTenantForbidden with default headers values +func NewGetTenantForbidden() *GetTenantForbidden { + return &GetTenantForbidden{} +} + +/*GetTenantForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetTenantForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetTenantForbidden) Error() string { + return fmt.Sprintf("[GET /tenants/{tenantIdPath}][%d] getTenantForbidden %+v", 403, o.Payload) +} + +func (o *GetTenantForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetTenantForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTenantNotFound creates a GetTenantNotFound with default headers values +func NewGetTenantNotFound() *GetTenantNotFound { + return &GetTenantNotFound{} +} + +/*GetTenantNotFound handles this case with default header values. + +Resource was not found +*/ +type GetTenantNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetTenantNotFound) Error() string { + return fmt.Sprintf("[GET /tenants/{tenantIdPath}][%d] getTenantNotFound %+v", 404, o.Payload) +} + +func (o *GetTenantNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetTenantNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTenantUnprocessableEntity creates a GetTenantUnprocessableEntity with default headers values +func NewGetTenantUnprocessableEntity() *GetTenantUnprocessableEntity { + return &GetTenantUnprocessableEntity{} +} + +/*GetTenantUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetTenantUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetTenantUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /tenants/{tenantIdPath}][%d] getTenantUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetTenantUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetTenantUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTenantInternalServerError creates a GetTenantInternalServerError with default headers values +func NewGetTenantInternalServerError() *GetTenantInternalServerError { + return &GetTenantInternalServerError{} +} + +/*GetTenantInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetTenantInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetTenantInternalServerError) Error() string { + return fmt.Sprintf("[GET /tenants/{tenantIdPath}][%d] getTenantInternalServerError %+v", 500, o.Payload) +} + +func (o *GetTenantInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetTenantInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/tenant/get_tenants_observable_parameters.go b/api/devops/v0.0.1/devops_client/tenant/get_tenants_observable_parameters.go new file mode 100644 index 0000000..114fd8c --- /dev/null +++ b/api/devops/v0.0.1/devops_client/tenant/get_tenants_observable_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tenant + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetTenantsObservableParams creates a new GetTenantsObservableParams object +// with the default values initialized. +func NewGetTenantsObservableParams() *GetTenantsObservableParams { + + return &GetTenantsObservableParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetTenantsObservableParamsWithTimeout creates a new GetTenantsObservableParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetTenantsObservableParamsWithTimeout(timeout time.Duration) *GetTenantsObservableParams { + + return &GetTenantsObservableParams{ + + timeout: timeout, + } +} + +// NewGetTenantsObservableParamsWithContext creates a new GetTenantsObservableParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetTenantsObservableParamsWithContext(ctx context.Context) *GetTenantsObservableParams { + + return &GetTenantsObservableParams{ + + Context: ctx, + } +} + +// NewGetTenantsObservableParamsWithHTTPClient creates a new GetTenantsObservableParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetTenantsObservableParamsWithHTTPClient(client *http.Client) *GetTenantsObservableParams { + + return &GetTenantsObservableParams{ + HTTPClient: client, + } +} + +/*GetTenantsObservableParams contains all the parameters to send to the API endpoint +for the get tenants observable operation typically these are written to a http.Request +*/ +type GetTenantsObservableParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get tenants observable params +func (o *GetTenantsObservableParams) WithTimeout(timeout time.Duration) *GetTenantsObservableParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get tenants observable params +func (o *GetTenantsObservableParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get tenants observable params +func (o *GetTenantsObservableParams) WithContext(ctx context.Context) *GetTenantsObservableParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get tenants observable params +func (o *GetTenantsObservableParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get tenants observable params +func (o *GetTenantsObservableParams) WithHTTPClient(client *http.Client) *GetTenantsObservableParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get tenants observable params +func (o *GetTenantsObservableParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *GetTenantsObservableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/tenant/get_tenants_observable_responses.go b/api/devops/v0.0.1/devops_client/tenant/get_tenants_observable_responses.go new file mode 100644 index 0000000..8393efc --- /dev/null +++ b/api/devops/v0.0.1/devops_client/tenant/get_tenants_observable_responses.go @@ -0,0 +1,311 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tenant + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// GetTenantsObservableReader is a Reader for the GetTenantsObservable structure. +type GetTenantsObservableReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetTenantsObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetTenantsObservableOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetTenantsObservableUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetTenantsObservableForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetTenantsObservableNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetTenantsObservableUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetTenantsObservableInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetTenantsObservableOK creates a GetTenantsObservableOK with default headers values +func NewGetTenantsObservableOK() *GetTenantsObservableOK { + return &GetTenantsObservableOK{} +} + +/*GetTenantsObservableOK handles this case with default header values. + +Single Tenant record response +*/ +type GetTenantsObservableOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload []*devops_models.Tenant +} + +func (o *GetTenantsObservableOK) Error() string { + return fmt.Sprintf("[GET /tenants/observable][%d] getTenantsObservableOK %+v", 200, o.Payload) +} + +func (o *GetTenantsObservableOK) GetPayload() []*devops_models.Tenant { + return o.Payload +} + +func (o *GetTenantsObservableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTenantsObservableUnauthorized creates a GetTenantsObservableUnauthorized with default headers values +func NewGetTenantsObservableUnauthorized() *GetTenantsObservableUnauthorized { + return &GetTenantsObservableUnauthorized{} +} + +/*GetTenantsObservableUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetTenantsObservableUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetTenantsObservableUnauthorized) Error() string { + return fmt.Sprintf("[GET /tenants/observable][%d] getTenantsObservableUnauthorized %+v", 401, o.Payload) +} + +func (o *GetTenantsObservableUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetTenantsObservableUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTenantsObservableForbidden creates a GetTenantsObservableForbidden with default headers values +func NewGetTenantsObservableForbidden() *GetTenantsObservableForbidden { + return &GetTenantsObservableForbidden{} +} + +/*GetTenantsObservableForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetTenantsObservableForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetTenantsObservableForbidden) Error() string { + return fmt.Sprintf("[GET /tenants/observable][%d] getTenantsObservableForbidden %+v", 403, o.Payload) +} + +func (o *GetTenantsObservableForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetTenantsObservableForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTenantsObservableNotFound creates a GetTenantsObservableNotFound with default headers values +func NewGetTenantsObservableNotFound() *GetTenantsObservableNotFound { + return &GetTenantsObservableNotFound{} +} + +/*GetTenantsObservableNotFound handles this case with default header values. + +Resource was not found +*/ +type GetTenantsObservableNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetTenantsObservableNotFound) Error() string { + return fmt.Sprintf("[GET /tenants/observable][%d] getTenantsObservableNotFound %+v", 404, o.Payload) +} + +func (o *GetTenantsObservableNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetTenantsObservableNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTenantsObservableUnprocessableEntity creates a GetTenantsObservableUnprocessableEntity with default headers values +func NewGetTenantsObservableUnprocessableEntity() *GetTenantsObservableUnprocessableEntity { + return &GetTenantsObservableUnprocessableEntity{} +} + +/*GetTenantsObservableUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetTenantsObservableUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetTenantsObservableUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /tenants/observable][%d] getTenantsObservableUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetTenantsObservableUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetTenantsObservableUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTenantsObservableInternalServerError creates a GetTenantsObservableInternalServerError with default headers values +func NewGetTenantsObservableInternalServerError() *GetTenantsObservableInternalServerError { + return &GetTenantsObservableInternalServerError{} +} + +/*GetTenantsObservableInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetTenantsObservableInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetTenantsObservableInternalServerError) Error() string { + return fmt.Sprintf("[GET /tenants/observable][%d] getTenantsObservableInternalServerError %+v", 500, o.Payload) +} + +func (o *GetTenantsObservableInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetTenantsObservableInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/tenant/get_tenants_parameters.go b/api/devops/v0.0.1/devops_client/tenant/get_tenants_parameters.go new file mode 100644 index 0000000..610229f --- /dev/null +++ b/api/devops/v0.0.1/devops_client/tenant/get_tenants_parameters.go @@ -0,0 +1,279 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tenant + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetTenantsParams creates a new GetTenantsParams object +// with the default values initialized. +func NewGetTenantsParams() *GetTenantsParams { + var () + return &GetTenantsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetTenantsParamsWithTimeout creates a new GetTenantsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetTenantsParamsWithTimeout(timeout time.Duration) *GetTenantsParams { + var () + return &GetTenantsParams{ + + timeout: timeout, + } +} + +// NewGetTenantsParamsWithContext creates a new GetTenantsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetTenantsParamsWithContext(ctx context.Context) *GetTenantsParams { + var () + return &GetTenantsParams{ + + Context: ctx, + } +} + +// NewGetTenantsParamsWithHTTPClient creates a new GetTenantsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetTenantsParamsWithHTTPClient(client *http.Client) *GetTenantsParams { + var () + return &GetTenantsParams{ + HTTPClient: client, + } +} + +/*GetTenantsParams contains all the parameters to send to the API endpoint +for the get tenants operation typically these are written to a http.Request +*/ +type GetTenantsParams struct { + + /*CompanyID + Taxnexus Record Id of a Company + + */ + CompanyID *string + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + /*TaxnexusAccount + Taxnexus Account of a Tenant + + */ + TaxnexusAccount *string + /*TenantID + Taxnexus Record Id of a Tenant + + */ + TenantID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get tenants params +func (o *GetTenantsParams) WithTimeout(timeout time.Duration) *GetTenantsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get tenants params +func (o *GetTenantsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get tenants params +func (o *GetTenantsParams) WithContext(ctx context.Context) *GetTenantsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get tenants params +func (o *GetTenantsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get tenants params +func (o *GetTenantsParams) WithHTTPClient(client *http.Client) *GetTenantsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get tenants params +func (o *GetTenantsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCompanyID adds the companyID to the get tenants params +func (o *GetTenantsParams) WithCompanyID(companyID *string) *GetTenantsParams { + o.SetCompanyID(companyID) + return o +} + +// SetCompanyID adds the companyId to the get tenants params +func (o *GetTenantsParams) SetCompanyID(companyID *string) { + o.CompanyID = companyID +} + +// WithLimit adds the limit to the get tenants params +func (o *GetTenantsParams) WithLimit(limit *int64) *GetTenantsParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get tenants params +func (o *GetTenantsParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get tenants params +func (o *GetTenantsParams) WithOffset(offset *int64) *GetTenantsParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get tenants params +func (o *GetTenantsParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithTaxnexusAccount adds the taxnexusAccount to the get tenants params +func (o *GetTenantsParams) WithTaxnexusAccount(taxnexusAccount *string) *GetTenantsParams { + o.SetTaxnexusAccount(taxnexusAccount) + return o +} + +// SetTaxnexusAccount adds the taxnexusAccount to the get tenants params +func (o *GetTenantsParams) SetTaxnexusAccount(taxnexusAccount *string) { + o.TaxnexusAccount = taxnexusAccount +} + +// WithTenantID adds the tenantID to the get tenants params +func (o *GetTenantsParams) WithTenantID(tenantID *string) *GetTenantsParams { + o.SetTenantID(tenantID) + return o +} + +// SetTenantID adds the tenantId to the get tenants params +func (o *GetTenantsParams) SetTenantID(tenantID *string) { + o.TenantID = tenantID +} + +// WriteToRequest writes these params to a swagger request +func (o *GetTenantsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CompanyID != nil { + + // query param companyId + var qrCompanyID string + if o.CompanyID != nil { + qrCompanyID = *o.CompanyID + } + qCompanyID := qrCompanyID + if qCompanyID != "" { + if err := r.SetQueryParam("companyId", qCompanyID); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.TaxnexusAccount != nil { + + // query param taxnexusAccount + var qrTaxnexusAccount string + if o.TaxnexusAccount != nil { + qrTaxnexusAccount = *o.TaxnexusAccount + } + qTaxnexusAccount := qrTaxnexusAccount + if qTaxnexusAccount != "" { + if err := r.SetQueryParam("taxnexusAccount", qTaxnexusAccount); err != nil { + return err + } + } + + } + + if o.TenantID != nil { + + // query param tenantId + var qrTenantID string + if o.TenantID != nil { + qrTenantID = *o.TenantID + } + qTenantID := qrTenantID + if qTenantID != "" { + if err := r.SetQueryParam("tenantId", qTenantID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/tenant/get_tenants_responses.go b/api/devops/v0.0.1/devops_client/tenant/get_tenants_responses.go new file mode 100644 index 0000000..54b7c4b --- /dev/null +++ b/api/devops/v0.0.1/devops_client/tenant/get_tenants_responses.go @@ -0,0 +1,308 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tenant + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// GetTenantsReader is a Reader for the GetTenants structure. +type GetTenantsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetTenantsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetTenantsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetTenantsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetTenantsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetTenantsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetTenantsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetTenantsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetTenantsOK creates a GetTenantsOK with default headers values +func NewGetTenantsOK() *GetTenantsOK { + return &GetTenantsOK{} +} + +/*GetTenantsOK handles this case with default header values. + +Taxnexus Response with Tenant objects +*/ +type GetTenantsOK struct { + AccessControlAllowOrigin string + + Payload *devops_models.TenantResponse +} + +func (o *GetTenantsOK) Error() string { + return fmt.Sprintf("[GET /tenants][%d] getTenantsOK %+v", 200, o.Payload) +} + +func (o *GetTenantsOK) GetPayload() *devops_models.TenantResponse { + return o.Payload +} + +func (o *GetTenantsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.TenantResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTenantsUnauthorized creates a GetTenantsUnauthorized with default headers values +func NewGetTenantsUnauthorized() *GetTenantsUnauthorized { + return &GetTenantsUnauthorized{} +} + +/*GetTenantsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetTenantsUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetTenantsUnauthorized) Error() string { + return fmt.Sprintf("[GET /tenants][%d] getTenantsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetTenantsUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetTenantsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTenantsForbidden creates a GetTenantsForbidden with default headers values +func NewGetTenantsForbidden() *GetTenantsForbidden { + return &GetTenantsForbidden{} +} + +/*GetTenantsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetTenantsForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetTenantsForbidden) Error() string { + return fmt.Sprintf("[GET /tenants][%d] getTenantsForbidden %+v", 403, o.Payload) +} + +func (o *GetTenantsForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetTenantsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTenantsNotFound creates a GetTenantsNotFound with default headers values +func NewGetTenantsNotFound() *GetTenantsNotFound { + return &GetTenantsNotFound{} +} + +/*GetTenantsNotFound handles this case with default header values. + +Resource was not found +*/ +type GetTenantsNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetTenantsNotFound) Error() string { + return fmt.Sprintf("[GET /tenants][%d] getTenantsNotFound %+v", 404, o.Payload) +} + +func (o *GetTenantsNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetTenantsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTenantsUnprocessableEntity creates a GetTenantsUnprocessableEntity with default headers values +func NewGetTenantsUnprocessableEntity() *GetTenantsUnprocessableEntity { + return &GetTenantsUnprocessableEntity{} +} + +/*GetTenantsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetTenantsUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetTenantsUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /tenants][%d] getTenantsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetTenantsUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetTenantsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTenantsInternalServerError creates a GetTenantsInternalServerError with default headers values +func NewGetTenantsInternalServerError() *GetTenantsInternalServerError { + return &GetTenantsInternalServerError{} +} + +/*GetTenantsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetTenantsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetTenantsInternalServerError) Error() string { + return fmt.Sprintf("[GET /tenants][%d] getTenantsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetTenantsInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetTenantsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/tenant/post_tenants_parameters.go b/api/devops/v0.0.1/devops_client/tenant/post_tenants_parameters.go new file mode 100644 index 0000000..ae56a90 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/tenant/post_tenants_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tenant + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// NewPostTenantsParams creates a new PostTenantsParams object +// with the default values initialized. +func NewPostTenantsParams() *PostTenantsParams { + var () + return &PostTenantsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostTenantsParamsWithTimeout creates a new PostTenantsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostTenantsParamsWithTimeout(timeout time.Duration) *PostTenantsParams { + var () + return &PostTenantsParams{ + + timeout: timeout, + } +} + +// NewPostTenantsParamsWithContext creates a new PostTenantsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostTenantsParamsWithContext(ctx context.Context) *PostTenantsParams { + var () + return &PostTenantsParams{ + + Context: ctx, + } +} + +// NewPostTenantsParamsWithHTTPClient creates a new PostTenantsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostTenantsParamsWithHTTPClient(client *http.Client) *PostTenantsParams { + var () + return &PostTenantsParams{ + HTTPClient: client, + } +} + +/*PostTenantsParams contains all the parameters to send to the API endpoint +for the post tenants operation typically these are written to a http.Request +*/ +type PostTenantsParams struct { + + /*TenantRequest + An array of Tenant records + + */ + TenantRequest *devops_models.TenantRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post tenants params +func (o *PostTenantsParams) WithTimeout(timeout time.Duration) *PostTenantsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post tenants params +func (o *PostTenantsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post tenants params +func (o *PostTenantsParams) WithContext(ctx context.Context) *PostTenantsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post tenants params +func (o *PostTenantsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post tenants params +func (o *PostTenantsParams) WithHTTPClient(client *http.Client) *PostTenantsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post tenants params +func (o *PostTenantsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTenantRequest adds the tenantRequest to the post tenants params +func (o *PostTenantsParams) WithTenantRequest(tenantRequest *devops_models.TenantRequest) *PostTenantsParams { + o.SetTenantRequest(tenantRequest) + return o +} + +// SetTenantRequest adds the tenantRequest to the post tenants params +func (o *PostTenantsParams) SetTenantRequest(tenantRequest *devops_models.TenantRequest) { + o.TenantRequest = tenantRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostTenantsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.TenantRequest != nil { + if err := r.SetBodyParam(o.TenantRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/tenant/post_tenants_responses.go b/api/devops/v0.0.1/devops_client/tenant/post_tenants_responses.go new file mode 100644 index 0000000..a8bb6fc --- /dev/null +++ b/api/devops/v0.0.1/devops_client/tenant/post_tenants_responses.go @@ -0,0 +1,308 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tenant + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// PostTenantsReader is a Reader for the PostTenants structure. +type PostTenantsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostTenantsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostTenantsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostTenantsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostTenantsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostTenantsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostTenantsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostTenantsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostTenantsOK creates a PostTenantsOK with default headers values +func NewPostTenantsOK() *PostTenantsOK { + return &PostTenantsOK{} +} + +/*PostTenantsOK handles this case with default header values. + +Taxnexus Response with Tenant objects +*/ +type PostTenantsOK struct { + AccessControlAllowOrigin string + + Payload *devops_models.TenantResponse +} + +func (o *PostTenantsOK) Error() string { + return fmt.Sprintf("[POST /tenants][%d] postTenantsOK %+v", 200, o.Payload) +} + +func (o *PostTenantsOK) GetPayload() *devops_models.TenantResponse { + return o.Payload +} + +func (o *PostTenantsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.TenantResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTenantsUnauthorized creates a PostTenantsUnauthorized with default headers values +func NewPostTenantsUnauthorized() *PostTenantsUnauthorized { + return &PostTenantsUnauthorized{} +} + +/*PostTenantsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostTenantsUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *PostTenantsUnauthorized) Error() string { + return fmt.Sprintf("[POST /tenants][%d] postTenantsUnauthorized %+v", 401, o.Payload) +} + +func (o *PostTenantsUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostTenantsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTenantsForbidden creates a PostTenantsForbidden with default headers values +func NewPostTenantsForbidden() *PostTenantsForbidden { + return &PostTenantsForbidden{} +} + +/*PostTenantsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostTenantsForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PostTenantsForbidden) Error() string { + return fmt.Sprintf("[POST /tenants][%d] postTenantsForbidden %+v", 403, o.Payload) +} + +func (o *PostTenantsForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostTenantsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTenantsNotFound creates a PostTenantsNotFound with default headers values +func NewPostTenantsNotFound() *PostTenantsNotFound { + return &PostTenantsNotFound{} +} + +/*PostTenantsNotFound handles this case with default header values. + +Resource was not found +*/ +type PostTenantsNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PostTenantsNotFound) Error() string { + return fmt.Sprintf("[POST /tenants][%d] postTenantsNotFound %+v", 404, o.Payload) +} + +func (o *PostTenantsNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostTenantsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTenantsUnprocessableEntity creates a PostTenantsUnprocessableEntity with default headers values +func NewPostTenantsUnprocessableEntity() *PostTenantsUnprocessableEntity { + return &PostTenantsUnprocessableEntity{} +} + +/*PostTenantsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostTenantsUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *PostTenantsUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /tenants][%d] postTenantsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostTenantsUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostTenantsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTenantsInternalServerError creates a PostTenantsInternalServerError with default headers values +func NewPostTenantsInternalServerError() *PostTenantsInternalServerError { + return &PostTenantsInternalServerError{} +} + +/*PostTenantsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostTenantsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PostTenantsInternalServerError) Error() string { + return fmt.Sprintf("[POST /tenants][%d] postTenantsInternalServerError %+v", 500, o.Payload) +} + +func (o *PostTenantsInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostTenantsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/tenant/put_tenants_parameters.go b/api/devops/v0.0.1/devops_client/tenant/put_tenants_parameters.go new file mode 100644 index 0000000..5ff08c8 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/tenant/put_tenants_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tenant + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// NewPutTenantsParams creates a new PutTenantsParams object +// with the default values initialized. +func NewPutTenantsParams() *PutTenantsParams { + var () + return &PutTenantsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPutTenantsParamsWithTimeout creates a new PutTenantsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPutTenantsParamsWithTimeout(timeout time.Duration) *PutTenantsParams { + var () + return &PutTenantsParams{ + + timeout: timeout, + } +} + +// NewPutTenantsParamsWithContext creates a new PutTenantsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPutTenantsParamsWithContext(ctx context.Context) *PutTenantsParams { + var () + return &PutTenantsParams{ + + Context: ctx, + } +} + +// NewPutTenantsParamsWithHTTPClient creates a new PutTenantsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPutTenantsParamsWithHTTPClient(client *http.Client) *PutTenantsParams { + var () + return &PutTenantsParams{ + HTTPClient: client, + } +} + +/*PutTenantsParams contains all the parameters to send to the API endpoint +for the put tenants operation typically these are written to a http.Request +*/ +type PutTenantsParams struct { + + /*TenantRequest + An array of Tenant records + + */ + TenantRequest *devops_models.TenantRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the put tenants params +func (o *PutTenantsParams) WithTimeout(timeout time.Duration) *PutTenantsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the put tenants params +func (o *PutTenantsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the put tenants params +func (o *PutTenantsParams) WithContext(ctx context.Context) *PutTenantsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the put tenants params +func (o *PutTenantsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the put tenants params +func (o *PutTenantsParams) WithHTTPClient(client *http.Client) *PutTenantsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the put tenants params +func (o *PutTenantsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTenantRequest adds the tenantRequest to the put tenants params +func (o *PutTenantsParams) WithTenantRequest(tenantRequest *devops_models.TenantRequest) *PutTenantsParams { + o.SetTenantRequest(tenantRequest) + return o +} + +// SetTenantRequest adds the tenantRequest to the put tenants params +func (o *PutTenantsParams) SetTenantRequest(tenantRequest *devops_models.TenantRequest) { + o.TenantRequest = tenantRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PutTenantsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.TenantRequest != nil { + if err := r.SetBodyParam(o.TenantRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/tenant/put_tenants_responses.go b/api/devops/v0.0.1/devops_client/tenant/put_tenants_responses.go new file mode 100644 index 0000000..218c9f2 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/tenant/put_tenants_responses.go @@ -0,0 +1,308 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tenant + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// PutTenantsReader is a Reader for the PutTenants structure. +type PutTenantsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PutTenantsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPutTenantsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPutTenantsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPutTenantsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPutTenantsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPutTenantsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPutTenantsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPutTenantsOK creates a PutTenantsOK with default headers values +func NewPutTenantsOK() *PutTenantsOK { + return &PutTenantsOK{} +} + +/*PutTenantsOK handles this case with default header values. + +Taxnexus Response with Tenant objects +*/ +type PutTenantsOK struct { + AccessControlAllowOrigin string + + Payload *devops_models.TenantResponse +} + +func (o *PutTenantsOK) Error() string { + return fmt.Sprintf("[PUT /tenants][%d] putTenantsOK %+v", 200, o.Payload) +} + +func (o *PutTenantsOK) GetPayload() *devops_models.TenantResponse { + return o.Payload +} + +func (o *PutTenantsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.TenantResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutTenantsUnauthorized creates a PutTenantsUnauthorized with default headers values +func NewPutTenantsUnauthorized() *PutTenantsUnauthorized { + return &PutTenantsUnauthorized{} +} + +/*PutTenantsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PutTenantsUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *PutTenantsUnauthorized) Error() string { + return fmt.Sprintf("[PUT /tenants][%d] putTenantsUnauthorized %+v", 401, o.Payload) +} + +func (o *PutTenantsUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutTenantsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutTenantsForbidden creates a PutTenantsForbidden with default headers values +func NewPutTenantsForbidden() *PutTenantsForbidden { + return &PutTenantsForbidden{} +} + +/*PutTenantsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PutTenantsForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PutTenantsForbidden) Error() string { + return fmt.Sprintf("[PUT /tenants][%d] putTenantsForbidden %+v", 403, o.Payload) +} + +func (o *PutTenantsForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutTenantsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutTenantsNotFound creates a PutTenantsNotFound with default headers values +func NewPutTenantsNotFound() *PutTenantsNotFound { + return &PutTenantsNotFound{} +} + +/*PutTenantsNotFound handles this case with default header values. + +Resource was not found +*/ +type PutTenantsNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PutTenantsNotFound) Error() string { + return fmt.Sprintf("[PUT /tenants][%d] putTenantsNotFound %+v", 404, o.Payload) +} + +func (o *PutTenantsNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutTenantsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutTenantsUnprocessableEntity creates a PutTenantsUnprocessableEntity with default headers values +func NewPutTenantsUnprocessableEntity() *PutTenantsUnprocessableEntity { + return &PutTenantsUnprocessableEntity{} +} + +/*PutTenantsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PutTenantsUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *PutTenantsUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /tenants][%d] putTenantsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutTenantsUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutTenantsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutTenantsInternalServerError creates a PutTenantsInternalServerError with default headers values +func NewPutTenantsInternalServerError() *PutTenantsInternalServerError { + return &PutTenantsInternalServerError{} +} + +/*PutTenantsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PutTenantsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PutTenantsInternalServerError) Error() string { + return fmt.Sprintf("[PUT /tenants][%d] putTenantsInternalServerError %+v", 500, o.Payload) +} + +func (o *PutTenantsInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutTenantsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/tenant/tenant_client.go b/api/devops/v0.0.1/devops_client/tenant/tenant_client.go new file mode 100644 index 0000000..5927004 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/tenant/tenant_client.go @@ -0,0 +1,235 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tenant + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new tenant API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for tenant API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetTenant(params *GetTenantParams, authInfo runtime.ClientAuthInfoWriter) (*GetTenantOK, error) + + GetTenants(params *GetTenantsParams, authInfo runtime.ClientAuthInfoWriter) (*GetTenantsOK, error) + + GetTenantsObservable(params *GetTenantsObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetTenantsObservableOK, error) + + PostTenants(params *PostTenantsParams, authInfo runtime.ClientAuthInfoWriter) (*PostTenantsOK, error) + + PutTenants(params *PutTenantsParams, authInfo runtime.ClientAuthInfoWriter) (*PutTenantsOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetTenant gets a single tenant object + + Return a single Tenant object from datastore as a Singleton +*/ +func (a *Client) GetTenant(params *GetTenantParams, authInfo runtime.ClientAuthInfoWriter) (*GetTenantOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetTenantParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getTenant", + Method: "GET", + PathPattern: "/tenants/{tenantIdPath}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetTenantReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetTenantOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getTenant: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetTenants gets a list tenants + + Return a list of Tenant records from the datastore +*/ +func (a *Client) GetTenants(params *GetTenantsParams, authInfo runtime.ClientAuthInfoWriter) (*GetTenantsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetTenantsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getTenants", + Method: "GET", + PathPattern: "/tenants", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetTenantsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetTenantsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getTenants: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetTenantsObservable gets tenants in an observable array + + Returns a Tenant retrieval in a observable array +*/ +func (a *Client) GetTenantsObservable(params *GetTenantsObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetTenantsObservableOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetTenantsObservableParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getTenantsObservable", + Method: "GET", + PathPattern: "/tenants/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetTenantsObservableReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetTenantsObservableOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getTenantsObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostTenants creates new tenants + + Create Tenants in Taxnexus +*/ +func (a *Client) PostTenants(params *PostTenantsParams, authInfo runtime.ClientAuthInfoWriter) (*PostTenantsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostTenantsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postTenants", + Method: "POST", + PathPattern: "/tenants", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostTenantsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostTenantsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postTenants: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PutTenants updates tenants + + Update Tenant in Taxnexus +*/ +func (a *Client) PutTenants(params *PutTenantsParams, authInfo runtime.ClientAuthInfoWriter) (*PutTenantsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPutTenantsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "putTenants", + Method: "PUT", + PathPattern: "/tenants", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PutTenantsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PutTenantsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for putTenants: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/devops/v0.0.1/devops_client/user/get_user_parameters.go b/api/devops/v0.0.1/devops_client/user/get_user_parameters.go new file mode 100644 index 0000000..7509e09 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/user/get_user_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package user + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetUserParams creates a new GetUserParams object +// with the default values initialized. +func NewGetUserParams() *GetUserParams { + var () + return &GetUserParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetUserParamsWithTimeout creates a new GetUserParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetUserParamsWithTimeout(timeout time.Duration) *GetUserParams { + var () + return &GetUserParams{ + + timeout: timeout, + } +} + +// NewGetUserParamsWithContext creates a new GetUserParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetUserParamsWithContext(ctx context.Context) *GetUserParams { + var () + return &GetUserParams{ + + Context: ctx, + } +} + +// NewGetUserParamsWithHTTPClient creates a new GetUserParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetUserParamsWithHTTPClient(client *http.Client) *GetUserParams { + var () + return &GetUserParams{ + HTTPClient: client, + } +} + +/*GetUserParams contains all the parameters to send to the API endpoint +for the get user operation typically these are written to a http.Request +*/ +type GetUserParams struct { + + /*UserIDPath + Taxnexus Record Id of a User + + */ + UserIDPath string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get user params +func (o *GetUserParams) WithTimeout(timeout time.Duration) *GetUserParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get user params +func (o *GetUserParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get user params +func (o *GetUserParams) WithContext(ctx context.Context) *GetUserParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get user params +func (o *GetUserParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get user params +func (o *GetUserParams) WithHTTPClient(client *http.Client) *GetUserParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get user params +func (o *GetUserParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUserIDPath adds the userIDPath to the get user params +func (o *GetUserParams) WithUserIDPath(userIDPath string) *GetUserParams { + o.SetUserIDPath(userIDPath) + return o +} + +// SetUserIDPath adds the userIdPath to the get user params +func (o *GetUserParams) SetUserIDPath(userIDPath string) { + o.UserIDPath = userIDPath +} + +// WriteToRequest writes these params to a swagger request +func (o *GetUserParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param userIdPath + if err := r.SetPathParam("userIdPath", o.UserIDPath); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/user/get_user_responses.go b/api/devops/v0.0.1/devops_client/user/get_user_responses.go new file mode 100644 index 0000000..384c79b --- /dev/null +++ b/api/devops/v0.0.1/devops_client/user/get_user_responses.go @@ -0,0 +1,313 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package user + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// GetUserReader is a Reader for the GetUser structure. +type GetUserReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetUserReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetUserOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetUserUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetUserForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetUserNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetUserUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetUserInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetUserOK creates a GetUserOK with default headers values +func NewGetUserOK() *GetUserOK { + return &GetUserOK{} +} + +/*GetUserOK handles this case with default header values. + +Single User record response +*/ +type GetUserOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.User +} + +func (o *GetUserOK) Error() string { + return fmt.Sprintf("[GET /users/{userIdPath}][%d] getUserOK %+v", 200, o.Payload) +} + +func (o *GetUserOK) GetPayload() *devops_models.User { + return o.Payload +} + +func (o *GetUserOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.User) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetUserUnauthorized creates a GetUserUnauthorized with default headers values +func NewGetUserUnauthorized() *GetUserUnauthorized { + return &GetUserUnauthorized{} +} + +/*GetUserUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetUserUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetUserUnauthorized) Error() string { + return fmt.Sprintf("[GET /users/{userIdPath}][%d] getUserUnauthorized %+v", 401, o.Payload) +} + +func (o *GetUserUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetUserUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetUserForbidden creates a GetUserForbidden with default headers values +func NewGetUserForbidden() *GetUserForbidden { + return &GetUserForbidden{} +} + +/*GetUserForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetUserForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetUserForbidden) Error() string { + return fmt.Sprintf("[GET /users/{userIdPath}][%d] getUserForbidden %+v", 403, o.Payload) +} + +func (o *GetUserForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetUserForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetUserNotFound creates a GetUserNotFound with default headers values +func NewGetUserNotFound() *GetUserNotFound { + return &GetUserNotFound{} +} + +/*GetUserNotFound handles this case with default header values. + +Resource was not found +*/ +type GetUserNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetUserNotFound) Error() string { + return fmt.Sprintf("[GET /users/{userIdPath}][%d] getUserNotFound %+v", 404, o.Payload) +} + +func (o *GetUserNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetUserNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetUserUnprocessableEntity creates a GetUserUnprocessableEntity with default headers values +func NewGetUserUnprocessableEntity() *GetUserUnprocessableEntity { + return &GetUserUnprocessableEntity{} +} + +/*GetUserUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetUserUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetUserUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /users/{userIdPath}][%d] getUserUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetUserUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetUserUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetUserInternalServerError creates a GetUserInternalServerError with default headers values +func NewGetUserInternalServerError() *GetUserInternalServerError { + return &GetUserInternalServerError{} +} + +/*GetUserInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetUserInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetUserInternalServerError) Error() string { + return fmt.Sprintf("[GET /users/{userIdPath}][%d] getUserInternalServerError %+v", 500, o.Payload) +} + +func (o *GetUserInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetUserInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/user/get_users_observable_parameters.go b/api/devops/v0.0.1/devops_client/user/get_users_observable_parameters.go new file mode 100644 index 0000000..65f991f --- /dev/null +++ b/api/devops/v0.0.1/devops_client/user/get_users_observable_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package user + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetUsersObservableParams creates a new GetUsersObservableParams object +// with the default values initialized. +func NewGetUsersObservableParams() *GetUsersObservableParams { + + return &GetUsersObservableParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetUsersObservableParamsWithTimeout creates a new GetUsersObservableParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetUsersObservableParamsWithTimeout(timeout time.Duration) *GetUsersObservableParams { + + return &GetUsersObservableParams{ + + timeout: timeout, + } +} + +// NewGetUsersObservableParamsWithContext creates a new GetUsersObservableParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetUsersObservableParamsWithContext(ctx context.Context) *GetUsersObservableParams { + + return &GetUsersObservableParams{ + + Context: ctx, + } +} + +// NewGetUsersObservableParamsWithHTTPClient creates a new GetUsersObservableParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetUsersObservableParamsWithHTTPClient(client *http.Client) *GetUsersObservableParams { + + return &GetUsersObservableParams{ + HTTPClient: client, + } +} + +/*GetUsersObservableParams contains all the parameters to send to the API endpoint +for the get users observable operation typically these are written to a http.Request +*/ +type GetUsersObservableParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get users observable params +func (o *GetUsersObservableParams) WithTimeout(timeout time.Duration) *GetUsersObservableParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get users observable params +func (o *GetUsersObservableParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get users observable params +func (o *GetUsersObservableParams) WithContext(ctx context.Context) *GetUsersObservableParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get users observable params +func (o *GetUsersObservableParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get users observable params +func (o *GetUsersObservableParams) WithHTTPClient(client *http.Client) *GetUsersObservableParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get users observable params +func (o *GetUsersObservableParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *GetUsersObservableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/user/get_users_observable_responses.go b/api/devops/v0.0.1/devops_client/user/get_users_observable_responses.go new file mode 100644 index 0000000..f08b857 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/user/get_users_observable_responses.go @@ -0,0 +1,311 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package user + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// GetUsersObservableReader is a Reader for the GetUsersObservable structure. +type GetUsersObservableReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetUsersObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetUsersObservableOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetUsersObservableUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetUsersObservableForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetUsersObservableNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetUsersObservableUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetUsersObservableInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetUsersObservableOK creates a GetUsersObservableOK with default headers values +func NewGetUsersObservableOK() *GetUsersObservableOK { + return &GetUsersObservableOK{} +} + +/*GetUsersObservableOK handles this case with default header values. + +Simple User record response +*/ +type GetUsersObservableOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload []*devops_models.User +} + +func (o *GetUsersObservableOK) Error() string { + return fmt.Sprintf("[GET /users/observable][%d] getUsersObservableOK %+v", 200, o.Payload) +} + +func (o *GetUsersObservableOK) GetPayload() []*devops_models.User { + return o.Payload +} + +func (o *GetUsersObservableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetUsersObservableUnauthorized creates a GetUsersObservableUnauthorized with default headers values +func NewGetUsersObservableUnauthorized() *GetUsersObservableUnauthorized { + return &GetUsersObservableUnauthorized{} +} + +/*GetUsersObservableUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetUsersObservableUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetUsersObservableUnauthorized) Error() string { + return fmt.Sprintf("[GET /users/observable][%d] getUsersObservableUnauthorized %+v", 401, o.Payload) +} + +func (o *GetUsersObservableUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetUsersObservableUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetUsersObservableForbidden creates a GetUsersObservableForbidden with default headers values +func NewGetUsersObservableForbidden() *GetUsersObservableForbidden { + return &GetUsersObservableForbidden{} +} + +/*GetUsersObservableForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetUsersObservableForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetUsersObservableForbidden) Error() string { + return fmt.Sprintf("[GET /users/observable][%d] getUsersObservableForbidden %+v", 403, o.Payload) +} + +func (o *GetUsersObservableForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetUsersObservableForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetUsersObservableNotFound creates a GetUsersObservableNotFound with default headers values +func NewGetUsersObservableNotFound() *GetUsersObservableNotFound { + return &GetUsersObservableNotFound{} +} + +/*GetUsersObservableNotFound handles this case with default header values. + +Resource was not found +*/ +type GetUsersObservableNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetUsersObservableNotFound) Error() string { + return fmt.Sprintf("[GET /users/observable][%d] getUsersObservableNotFound %+v", 404, o.Payload) +} + +func (o *GetUsersObservableNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetUsersObservableNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetUsersObservableUnprocessableEntity creates a GetUsersObservableUnprocessableEntity with default headers values +func NewGetUsersObservableUnprocessableEntity() *GetUsersObservableUnprocessableEntity { + return &GetUsersObservableUnprocessableEntity{} +} + +/*GetUsersObservableUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetUsersObservableUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetUsersObservableUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /users/observable][%d] getUsersObservableUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetUsersObservableUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetUsersObservableUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetUsersObservableInternalServerError creates a GetUsersObservableInternalServerError with default headers values +func NewGetUsersObservableInternalServerError() *GetUsersObservableInternalServerError { + return &GetUsersObservableInternalServerError{} +} + +/*GetUsersObservableInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetUsersObservableInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetUsersObservableInternalServerError) Error() string { + return fmt.Sprintf("[GET /users/observable][%d] getUsersObservableInternalServerError %+v", 500, o.Payload) +} + +func (o *GetUsersObservableInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetUsersObservableInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/user/get_users_parameters.go b/api/devops/v0.0.1/devops_client/user/get_users_parameters.go new file mode 100644 index 0000000..4a31ba9 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/user/get_users_parameters.go @@ -0,0 +1,375 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package user + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetUsersParams creates a new GetUsersParams object +// with the default values initialized. +func NewGetUsersParams() *GetUsersParams { + var () + return &GetUsersParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetUsersParamsWithTimeout creates a new GetUsersParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetUsersParamsWithTimeout(timeout time.Duration) *GetUsersParams { + var () + return &GetUsersParams{ + + timeout: timeout, + } +} + +// NewGetUsersParamsWithContext creates a new GetUsersParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetUsersParamsWithContext(ctx context.Context) *GetUsersParams { + var () + return &GetUsersParams{ + + Context: ctx, + } +} + +// NewGetUsersParamsWithHTTPClient creates a new GetUsersParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetUsersParamsWithHTTPClient(client *http.Client) *GetUsersParams { + var () + return &GetUsersParams{ + HTTPClient: client, + } +} + +/*GetUsersParams contains all the parameters to send to the API endpoint +for the get users operation typically these are written to a http.Request +*/ +type GetUsersParams struct { + + /*AccountID + Taxnexus Record Id of an Account + + */ + AccountID *string + /*Active + Retrieve active records only? + + */ + Active *bool + /*ContactID + Taxnexus Record Id of a Contact + + */ + ContactID *string + /*Email + Email Address (not unique) + + */ + Email *string + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + /*UserID + Taxnexus User ID (unique) + + */ + UserID *string + /*Username + Username (unique) + + */ + Username *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get users params +func (o *GetUsersParams) WithTimeout(timeout time.Duration) *GetUsersParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get users params +func (o *GetUsersParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get users params +func (o *GetUsersParams) WithContext(ctx context.Context) *GetUsersParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get users params +func (o *GetUsersParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get users params +func (o *GetUsersParams) WithHTTPClient(client *http.Client) *GetUsersParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get users params +func (o *GetUsersParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAccountID adds the accountID to the get users params +func (o *GetUsersParams) WithAccountID(accountID *string) *GetUsersParams { + o.SetAccountID(accountID) + return o +} + +// SetAccountID adds the accountId to the get users params +func (o *GetUsersParams) SetAccountID(accountID *string) { + o.AccountID = accountID +} + +// WithActive adds the active to the get users params +func (o *GetUsersParams) WithActive(active *bool) *GetUsersParams { + o.SetActive(active) + return o +} + +// SetActive adds the active to the get users params +func (o *GetUsersParams) SetActive(active *bool) { + o.Active = active +} + +// WithContactID adds the contactID to the get users params +func (o *GetUsersParams) WithContactID(contactID *string) *GetUsersParams { + o.SetContactID(contactID) + return o +} + +// SetContactID adds the contactId to the get users params +func (o *GetUsersParams) SetContactID(contactID *string) { + o.ContactID = contactID +} + +// WithEmail adds the email to the get users params +func (o *GetUsersParams) WithEmail(email *string) *GetUsersParams { + o.SetEmail(email) + return o +} + +// SetEmail adds the email to the get users params +func (o *GetUsersParams) SetEmail(email *string) { + o.Email = email +} + +// WithLimit adds the limit to the get users params +func (o *GetUsersParams) WithLimit(limit *int64) *GetUsersParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get users params +func (o *GetUsersParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get users params +func (o *GetUsersParams) WithOffset(offset *int64) *GetUsersParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get users params +func (o *GetUsersParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithUserID adds the userID to the get users params +func (o *GetUsersParams) WithUserID(userID *string) *GetUsersParams { + o.SetUserID(userID) + return o +} + +// SetUserID adds the userId to the get users params +func (o *GetUsersParams) SetUserID(userID *string) { + o.UserID = userID +} + +// WithUsername adds the username to the get users params +func (o *GetUsersParams) WithUsername(username *string) *GetUsersParams { + o.SetUsername(username) + return o +} + +// SetUsername adds the username to the get users params +func (o *GetUsersParams) SetUsername(username *string) { + o.Username = username +} + +// WriteToRequest writes these params to a swagger request +func (o *GetUsersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AccountID != nil { + + // query param accountId + var qrAccountID string + if o.AccountID != nil { + qrAccountID = *o.AccountID + } + qAccountID := qrAccountID + if qAccountID != "" { + if err := r.SetQueryParam("accountId", qAccountID); err != nil { + return err + } + } + + } + + if o.Active != nil { + + // query param active + var qrActive bool + if o.Active != nil { + qrActive = *o.Active + } + qActive := swag.FormatBool(qrActive) + if qActive != "" { + if err := r.SetQueryParam("active", qActive); err != nil { + return err + } + } + + } + + if o.ContactID != nil { + + // query param contactId + var qrContactID string + if o.ContactID != nil { + qrContactID = *o.ContactID + } + qContactID := qrContactID + if qContactID != "" { + if err := r.SetQueryParam("contactId", qContactID); err != nil { + return err + } + } + + } + + if o.Email != nil { + + // query param email + var qrEmail string + if o.Email != nil { + qrEmail = *o.Email + } + qEmail := qrEmail + if qEmail != "" { + if err := r.SetQueryParam("email", qEmail); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.UserID != nil { + + // query param userId + var qrUserID string + if o.UserID != nil { + qrUserID = *o.UserID + } + qUserID := qrUserID + if qUserID != "" { + if err := r.SetQueryParam("userId", qUserID); err != nil { + return err + } + } + + } + + if o.Username != nil { + + // query param username + var qrUsername string + if o.Username != nil { + qrUsername = *o.Username + } + qUsername := qrUsername + if qUsername != "" { + if err := r.SetQueryParam("username", qUsername); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/user/get_users_responses.go b/api/devops/v0.0.1/devops_client/user/get_users_responses.go new file mode 100644 index 0000000..9ac9d0f --- /dev/null +++ b/api/devops/v0.0.1/devops_client/user/get_users_responses.go @@ -0,0 +1,313 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package user + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// GetUsersReader is a Reader for the GetUsers structure. +type GetUsersReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetUsersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetUsersOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetUsersUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetUsersForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetUsersNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetUsersUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetUsersInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetUsersOK creates a GetUsersOK with default headers values +func NewGetUsersOK() *GetUsersOK { + return &GetUsersOK{} +} + +/*GetUsersOK handles this case with default header values. + +Taxnexus Response with User objects +*/ +type GetUsersOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.UserResponse +} + +func (o *GetUsersOK) Error() string { + return fmt.Sprintf("[GET /users][%d] getUsersOK %+v", 200, o.Payload) +} + +func (o *GetUsersOK) GetPayload() *devops_models.UserResponse { + return o.Payload +} + +func (o *GetUsersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.UserResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetUsersUnauthorized creates a GetUsersUnauthorized with default headers values +func NewGetUsersUnauthorized() *GetUsersUnauthorized { + return &GetUsersUnauthorized{} +} + +/*GetUsersUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetUsersUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetUsersUnauthorized) Error() string { + return fmt.Sprintf("[GET /users][%d] getUsersUnauthorized %+v", 401, o.Payload) +} + +func (o *GetUsersUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetUsersUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetUsersForbidden creates a GetUsersForbidden with default headers values +func NewGetUsersForbidden() *GetUsersForbidden { + return &GetUsersForbidden{} +} + +/*GetUsersForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetUsersForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetUsersForbidden) Error() string { + return fmt.Sprintf("[GET /users][%d] getUsersForbidden %+v", 403, o.Payload) +} + +func (o *GetUsersForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetUsersForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetUsersNotFound creates a GetUsersNotFound with default headers values +func NewGetUsersNotFound() *GetUsersNotFound { + return &GetUsersNotFound{} +} + +/*GetUsersNotFound handles this case with default header values. + +Resource was not found +*/ +type GetUsersNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetUsersNotFound) Error() string { + return fmt.Sprintf("[GET /users][%d] getUsersNotFound %+v", 404, o.Payload) +} + +func (o *GetUsersNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetUsersNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetUsersUnprocessableEntity creates a GetUsersUnprocessableEntity with default headers values +func NewGetUsersUnprocessableEntity() *GetUsersUnprocessableEntity { + return &GetUsersUnprocessableEntity{} +} + +/*GetUsersUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetUsersUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *GetUsersUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /users][%d] getUsersUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetUsersUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetUsersUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetUsersInternalServerError creates a GetUsersInternalServerError with default headers values +func NewGetUsersInternalServerError() *GetUsersInternalServerError { + return &GetUsersInternalServerError{} +} + +/*GetUsersInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetUsersInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *GetUsersInternalServerError) Error() string { + return fmt.Sprintf("[GET /users][%d] getUsersInternalServerError %+v", 500, o.Payload) +} + +func (o *GetUsersInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *GetUsersInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/user/post_users_parameters.go b/api/devops/v0.0.1/devops_client/user/post_users_parameters.go new file mode 100644 index 0000000..8c3a815 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/user/post_users_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package user + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// NewPostUsersParams creates a new PostUsersParams object +// with the default values initialized. +func NewPostUsersParams() *PostUsersParams { + var () + return &PostUsersParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostUsersParamsWithTimeout creates a new PostUsersParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostUsersParamsWithTimeout(timeout time.Duration) *PostUsersParams { + var () + return &PostUsersParams{ + + timeout: timeout, + } +} + +// NewPostUsersParamsWithContext creates a new PostUsersParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostUsersParamsWithContext(ctx context.Context) *PostUsersParams { + var () + return &PostUsersParams{ + + Context: ctx, + } +} + +// NewPostUsersParamsWithHTTPClient creates a new PostUsersParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostUsersParamsWithHTTPClient(client *http.Client) *PostUsersParams { + var () + return &PostUsersParams{ + HTTPClient: client, + } +} + +/*PostUsersParams contains all the parameters to send to the API endpoint +for the post users operation typically these are written to a http.Request +*/ +type PostUsersParams struct { + + /*UserRequest + An array of User records + + */ + UserRequest *devops_models.UserRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post users params +func (o *PostUsersParams) WithTimeout(timeout time.Duration) *PostUsersParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post users params +func (o *PostUsersParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post users params +func (o *PostUsersParams) WithContext(ctx context.Context) *PostUsersParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post users params +func (o *PostUsersParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post users params +func (o *PostUsersParams) WithHTTPClient(client *http.Client) *PostUsersParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post users params +func (o *PostUsersParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUserRequest adds the userRequest to the post users params +func (o *PostUsersParams) WithUserRequest(userRequest *devops_models.UserRequest) *PostUsersParams { + o.SetUserRequest(userRequest) + return o +} + +// SetUserRequest adds the userRequest to the post users params +func (o *PostUsersParams) SetUserRequest(userRequest *devops_models.UserRequest) { + o.UserRequest = userRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostUsersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.UserRequest != nil { + if err := r.SetBodyParam(o.UserRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/user/post_users_responses.go b/api/devops/v0.0.1/devops_client/user/post_users_responses.go new file mode 100644 index 0000000..b32dcea --- /dev/null +++ b/api/devops/v0.0.1/devops_client/user/post_users_responses.go @@ -0,0 +1,313 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package user + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// PostUsersReader is a Reader for the PostUsers structure. +type PostUsersReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostUsersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostUsersOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostUsersUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostUsersForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostUsersNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostUsersUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostUsersInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostUsersOK creates a PostUsersOK with default headers values +func NewPostUsersOK() *PostUsersOK { + return &PostUsersOK{} +} + +/*PostUsersOK handles this case with default header values. + +Taxnexus Response with User objects +*/ +type PostUsersOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.UserResponse +} + +func (o *PostUsersOK) Error() string { + return fmt.Sprintf("[POST /users][%d] postUsersOK %+v", 200, o.Payload) +} + +func (o *PostUsersOK) GetPayload() *devops_models.UserResponse { + return o.Payload +} + +func (o *PostUsersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.UserResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostUsersUnauthorized creates a PostUsersUnauthorized with default headers values +func NewPostUsersUnauthorized() *PostUsersUnauthorized { + return &PostUsersUnauthorized{} +} + +/*PostUsersUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostUsersUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *PostUsersUnauthorized) Error() string { + return fmt.Sprintf("[POST /users][%d] postUsersUnauthorized %+v", 401, o.Payload) +} + +func (o *PostUsersUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostUsersUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostUsersForbidden creates a PostUsersForbidden with default headers values +func NewPostUsersForbidden() *PostUsersForbidden { + return &PostUsersForbidden{} +} + +/*PostUsersForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostUsersForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PostUsersForbidden) Error() string { + return fmt.Sprintf("[POST /users][%d] postUsersForbidden %+v", 403, o.Payload) +} + +func (o *PostUsersForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostUsersForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostUsersNotFound creates a PostUsersNotFound with default headers values +func NewPostUsersNotFound() *PostUsersNotFound { + return &PostUsersNotFound{} +} + +/*PostUsersNotFound handles this case with default header values. + +Resource was not found +*/ +type PostUsersNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PostUsersNotFound) Error() string { + return fmt.Sprintf("[POST /users][%d] postUsersNotFound %+v", 404, o.Payload) +} + +func (o *PostUsersNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostUsersNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostUsersUnprocessableEntity creates a PostUsersUnprocessableEntity with default headers values +func NewPostUsersUnprocessableEntity() *PostUsersUnprocessableEntity { + return &PostUsersUnprocessableEntity{} +} + +/*PostUsersUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostUsersUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *PostUsersUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /users][%d] postUsersUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostUsersUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostUsersUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostUsersInternalServerError creates a PostUsersInternalServerError with default headers values +func NewPostUsersInternalServerError() *PostUsersInternalServerError { + return &PostUsersInternalServerError{} +} + +/*PostUsersInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostUsersInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PostUsersInternalServerError) Error() string { + return fmt.Sprintf("[POST /users][%d] postUsersInternalServerError %+v", 500, o.Payload) +} + +func (o *PostUsersInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PostUsersInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/user/put_users_parameters.go b/api/devops/v0.0.1/devops_client/user/put_users_parameters.go new file mode 100644 index 0000000..fbda38c --- /dev/null +++ b/api/devops/v0.0.1/devops_client/user/put_users_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package user + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// NewPutUsersParams creates a new PutUsersParams object +// with the default values initialized. +func NewPutUsersParams() *PutUsersParams { + var () + return &PutUsersParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPutUsersParamsWithTimeout creates a new PutUsersParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPutUsersParamsWithTimeout(timeout time.Duration) *PutUsersParams { + var () + return &PutUsersParams{ + + timeout: timeout, + } +} + +// NewPutUsersParamsWithContext creates a new PutUsersParams object +// with the default values initialized, and the ability to set a context for a request +func NewPutUsersParamsWithContext(ctx context.Context) *PutUsersParams { + var () + return &PutUsersParams{ + + Context: ctx, + } +} + +// NewPutUsersParamsWithHTTPClient creates a new PutUsersParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPutUsersParamsWithHTTPClient(client *http.Client) *PutUsersParams { + var () + return &PutUsersParams{ + HTTPClient: client, + } +} + +/*PutUsersParams contains all the parameters to send to the API endpoint +for the put users operation typically these are written to a http.Request +*/ +type PutUsersParams struct { + + /*UserRequest + An array of User records + + */ + UserRequest *devops_models.UserRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the put users params +func (o *PutUsersParams) WithTimeout(timeout time.Duration) *PutUsersParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the put users params +func (o *PutUsersParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the put users params +func (o *PutUsersParams) WithContext(ctx context.Context) *PutUsersParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the put users params +func (o *PutUsersParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the put users params +func (o *PutUsersParams) WithHTTPClient(client *http.Client) *PutUsersParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the put users params +func (o *PutUsersParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUserRequest adds the userRequest to the put users params +func (o *PutUsersParams) WithUserRequest(userRequest *devops_models.UserRequest) *PutUsersParams { + o.SetUserRequest(userRequest) + return o +} + +// SetUserRequest adds the userRequest to the put users params +func (o *PutUsersParams) SetUserRequest(userRequest *devops_models.UserRequest) { + o.UserRequest = userRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PutUsersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.UserRequest != nil { + if err := r.SetBodyParam(o.UserRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/devops/v0.0.1/devops_client/user/put_users_responses.go b/api/devops/v0.0.1/devops_client/user/put_users_responses.go new file mode 100644 index 0000000..8fa8048 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/user/put_users_responses.go @@ -0,0 +1,313 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package user + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/devops/devops_models" +) + +// PutUsersReader is a Reader for the PutUsers structure. +type PutUsersReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PutUsersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPutUsersOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPutUsersUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPutUsersForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPutUsersNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPutUsersUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPutUsersInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPutUsersOK creates a PutUsersOK with default headers values +func NewPutUsersOK() *PutUsersOK { + return &PutUsersOK{} +} + +/*PutUsersOK handles this case with default header values. + +Taxnexus Response with User objects +*/ +type PutUsersOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.UserResponse +} + +func (o *PutUsersOK) Error() string { + return fmt.Sprintf("[PUT /users][%d] putUsersOK %+v", 200, o.Payload) +} + +func (o *PutUsersOK) GetPayload() *devops_models.UserResponse { + return o.Payload +} + +func (o *PutUsersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.UserResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutUsersUnauthorized creates a PutUsersUnauthorized with default headers values +func NewPutUsersUnauthorized() *PutUsersUnauthorized { + return &PutUsersUnauthorized{} +} + +/*PutUsersUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PutUsersUnauthorized struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *PutUsersUnauthorized) Error() string { + return fmt.Sprintf("[PUT /users][%d] putUsersUnauthorized %+v", 401, o.Payload) +} + +func (o *PutUsersUnauthorized) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutUsersUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutUsersForbidden creates a PutUsersForbidden with default headers values +func NewPutUsersForbidden() *PutUsersForbidden { + return &PutUsersForbidden{} +} + +/*PutUsersForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PutUsersForbidden struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PutUsersForbidden) Error() string { + return fmt.Sprintf("[PUT /users][%d] putUsersForbidden %+v", 403, o.Payload) +} + +func (o *PutUsersForbidden) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutUsersForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutUsersNotFound creates a PutUsersNotFound with default headers values +func NewPutUsersNotFound() *PutUsersNotFound { + return &PutUsersNotFound{} +} + +/*PutUsersNotFound handles this case with default header values. + +Resource was not found +*/ +type PutUsersNotFound struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PutUsersNotFound) Error() string { + return fmt.Sprintf("[PUT /users][%d] putUsersNotFound %+v", 404, o.Payload) +} + +func (o *PutUsersNotFound) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutUsersNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutUsersUnprocessableEntity creates a PutUsersUnprocessableEntity with default headers values +func NewPutUsersUnprocessableEntity() *PutUsersUnprocessableEntity { + return &PutUsersUnprocessableEntity{} +} + +/*PutUsersUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PutUsersUnprocessableEntity struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *devops_models.Error +} + +func (o *PutUsersUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /users][%d] putUsersUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutUsersUnprocessableEntity) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutUsersUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutUsersInternalServerError creates a PutUsersInternalServerError with default headers values +func NewPutUsersInternalServerError() *PutUsersInternalServerError { + return &PutUsersInternalServerError{} +} + +/*PutUsersInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PutUsersInternalServerError struct { + AccessControlAllowOrigin string + + Payload *devops_models.Error +} + +func (o *PutUsersInternalServerError) Error() string { + return fmt.Sprintf("[PUT /users][%d] putUsersInternalServerError %+v", 500, o.Payload) +} + +func (o *PutUsersInternalServerError) GetPayload() *devops_models.Error { + return o.Payload +} + +func (o *PutUsersInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(devops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/devops/v0.0.1/devops_client/user/user_client.go b/api/devops/v0.0.1/devops_client/user/user_client.go new file mode 100644 index 0000000..e62e156 --- /dev/null +++ b/api/devops/v0.0.1/devops_client/user/user_client.go @@ -0,0 +1,235 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package user + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new user API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for user API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetUser(params *GetUserParams, authInfo runtime.ClientAuthInfoWriter) (*GetUserOK, error) + + GetUsers(params *GetUsersParams, authInfo runtime.ClientAuthInfoWriter) (*GetUsersOK, error) + + GetUsersObservable(params *GetUsersObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetUsersObservableOK, error) + + PostUsers(params *PostUsersParams, authInfo runtime.ClientAuthInfoWriter) (*PostUsersOK, error) + + PutUsers(params *PutUsersParams, authInfo runtime.ClientAuthInfoWriter) (*PutUsersOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetUser gets a single user object + + Return a single User object from datastore as a Singleton +*/ +func (a *Client) GetUser(params *GetUserParams, authInfo runtime.ClientAuthInfoWriter) (*GetUserOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetUserParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getUser", + Method: "GET", + PathPattern: "/users/{userIdPath}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetUserReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetUserOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getUser: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetUsers gets a list users + + Return a list of User records from the datastore +*/ +func (a *Client) GetUsers(params *GetUsersParams, authInfo runtime.ClientAuthInfoWriter) (*GetUsersOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetUsersParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getUsers", + Method: "GET", + PathPattern: "/users", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetUsersReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetUsersOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getUsers: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetUsersObservable gets users in an observable array + + Returns a User retrieval in a observable array +*/ +func (a *Client) GetUsersObservable(params *GetUsersObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetUsersObservableOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetUsersObservableParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getUsersObservable", + Method: "GET", + PathPattern: "/users/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetUsersObservableReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetUsersObservableOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getUsersObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostUsers creates new users + + Create new Users +*/ +func (a *Client) PostUsers(params *PostUsersParams, authInfo runtime.ClientAuthInfoWriter) (*PostUsersOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostUsersParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postUsers", + Method: "POST", + PathPattern: "/users", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostUsersReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostUsersOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postUsers: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PutUsers updates existing users + + Update existing users +*/ +func (a *Client) PutUsers(params *PutUsersParams, authInfo runtime.ClientAuthInfoWriter) (*PutUsersOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPutUsersParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "putUsers", + Method: "PUT", + PathPattern: "/users", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PutUsersReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PutUsersOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for putUsers: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/devops/v0.0.1/devops_models/address.go b/api/devops/v0.0.1/devops_models/address.go new file mode 100644 index 0000000..4cbea4e --- /dev/null +++ b/api/devops/v0.0.1/devops_models/address.go @@ -0,0 +1,65 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Address address +// +// swagger:model Address +type Address struct { + + // City + City string `json:"City,omitempty"` + + // Country full name + Country string `json:"Country,omitempty"` + + // Country Code + CountryCode string `json:"CountryCode,omitempty"` + + // Postal Code + PostalCode string `json:"PostalCode,omitempty"` + + // State full name + State string `json:"State,omitempty"` + + // State Code + StateCode string `json:"StateCode,omitempty"` + + // Street number and name + Street string `json:"Street,omitempty"` +} + +// Validate validates this address +func (m *Address) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Address) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Address) UnmarshalBinary(b []byte) error { + var res Address + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/cluster.go b/api/devops/v0.0.1/devops_models/cluster.go new file mode 100644 index 0000000..2fd7e4c --- /dev/null +++ b/api/devops/v0.0.1/devops_models/cluster.go @@ -0,0 +1,95 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Cluster cluster +// +// swagger:model Cluster +type Cluster struct { + + // Created By + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Description + Description string `json:"Description,omitempty"` + + // Environment + Environment string `json:"Environment,omitempty"` + + // Gateway + Gateway string `json:"Gateway,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // IP Address + IPAddress string `json:"IPAddress,omitempty"` + + // Last Modified By + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Cluster Name + Name string `json:"Name,omitempty"` + + // Owner + OwnerID string `json:"OwnerID,omitempty"` + + // External Reference + Ref string `json:"Ref,omitempty"` + + // Status + Status string `json:"Status,omitempty"` + + // Subnet + Subnet string `json:"Subnet,omitempty"` + + // The ID of the tenant who owns this Database + TenantID string `json:"TenantID,omitempty"` + + // Type + Type string `json:"Type,omitempty"` + + // Zone + Zone string `json:"Zone,omitempty"` +} + +// Validate validates this cluster +func (m *Cluster) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Cluster) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Cluster) UnmarshalBinary(b []byte) error { + var res Cluster + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/cluster_request.go b/api/devops/v0.0.1/devops_models/cluster_request.go new file mode 100644 index 0000000..493ff74 --- /dev/null +++ b/api/devops/v0.0.1/devops_models/cluster_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ClusterRequest cluster request +// +// swagger:model ClusterRequest +type ClusterRequest struct { + + // data + Data []*Cluster `json:"Data"` +} + +// Validate validates this cluster request +func (m *ClusterRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ClusterRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ClusterRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ClusterRequest) UnmarshalBinary(b []byte) error { + var res ClusterRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/cluster_response.go b/api/devops/v0.0.1/devops_models/cluster_response.go new file mode 100644 index 0000000..5d627b4 --- /dev/null +++ b/api/devops/v0.0.1/devops_models/cluster_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ClusterResponse An array of cluster objects +// +// swagger:model ClusterResponse +type ClusterResponse struct { + + // data + Data []*Cluster `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this cluster response +func (m *ClusterResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ClusterResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ClusterResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ClusterResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ClusterResponse) UnmarshalBinary(b []byte) error { + var res ClusterResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/database.go b/api/devops/v0.0.1/devops_models/database.go new file mode 100644 index 0000000..ebc12d2 --- /dev/null +++ b/api/devops/v0.0.1/devops_models/database.go @@ -0,0 +1,83 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Database A Database provisioned and owned by a Tenant +// +// swagger:model Database +type Database struct { + + // Is this database active? + Active bool `json:"Active,omitempty"` + + // The ID of the Cluster in which this database is deployed + ClusterID string `json:"ClusterID,omitempty"` + + // Created By + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Database connection string + DSN string `json:"DSN,omitempty"` + + // The name of the physical database in the cluster + DatabaseName string `json:"DatabaseName,omitempty"` + + // Record Id + ID string `json:"ID,omitempty"` + + // Last Modified By + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modifed Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // List of Taxnexus microservices implemented by this Database + Microservices string `json:"Microservices,omitempty"` + + // The current status of this Tenant + Status string `json:"Status,omitempty"` + + // The ID of the tenant who owns this Database + TenantID string `json:"TenantID,omitempty"` + + // The type of Database (mysql, etc) + Type string `json:"Type,omitempty"` +} + +// Validate validates this database +func (m *Database) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Database) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Database) UnmarshalBinary(b []byte) error { + var res Database + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/database_request.go b/api/devops/v0.0.1/devops_models/database_request.go new file mode 100644 index 0000000..642466d --- /dev/null +++ b/api/devops/v0.0.1/devops_models/database_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// DatabaseRequest An array of Database objects +// +// swagger:model DatabaseRequest +type DatabaseRequest struct { + + // data + Data []*Database `json:"Data"` +} + +// Validate validates this database request +func (m *DatabaseRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DatabaseRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *DatabaseRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DatabaseRequest) UnmarshalBinary(b []byte) error { + var res DatabaseRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/database_response.go b/api/devops/v0.0.1/devops_models/database_response.go new file mode 100644 index 0000000..715d640 --- /dev/null +++ b/api/devops/v0.0.1/devops_models/database_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// DatabaseResponse An array of Database objects +// +// swagger:model DatabaseResponse +type DatabaseResponse struct { + + // data + Data []*Database `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this database response +func (m *DatabaseResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DatabaseResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *DatabaseResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *DatabaseResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DatabaseResponse) UnmarshalBinary(b []byte) error { + var res DatabaseResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/delete_response.go b/api/devops/v0.0.1/devops_models/delete_response.go new file mode 100644 index 0000000..a75d3c8 --- /dev/null +++ b/api/devops/v0.0.1/devops_models/delete_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// DeleteResponse delete response +// +// swagger:model DeleteResponse +type DeleteResponse struct { + + // data + Data []*Message `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this delete response +func (m *DeleteResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DeleteResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *DeleteResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *DeleteResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DeleteResponse) UnmarshalBinary(b []byte) error { + var res DeleteResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/error.go b/api/devops/v0.0.1/devops_models/error.go new file mode 100644 index 0000000..acee92d --- /dev/null +++ b/api/devops/v0.0.1/devops_models/error.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Error error +// +// swagger:model Error +type Error struct { + + // code + Code int64 `json:"code,omitempty"` + + // fields + Fields string `json:"fields,omitempty"` + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this error +func (m *Error) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Error) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Error) UnmarshalBinary(b []byte) error { + var res Error + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/ingest.go b/api/devops/v0.0.1/devops_models/ingest.go new file mode 100644 index 0000000..13da67b --- /dev/null +++ b/api/devops/v0.0.1/devops_models/ingest.go @@ -0,0 +1,443 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// Ingest A record of the Ingest of information into Taxnexus +// +// swagger:model Ingest +type Ingest struct { + + // Account ID + // Required: true + AccountID *string `json:"AccountID"` + + // Rollup Tax Amount + Amount float64 `json:"Amount,omitempty"` + + // Backend ID + BackendID string `json:"BackendID,omitempty"` + + // Company ID + CompanyID string `json:"CompanyID,omitempty"` + + // Taxnexus User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Date of Job Creation + CreatedDate string `json:"CreatedDate,omitempty"` + + // Ingest Description + Description string `json:"Description,omitempty"` + + // End Date + EndDate string `json:"EndDate,omitempty"` + + // Filename + Filename string `json:"Filename,omitempty"` + + // Record Id + ID string `json:"ID,omitempty"` + + // Ingest Date + IngestDate string `json:"IngestDate,omitempty"` + + // Ingest Failure Reason + IngestFailureReason string `json:"IngestFailureReason,omitempty"` + + // Ingest Type + // Enum: [fabric internal suretax taxnexus-api] + IngestType string `json:"IngestType,omitempty"` + + // Invoice Count + InvoiceCount int64 `json:"InvoiceCount,omitempty"` + + // Job ID + JobID string `json:"JobID,omitempty"` + + // Taxnexus User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // metrc last modified end + MetrcLastModifiedEnd string `json:"MetrcLastModifiedEnd,omitempty"` + + // metrc last modified start + MetrcLastModifiedStart string `json:"MetrcLastModifiedStart,omitempty"` + + // License + MetrcLicense string `json:"MetrcLicense,omitempty"` + + // metrc salesreceipt ID + MetrcSalesreceiptID int64 `json:"MetrcSalesreceiptID,omitempty"` + + // State Code + MetrcState string `json:"MetrcState,omitempty"` + + // Ingest Object Type + // Required: true + // Enum: [account cash-receipt contact invoice order po quote] + ObjectType *string `json:"ObjectType"` + + // PO Count + POCount int64 `json:"POCount,omitempty"` + + // Parent Foreign Key + ParentFK string `json:"ParentFK,omitempty"` + + // Period ID + PeriodID string `json:"PeriodID,omitempty"` + + // Post Failure Reason + PostFalureReason string `json:"PostFalureReason,omitempty"` + + // Rating Engine ID + RatingEngineID string `json:"RatingEngineID,omitempty"` + + // Source System Reference + Ref string `json:"Ref,omitempty"` + + // Rollup Revenue Base + RevenueBase float64 `json:"RevenueBase,omitempty"` + + // Rollup Revenue Net + RevenueNet float64 `json:"RevenueNet,omitempty"` + + // Rollup Revenue Not Taxable + RevenueNotTaxable float64 `json:"RevenueNotTaxable,omitempty"` + + // The Saga ID used to link log entries and transactions + SagaID string `json:"SagaID,omitempty"` + + // The type of Saga transaction being performed + SagaType string `json:"SagaType,omitempty"` + + // The source system that generated this job + // Enum: [api fabric taxnexus telnexus] + Source string `json:"Source,omitempty"` + + // Start Date + StartDate string `json:"StartDate,omitempty"` + + // Ingest Status + // Enum: [failed_accounting failed_existing failed_glpost failed_invoice failed_po ingested new posted queued rated rejected] + Status string `json:"Status,omitempty"` + + // Rollup Tax + Tax float64 `json:"Tax,omitempty"` + + // Rollup Tax On Tax + TaxOnTax float64 `json:"TaxOnTax,omitempty"` + + // Tax Transaction Count + TaxTransactionCount int64 `json:"TaxTransactionCount,omitempty"` + + // Template + TemplateID string `json:"TemplateID,omitempty"` + + // ID of the Tenant that owns this Object Instance + TenantID string `json:"TenantID,omitempty"` + + // Rollup Unit Base + UnitBase int64 `json:"UnitBase,omitempty"` +} + +// Validate validates this ingest +func (m *Ingest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAccountID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateIngestType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateObjectType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSource(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Ingest) validateAccountID(formats strfmt.Registry) error { + + if err := validate.Required("AccountID", "body", m.AccountID); err != nil { + return err + } + + return nil +} + +var ingestTypeIngestTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["fabric","internal","suretax","taxnexus-api"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + ingestTypeIngestTypePropEnum = append(ingestTypeIngestTypePropEnum, v) + } +} + +const ( + + // IngestIngestTypeFabric captures enum value "fabric" + IngestIngestTypeFabric string = "fabric" + + // IngestIngestTypeInternal captures enum value "internal" + IngestIngestTypeInternal string = "internal" + + // IngestIngestTypeSuretax captures enum value "suretax" + IngestIngestTypeSuretax string = "suretax" + + // IngestIngestTypeTaxnexusAPI captures enum value "taxnexus-api" + IngestIngestTypeTaxnexusAPI string = "taxnexus-api" +) + +// prop value enum +func (m *Ingest) validateIngestTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, ingestTypeIngestTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *Ingest) validateIngestType(formats strfmt.Registry) error { + + if swag.IsZero(m.IngestType) { // not required + return nil + } + + // value enum + if err := m.validateIngestTypeEnum("IngestType", "body", m.IngestType); err != nil { + return err + } + + return nil +} + +var ingestTypeObjectTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["account","cash-receipt","contact","invoice","order","po","quote"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + ingestTypeObjectTypePropEnum = append(ingestTypeObjectTypePropEnum, v) + } +} + +const ( + + // IngestObjectTypeAccount captures enum value "account" + IngestObjectTypeAccount string = "account" + + // IngestObjectTypeCashReceipt captures enum value "cash-receipt" + IngestObjectTypeCashReceipt string = "cash-receipt" + + // IngestObjectTypeContact captures enum value "contact" + IngestObjectTypeContact string = "contact" + + // IngestObjectTypeInvoice captures enum value "invoice" + IngestObjectTypeInvoice string = "invoice" + + // IngestObjectTypeOrder captures enum value "order" + IngestObjectTypeOrder string = "order" + + // IngestObjectTypePo captures enum value "po" + IngestObjectTypePo string = "po" + + // IngestObjectTypeQuote captures enum value "quote" + IngestObjectTypeQuote string = "quote" +) + +// prop value enum +func (m *Ingest) validateObjectTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, ingestTypeObjectTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *Ingest) validateObjectType(formats strfmt.Registry) error { + + if err := validate.Required("ObjectType", "body", m.ObjectType); err != nil { + return err + } + + // value enum + if err := m.validateObjectTypeEnum("ObjectType", "body", *m.ObjectType); err != nil { + return err + } + + return nil +} + +var ingestTypeSourcePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["api","fabric","taxnexus","telnexus"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + ingestTypeSourcePropEnum = append(ingestTypeSourcePropEnum, v) + } +} + +const ( + + // IngestSourceAPI captures enum value "api" + IngestSourceAPI string = "api" + + // IngestSourceFabric captures enum value "fabric" + IngestSourceFabric string = "fabric" + + // IngestSourceTaxnexus captures enum value "taxnexus" + IngestSourceTaxnexus string = "taxnexus" + + // IngestSourceTelnexus captures enum value "telnexus" + IngestSourceTelnexus string = "telnexus" +) + +// prop value enum +func (m *Ingest) validateSourceEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, ingestTypeSourcePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *Ingest) validateSource(formats strfmt.Registry) error { + + if swag.IsZero(m.Source) { // not required + return nil + } + + // value enum + if err := m.validateSourceEnum("Source", "body", m.Source); err != nil { + return err + } + + return nil +} + +var ingestTypeStatusPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["failed_accounting","failed_existing","failed_glpost","failed_invoice","failed_po","ingested","new","posted","queued","rated","rejected"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + ingestTypeStatusPropEnum = append(ingestTypeStatusPropEnum, v) + } +} + +const ( + + // IngestStatusFailedAccounting captures enum value "failed_accounting" + IngestStatusFailedAccounting string = "failed_accounting" + + // IngestStatusFailedExisting captures enum value "failed_existing" + IngestStatusFailedExisting string = "failed_existing" + + // IngestStatusFailedGlpost captures enum value "failed_glpost" + IngestStatusFailedGlpost string = "failed_glpost" + + // IngestStatusFailedInvoice captures enum value "failed_invoice" + IngestStatusFailedInvoice string = "failed_invoice" + + // IngestStatusFailedPo captures enum value "failed_po" + IngestStatusFailedPo string = "failed_po" + + // IngestStatusIngested captures enum value "ingested" + IngestStatusIngested string = "ingested" + + // IngestStatusNew captures enum value "new" + IngestStatusNew string = "new" + + // IngestStatusPosted captures enum value "posted" + IngestStatusPosted string = "posted" + + // IngestStatusQueued captures enum value "queued" + IngestStatusQueued string = "queued" + + // IngestStatusRated captures enum value "rated" + IngestStatusRated string = "rated" + + // IngestStatusRejected captures enum value "rejected" + IngestStatusRejected string = "rejected" +) + +// prop value enum +func (m *Ingest) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, ingestTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *Ingest) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + // value enum + if err := m.validateStatusEnum("Status", "body", m.Status); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Ingest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Ingest) UnmarshalBinary(b []byte) error { + var res Ingest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/ingest_request.go b/api/devops/v0.0.1/devops_models/ingest_request.go new file mode 100644 index 0000000..3c22917 --- /dev/null +++ b/api/devops/v0.0.1/devops_models/ingest_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// IngestRequest ingest request +// +// swagger:model IngestRequest +type IngestRequest struct { + + // data + Data []*Ingest `json:"Data"` +} + +// Validate validates this ingest request +func (m *IngestRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *IngestRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *IngestRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *IngestRequest) UnmarshalBinary(b []byte) error { + var res IngestRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/ingest_response.go b/api/devops/v0.0.1/devops_models/ingest_response.go new file mode 100644 index 0000000..8a4c54d --- /dev/null +++ b/api/devops/v0.0.1/devops_models/ingest_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// IngestResponse An array of Print-Ready ingest Objects +// +// swagger:model IngestResponse +type IngestResponse struct { + + // data + Data []*Ingest `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this ingest response +func (m *IngestResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *IngestResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *IngestResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *IngestResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *IngestResponse) UnmarshalBinary(b []byte) error { + var res IngestResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/job.go b/api/devops/v0.0.1/devops_models/job.go new file mode 100644 index 0000000..c4f2355 --- /dev/null +++ b/api/devops/v0.0.1/devops_models/job.go @@ -0,0 +1,484 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// Job job +// +// swagger:model Job +type Job struct { + + // Taxnexus Account Id + // Required: true + AccountID *string `json:"AccountID"` + + // Taxnexus Backend ID + BackendID string `json:"BackendID,omitempty"` + + // Taxnexus Company ID + CompanyID string `json:"CompanyID,omitempty"` + + // Taxnexus Coordinate ID + CoordinateID string `json:"CoordinateID,omitempty"` + + // Taxnexus User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Date of Job Creation + CreatedDate string `json:"CreatedDate,omitempty"` + + // The amount of time after the Start Time to perform one or more jobs + // Required: true + // Enum: [day document hour minute month quarter second week year] + Duration *string `json:"Duration"` + + // End Date/Time + EndDate string `json:"EndDate,omitempty"` + + // Error Reason + ErrorReason string `json:"ErrorReason,omitempty"` + + // Taxnexus Record Id of the Job record + ID string `json:"ID,omitempty"` + + // The time interval by which multiple jobs are executed within the Duration + // Enum: [day each hour minute month quarter second week year] + Interval string `json:"Interval,omitempty"` + + // Job Date + JobDate string `json:"JobDate,omitempty"` + + // Last Modified By + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // The Month Number of the job + Month int64 `json:"Month,omitempty"` + + // Next Job + NextJobID string `json:"NextJobID,omitempty"` + + // The user ID that owns this job + OwnerID string `json:"OwnerID,omitempty"` + + // The parameters needed to process the job + Parameters string `json:"Parameters,omitempty"` + + // Period + PeriodID string `json:"PeriodID,omitempty"` + + // The Month Number of the job + Quarter int64 `json:"Quarter,omitempty"` + + // Rating Engine + RatingEngineID string `json:"RatingEngineID,omitempty"` + + // External Reference + Ref string `json:"Ref,omitempty"` + + // Reschedule? + Reschedule bool `json:"Reschedule,omitempty"` + + // Reschedule Interval + RescheduleInterval int64 `json:"RescheduleInterval,omitempty"` + + // The Saga ID used to link log entries and transactions + SagaID string `json:"SagaID,omitempty"` + + // The type of Saga transaction being performed + // Required: true + SagaType *string `json:"SagaType"` + + // The Month Number of the job + Semiannual int64 `json:"Semiannual,omitempty"` + + // The source system that generated this job + // Enum: [api fabric taxnexus telnexus] + Source string `json:"Source,omitempty"` + + // Start Date/Time + StartDate string `json:"StartDate,omitempty"` + + // Status + // Enum: [active complete error new queued] + Status string `json:"Status,omitempty"` + + // The target system that executes this job + // Enum: [api fabric taxnexus telnexus] + Target string `json:"Target,omitempty"` + + // ID of the Tenant that owns this Object Instance + TenantID string `json:"TenantID,omitempty"` + + // The Month Number of the job + Year int64 `json:"Year,omitempty"` +} + +// Validate validates this job +func (m *Job) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAccountID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDuration(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInterval(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSagaType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSource(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTarget(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Job) validateAccountID(formats strfmt.Registry) error { + + if err := validate.Required("AccountID", "body", m.AccountID); err != nil { + return err + } + + return nil +} + +var jobTypeDurationPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["day","document","hour","minute","month","quarter","second","week","year"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + jobTypeDurationPropEnum = append(jobTypeDurationPropEnum, v) + } +} + +const ( + + // JobDurationDay captures enum value "day" + JobDurationDay string = "day" + + // JobDurationDocument captures enum value "document" + JobDurationDocument string = "document" + + // JobDurationHour captures enum value "hour" + JobDurationHour string = "hour" + + // JobDurationMinute captures enum value "minute" + JobDurationMinute string = "minute" + + // JobDurationMonth captures enum value "month" + JobDurationMonth string = "month" + + // JobDurationQuarter captures enum value "quarter" + JobDurationQuarter string = "quarter" + + // JobDurationSecond captures enum value "second" + JobDurationSecond string = "second" + + // JobDurationWeek captures enum value "week" + JobDurationWeek string = "week" + + // JobDurationYear captures enum value "year" + JobDurationYear string = "year" +) + +// prop value enum +func (m *Job) validateDurationEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, jobTypeDurationPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *Job) validateDuration(formats strfmt.Registry) error { + + if err := validate.Required("Duration", "body", m.Duration); err != nil { + return err + } + + // value enum + if err := m.validateDurationEnum("Duration", "body", *m.Duration); err != nil { + return err + } + + return nil +} + +var jobTypeIntervalPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["day","each","hour","minute","month","quarter","second","week","year"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + jobTypeIntervalPropEnum = append(jobTypeIntervalPropEnum, v) + } +} + +const ( + + // JobIntervalDay captures enum value "day" + JobIntervalDay string = "day" + + // JobIntervalEach captures enum value "each" + JobIntervalEach string = "each" + + // JobIntervalHour captures enum value "hour" + JobIntervalHour string = "hour" + + // JobIntervalMinute captures enum value "minute" + JobIntervalMinute string = "minute" + + // JobIntervalMonth captures enum value "month" + JobIntervalMonth string = "month" + + // JobIntervalQuarter captures enum value "quarter" + JobIntervalQuarter string = "quarter" + + // JobIntervalSecond captures enum value "second" + JobIntervalSecond string = "second" + + // JobIntervalWeek captures enum value "week" + JobIntervalWeek string = "week" + + // JobIntervalYear captures enum value "year" + JobIntervalYear string = "year" +) + +// prop value enum +func (m *Job) validateIntervalEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, jobTypeIntervalPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *Job) validateInterval(formats strfmt.Registry) error { + + if swag.IsZero(m.Interval) { // not required + return nil + } + + // value enum + if err := m.validateIntervalEnum("Interval", "body", m.Interval); err != nil { + return err + } + + return nil +} + +func (m *Job) validateSagaType(formats strfmt.Registry) error { + + if err := validate.Required("SagaType", "body", m.SagaType); err != nil { + return err + } + + return nil +} + +var jobTypeSourcePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["api","fabric","taxnexus","telnexus"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + jobTypeSourcePropEnum = append(jobTypeSourcePropEnum, v) + } +} + +const ( + + // JobSourceAPI captures enum value "api" + JobSourceAPI string = "api" + + // JobSourceFabric captures enum value "fabric" + JobSourceFabric string = "fabric" + + // JobSourceTaxnexus captures enum value "taxnexus" + JobSourceTaxnexus string = "taxnexus" + + // JobSourceTelnexus captures enum value "telnexus" + JobSourceTelnexus string = "telnexus" +) + +// prop value enum +func (m *Job) validateSourceEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, jobTypeSourcePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *Job) validateSource(formats strfmt.Registry) error { + + if swag.IsZero(m.Source) { // not required + return nil + } + + // value enum + if err := m.validateSourceEnum("Source", "body", m.Source); err != nil { + return err + } + + return nil +} + +var jobTypeStatusPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["active","complete","error","new","queued"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + jobTypeStatusPropEnum = append(jobTypeStatusPropEnum, v) + } +} + +const ( + + // JobStatusActive captures enum value "active" + JobStatusActive string = "active" + + // JobStatusComplete captures enum value "complete" + JobStatusComplete string = "complete" + + // JobStatusError captures enum value "error" + JobStatusError string = "error" + + // JobStatusNew captures enum value "new" + JobStatusNew string = "new" + + // JobStatusQueued captures enum value "queued" + JobStatusQueued string = "queued" +) + +// prop value enum +func (m *Job) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, jobTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *Job) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + // value enum + if err := m.validateStatusEnum("Status", "body", m.Status); err != nil { + return err + } + + return nil +} + +var jobTypeTargetPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["api","fabric","taxnexus","telnexus"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + jobTypeTargetPropEnum = append(jobTypeTargetPropEnum, v) + } +} + +const ( + + // JobTargetAPI captures enum value "api" + JobTargetAPI string = "api" + + // JobTargetFabric captures enum value "fabric" + JobTargetFabric string = "fabric" + + // JobTargetTaxnexus captures enum value "taxnexus" + JobTargetTaxnexus string = "taxnexus" + + // JobTargetTelnexus captures enum value "telnexus" + JobTargetTelnexus string = "telnexus" +) + +// prop value enum +func (m *Job) validateTargetEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, jobTypeTargetPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *Job) validateTarget(formats strfmt.Registry) error { + + if swag.IsZero(m.Target) { // not required + return nil + } + + // value enum + if err := m.validateTargetEnum("Target", "body", m.Target); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Job) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Job) UnmarshalBinary(b []byte) error { + var res Job + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/job_request.go b/api/devops/v0.0.1/devops_models/job_request.go new file mode 100644 index 0000000..d662f4b --- /dev/null +++ b/api/devops/v0.0.1/devops_models/job_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// JobRequest job request +// +// swagger:model JobRequest +type JobRequest struct { + + // data + Data []*Job `json:"Data"` +} + +// Validate validates this job request +func (m *JobRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *JobRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *JobRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *JobRequest) UnmarshalBinary(b []byte) error { + var res JobRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/job_response.go b/api/devops/v0.0.1/devops_models/job_response.go new file mode 100644 index 0000000..84dd245 --- /dev/null +++ b/api/devops/v0.0.1/devops_models/job_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// JobResponse An array of Job Objects +// +// swagger:model JobResponse +type JobResponse struct { + + // data + Data []*Job `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this job response +func (m *JobResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *JobResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *JobResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *JobResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *JobResponse) UnmarshalBinary(b []byte) error { + var res JobResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/message.go b/api/devops/v0.0.1/devops_models/message.go new file mode 100644 index 0000000..7d52c9a --- /dev/null +++ b/api/devops/v0.0.1/devops_models/message.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Message message +// +// swagger:model Message +type Message struct { + + // message + Message string `json:"Message,omitempty"` + + // ref + Ref string `json:"Ref,omitempty"` + + // status + Status int64 `json:"Status,omitempty"` +} + +// Validate validates this message +func (m *Message) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Message) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Message) UnmarshalBinary(b []byte) error { + var res Message + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/pagination.go b/api/devops/v0.0.1/devops_models/pagination.go new file mode 100644 index 0000000..3e40a60 --- /dev/null +++ b/api/devops/v0.0.1/devops_models/pagination.go @@ -0,0 +1,56 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Pagination pagination +// +// swagger:model Pagination +type Pagination struct { + + // limit + Limit int64 `json:"Limit,omitempty"` + + // p offset + POffset int64 `json:"POffset,omitempty"` + + // page size + PageSize int64 `json:"PageSize,omitempty"` + + // set size + SetSize int64 `json:"SetSize,omitempty"` +} + +// Validate validates this pagination +func (m *Pagination) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Pagination) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Pagination) UnmarshalBinary(b []byte) error { + var res Pagination + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/request_meta.go b/api/devops/v0.0.1/devops_models/request_meta.go new file mode 100644 index 0000000..fa6a7c4 --- /dev/null +++ b/api/devops/v0.0.1/devops_models/request_meta.go @@ -0,0 +1,68 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// RequestMeta request meta +// +// swagger:model RequestMeta +type RequestMeta struct { + + // Taxnexus Account Number of the Reseller or OEM + // Required: true + TaxnexusAccount *string `json:"TaxnexusAccount"` +} + +// Validate validates this request meta +func (m *RequestMeta) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTaxnexusAccount(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RequestMeta) validateTaxnexusAccount(formats strfmt.Registry) error { + + if err := validate.Required("TaxnexusAccount", "body", m.TaxnexusAccount); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *RequestMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RequestMeta) UnmarshalBinary(b []byte) error { + var res RequestMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/response_meta.go b/api/devops/v0.0.1/devops_models/response_meta.go new file mode 100644 index 0000000..1fef58d --- /dev/null +++ b/api/devops/v0.0.1/devops_models/response_meta.go @@ -0,0 +1,108 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ResponseMeta response meta +// +// swagger:model ResponseMeta +type ResponseMeta struct { + + // Microservice Contact Info + Contact string `json:"Contact,omitempty"` + + // Copyright Info + Copyright string `json:"Copyright,omitempty"` + + // License Information and Restrictions + License string `json:"License,omitempty"` + + // Operation ID + OperationID string `json:"OperationID,omitempty"` + + // pagination + Pagination *Pagination `json:"Pagination,omitempty"` + + // Request IP Address + RequestIP string `json:"RequestIP,omitempty"` + + // Request Type + RequestType string `json:"RequestType,omitempty"` + + // Request URL + RequestURL string `json:"RequestURL,omitempty"` + + // Data Server Info + ServerInfo string `json:"ServerInfo,omitempty"` + + // Data Server Response Time (ms) + ServerResponseTime string `json:"ServerResponseTime,omitempty"` + + // Backend Server Timestamp + ServerTimestamp string `json:"ServerTimestamp,omitempty"` + + // Taxnexus Account Number used for recording transactions + TaxnexusAccount string `json:"TaxnexusAccount,omitempty"` +} + +// Validate validates this response meta +func (m *ResponseMeta) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePagination(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ResponseMeta) validatePagination(formats strfmt.Registry) error { + + if swag.IsZero(m.Pagination) { // not required + return nil + } + + if m.Pagination != nil { + if err := m.Pagination.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Pagination") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ResponseMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ResponseMeta) UnmarshalBinary(b []byte) error { + var res ResponseMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/role.go b/api/devops/v0.0.1/devops_models/role.go new file mode 100644 index 0000000..1cc7933 --- /dev/null +++ b/api/devops/v0.0.1/devops_models/role.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Role A functional role within a Tenant +// +// swagger:model Role +type Role struct { + + // The corresponding Auth0 Role + Auth0RoleID string `json:"Auth0RoleID,omitempty"` + + // Created By + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Role Description + Description string `json:"Description,omitempty"` + + // Record Id + ID string `json:"ID,omitempty"` + + // Last Modified By + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modifed Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // The name of this role + RoleName string `json:"RoleName,omitempty"` + + // The ID of the Tenant that owns this Role + TenantID string `json:"TenantID,omitempty"` +} + +// Validate validates this role +func (m *Role) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Role) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Role) UnmarshalBinary(b []byte) error { + var res Role + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/role_request.go b/api/devops/v0.0.1/devops_models/role_request.go new file mode 100644 index 0000000..152da7d --- /dev/null +++ b/api/devops/v0.0.1/devops_models/role_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// RoleRequest An array of Role objects +// +// swagger:model RoleRequest +type RoleRequest struct { + + // date + Date []*Role `json:"Date"` +} + +// Validate validates this role request +func (m *RoleRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDate(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RoleRequest) validateDate(formats strfmt.Registry) error { + + if swag.IsZero(m.Date) { // not required + return nil + } + + for i := 0; i < len(m.Date); i++ { + if swag.IsZero(m.Date[i]) { // not required + continue + } + + if m.Date[i] != nil { + if err := m.Date[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Date" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *RoleRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RoleRequest) UnmarshalBinary(b []byte) error { + var res RoleRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/role_response.go b/api/devops/v0.0.1/devops_models/role_response.go new file mode 100644 index 0000000..cee68ef --- /dev/null +++ b/api/devops/v0.0.1/devops_models/role_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// RoleResponse An array of Role objects +// +// swagger:model RoleResponse +type RoleResponse struct { + + // data + Data []*Role `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this role response +func (m *RoleResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RoleResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *RoleResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *RoleResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RoleResponse) UnmarshalBinary(b []byte) error { + var res RoleResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/service.go b/api/devops/v0.0.1/devops_models/service.go new file mode 100644 index 0000000..e2f2c4b --- /dev/null +++ b/api/devops/v0.0.1/devops_models/service.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Service service +// +// swagger:model Service +type Service struct { + + // Active? + Active bool `json:"Active,omitempty"` + + // Cluster + ClusterID string `json:"ClusterID,omitempty"` + + // Cluster IP + ClusterIP string `json:"ClusterIP,omitempty"` + + // Cluster URL + ClusterURL string `json:"ClusterURL,omitempty"` + + // Created By + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Environment + Environment string `json:"Environment,omitempty"` + + // External URL + ExternalURL string `json:"ExternalURL,omitempty"` + + // GELF Address + GELFAddress string `json:"GELFAddress,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // Last Modified By + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Network Alias + NetworkAlias string `json:"NetworkAlias,omitempty"` + + // OpenAPI Version + OpenAPIVersion string `json:"OpenAPIVersion,omitempty"` + + // Owner + OwnerID string `json:"OwnerID,omitempty"` + + // Port - External + PortExternal string `json:"PortExternal,omitempty"` + + // Port - Test + PortTest string `json:"PortTest,omitempty"` + + // Proxy Type + ProxyType string `json:"ProxyType,omitempty"` + + // Replicas + Replicas int64 `json:"Replicas,omitempty"` + + // Repo URL + RepoURL string `json:"RepoURL,omitempty"` + + // Service Name + ServiceName string `json:"ServiceName,omitempty"` + + // The ID of the tenant who owns this Database + TenantID string `json:"TenantID,omitempty"` + + // Version + Version string `json:"Version,omitempty"` +} + +// Validate validates this service +func (m *Service) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Service) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Service) UnmarshalBinary(b []byte) error { + var res Service + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/service_request.go b/api/devops/v0.0.1/devops_models/service_request.go new file mode 100644 index 0000000..594de69 --- /dev/null +++ b/api/devops/v0.0.1/devops_models/service_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ServiceRequest service request +// +// swagger:model ServiceRequest +type ServiceRequest struct { + + // data + Data []*Service `json:"Data"` +} + +// Validate validates this service request +func (m *ServiceRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ServiceRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ServiceRequest) UnmarshalBinary(b []byte) error { + var res ServiceRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/service_response.go b/api/devops/v0.0.1/devops_models/service_response.go new file mode 100644 index 0000000..a6411b5 --- /dev/null +++ b/api/devops/v0.0.1/devops_models/service_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ServiceResponse An array of Service Objects +// +// swagger:model ServiceResponse +type ServiceResponse struct { + + // data + Data []*Service `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this service response +func (m *ServiceResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ServiceResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ServiceResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ServiceResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ServiceResponse) UnmarshalBinary(b []byte) error { + var res ServiceResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/template.go b/api/devops/v0.0.1/devops_models/template.go new file mode 100644 index 0000000..8942569 --- /dev/null +++ b/api/devops/v0.0.1/devops_models/template.go @@ -0,0 +1,93 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Template template +// +// swagger:model Template +type Template struct { + + // Company + CompanyID string `json:"CompanyID,omitempty"` + + // created by ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // created date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Description + Description string `json:"Description,omitempty"` + + // HTML Body + // Format: byte + HTML strfmt.Base64 `json:"HTML,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // Active? + IsActive bool `json:"IsActive,omitempty"` + + // Master Template? + IsMaster bool `json:"IsMaster,omitempty"` + + // last modified by ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // last modified date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Template Name + Name string `json:"Name,omitempty"` + + // Object + ObjectType string `json:"ObjectType,omitempty"` + + // Record Type Name + RecordTypeName string `json:"RecordTypeName,omitempty"` + + // Tenant that owns this object instance + TenantID string `json:"TenantID,omitempty"` + + // Type + Type string `json:"Type,omitempty"` + + // URL + URL string `json:"URL,omitempty"` +} + +// Validate validates this template +func (m *Template) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Template) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Template) UnmarshalBinary(b []byte) error { + var res Template + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/template_request.go b/api/devops/v0.0.1/devops_models/template_request.go new file mode 100644 index 0000000..5a49165 --- /dev/null +++ b/api/devops/v0.0.1/devops_models/template_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// TemplateRequest An array of Templates +// +// swagger:model TemplateRequest +type TemplateRequest struct { + + // data + Data []*Template `json:"Data"` +} + +// Validate validates this template request +func (m *TemplateRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *TemplateRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *TemplateRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TemplateRequest) UnmarshalBinary(b []byte) error { + var res TemplateRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/template_response.go b/api/devops/v0.0.1/devops_models/template_response.go new file mode 100644 index 0000000..2ae794c --- /dev/null +++ b/api/devops/v0.0.1/devops_models/template_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// TemplateResponse An array of Templates +// +// swagger:model TemplateResponse +type TemplateResponse struct { + + // data + Data []*Template `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this template response +func (m *TemplateResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *TemplateResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *TemplateResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *TemplateResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TemplateResponse) UnmarshalBinary(b []byte) error { + var res TemplateResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/tenant.go b/api/devops/v0.0.1/devops_models/tenant.go new file mode 100644 index 0000000..902bb5f --- /dev/null +++ b/api/devops/v0.0.1/devops_models/tenant.go @@ -0,0 +1,181 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Tenant Taxnexus Account Tenant +// +// swagger:model Tenant +type Tenant struct { + + // The Account that owns this Tenant + AccountID string `json:"AccountID,omitempty"` + + // Is this Tenant currently active? + Active bool `json:"Active,omitempty"` + + // Created By + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // databases + Databases []*Database `json:"Databases"` + + // Record Id + ID string `json:"ID,omitempty"` + + // Last Modified By + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modifed Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // roles + Roles []*Role `json:"Roles"` + + // The current status of this Tenant + Status string `json:"Status,omitempty"` + + // Name of the Tenant Resource + TenantName string `json:"TenantName,omitempty"` + + // tenant users + TenantUsers []*TenantUser `json:"TenantUsers"` + + // The type of Tenant + Type string `json:"Type,omitempty"` + + // The version number of the Tenant Onboarding system used to create this tenant + Version string `json:"Version,omitempty"` +} + +// Validate validates this tenant +func (m *Tenant) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDatabases(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRoles(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTenantUsers(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Tenant) validateDatabases(formats strfmt.Registry) error { + + if swag.IsZero(m.Databases) { // not required + return nil + } + + for i := 0; i < len(m.Databases); i++ { + if swag.IsZero(m.Databases[i]) { // not required + continue + } + + if m.Databases[i] != nil { + if err := m.Databases[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Databases" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *Tenant) validateRoles(formats strfmt.Registry) error { + + if swag.IsZero(m.Roles) { // not required + return nil + } + + for i := 0; i < len(m.Roles); i++ { + if swag.IsZero(m.Roles[i]) { // not required + continue + } + + if m.Roles[i] != nil { + if err := m.Roles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Roles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *Tenant) validateTenantUsers(formats strfmt.Registry) error { + + if swag.IsZero(m.TenantUsers) { // not required + return nil + } + + for i := 0; i < len(m.TenantUsers); i++ { + if swag.IsZero(m.TenantUsers[i]) { // not required + continue + } + + if m.TenantUsers[i] != nil { + if err := m.TenantUsers[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("TenantUsers" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Tenant) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Tenant) UnmarshalBinary(b []byte) error { + var res Tenant + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/tenant_request.go b/api/devops/v0.0.1/devops_models/tenant_request.go new file mode 100644 index 0000000..5fd9846 --- /dev/null +++ b/api/devops/v0.0.1/devops_models/tenant_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// TenantRequest An array of Tenant objects +// +// swagger:model TenantRequest +type TenantRequest struct { + + // data + Data []*Tenant `json:"Data"` +} + +// Validate validates this tenant request +func (m *TenantRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *TenantRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *TenantRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TenantRequest) UnmarshalBinary(b []byte) error { + var res TenantRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/tenant_response.go b/api/devops/v0.0.1/devops_models/tenant_response.go new file mode 100644 index 0000000..66199da --- /dev/null +++ b/api/devops/v0.0.1/devops_models/tenant_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// TenantResponse An array of Tenant objects +// +// swagger:model TenantResponse +type TenantResponse struct { + + // data + Data []*Tenant `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this tenant response +func (m *TenantResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *TenantResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *TenantResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *TenantResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TenantResponse) UnmarshalBinary(b []byte) error { + var res TenantResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/tenant_user.go b/api/devops/v0.0.1/devops_models/tenant_user.go new file mode 100644 index 0000000..0446999 --- /dev/null +++ b/api/devops/v0.0.1/devops_models/tenant_user.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// TenantUser Relationship object that connects users to a tenant +// +// swagger:model TenantUser +type TenantUser struct { + + // The makeTenantUser access level for this User + AccessLevel string `json:"AccessLevel,omitempty"` + + // Account ID + AccountID string `json:"AccountID,omitempty"` + + // Auth0 User ID + Auth0UserID string `json:"Auth0UserID,omitempty"` + + // Account Name + CompanyName string `json:"CompanyName,omitempty"` + + // Contact ID + ContactID string `json:"ContactID,omitempty"` + + // Taxnexus Account + TaxnexusAccount string `json:"TaxnexusAccount,omitempty"` + + // Tenant active? + TenantActive bool `json:"TenantActive,omitempty"` + + // The Tenant ID + TenantID string `json:"TenantID,omitempty"` + + // Tenant Name + TenantName string `json:"TenantName,omitempty"` + + // Tenant Status + TenantStatus string `json:"TenantStatus,omitempty"` + + // Tenant type + TenantType string `json:"TenantType,omitempty"` + + // Tenant Version + TenantVersion string `json:"TenantVersion,omitempty"` + + // User Email Address + UserEmail string `json:"UserEmail,omitempty"` + + // User Full Name + UserFullName string `json:"UserFullName,omitempty"` + + // The User ID + UserID string `json:"UserID,omitempty"` + + // Username + Username string `json:"Username,omitempty"` +} + +// Validate validates this tenant user +func (m *TenantUser) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *TenantUser) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TenantUser) UnmarshalBinary(b []byte) error { + var res TenantUser + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/user.go b/api/devops/v0.0.1/devops_models/user.go new file mode 100644 index 0000000..76c3c92 --- /dev/null +++ b/api/devops/v0.0.1/devops_models/user.go @@ -0,0 +1,306 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// User user +// +// swagger:model User +type User struct { + + // API Key + APIKey string `json:"APIKey,omitempty"` + + // About Me + AboutMe string `json:"AboutMe,omitempty"` + + // Account ID + AccountID string `json:"AccountID,omitempty"` + + // address + Address *Address `json:"Address,omitempty"` + + // Alias + Alias string `json:"Alias,omitempty"` + + // Auth0 User Id + Auth0UserID string `json:"Auth0UserID,omitempty"` + + // Nickname + CommunityNickname string `json:"CommunityNickname,omitempty"` + + // Company Name + CompanyName string `json:"CompanyName,omitempty"` + + // Contact + ContactID string `json:"ContactID,omitempty"` + + // Created User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Date Created + CreatedDate string `json:"CreatedDate,omitempty"` + + // Delegated Approver + DelegatedApproverID string `json:"DelegatedApproverID,omitempty"` + + // Department + Department string `json:"Department,omitempty"` + + // Division + Division string `json:"Division,omitempty"` + + // Email address + Email string `json:"Email,omitempty"` + + // Employee Number + EmployeeNumber string `json:"EmployeeNumber,omitempty"` + + // Time day ends + EndOfDay string `json:"EndOfDay,omitempty"` + + // Environment + Environment string `json:"Environment,omitempty"` + + // Extension + Extension string `json:"Extension,omitempty"` + + // Fabric API Key + FabricAPIKey string `json:"FabricAPIKey,omitempty"` + + // Fax + Fax string `json:"Fax,omitempty"` + + // The first name + FirstName string `json:"FirstName,omitempty"` + + // Allow Forecasting + ForecastEnabled bool `json:"ForecastEnabled,omitempty"` + + // Full Photo URL + FullPhotoURL string `json:"FullPhotoURL,omitempty"` + + // Taxnexus ID + ID string `json:"ID,omitempty"` + + // Active + IsActive bool `json:"IsActive,omitempty"` + + // Is the user enabled for Communities? + IsPortalEnabled bool `json:"IsPortalEnabled,omitempty"` + + // Has Profile Photo + IsProphilePhotoActive bool `json:"IsProphilePhotoActive,omitempty"` + + // is system controlled + IsSystemControlled bool `json:"IsSystemControlled,omitempty"` + + // IP address of last login + LastIP string `json:"LastIP,omitempty"` + + // Last login time + LastLogin string `json:"LastLogin,omitempty"` + + // Last Modified User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // The Last Name + LastName string `json:"LastName,omitempty"` + + // Number of times user has logged in + LoginCount int64 `json:"LoginCount,omitempty"` + + // Manager + ManagerID string `json:"ManagerID,omitempty"` + + // Mobile + MobilePhone string `json:"MobilePhone,omitempty"` + + // Name + Name string `json:"Name,omitempty"` + + // Out of office message + OutOfOfficeMessage string `json:"OutOfOfficeMessage,omitempty"` + + // Phone + Phone string `json:"Phone,omitempty"` + + // Portal Role Level + PortalRole string `json:"PortalRole,omitempty"` + + // Profile + ProfileID string `json:"ProfileID,omitempty"` + + // Info Emails + ReceivesAdminEmails bool `json:"ReceivesAdminEmails,omitempty"` + + // Admin Info Emails + ReceivesAdminInfoEmails bool `json:"ReceivesAdminInfoEmails,omitempty"` + + // Email Sender Address + SenderEmail string `json:"SenderEmail,omitempty"` + + // Email Sender Name + SenderName string `json:"SenderName,omitempty"` + + // Email Signature + Signature string `json:"Signature,omitempty"` + + // Small Photo URL + SmallPhotoURL string `json:"SmallPhotoURL,omitempty"` + + // The time day starts + StartOfDay string `json:"StartOfDay,omitempty"` + + // Taxnexus Account + TaxnexusAccount string `json:"TaxnexusAccount,omitempty"` + + // Tenant ID associated with this user + TenantID string `json:"TenantID,omitempty"` + + // tenant users + TenantUsers []*TenantUser `json:"TenantUsers"` + + // Time Zone + TimeZone string `json:"TimeZone,omitempty"` + + // Title + Title string `json:"Title,omitempty"` + + // Role + UserRoleID string `json:"UserRoleID,omitempty"` + + // user roles + UserRoles []*UserRole `json:"UserRoles"` + + // User Type + UserType string `json:"UserType,omitempty"` + + // Username + Username string `json:"Username,omitempty"` +} + +// Validate validates this user +func (m *User) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTenantUsers(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUserRoles(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *User) validateAddress(formats strfmt.Registry) error { + + if swag.IsZero(m.Address) { // not required + return nil + } + + if m.Address != nil { + if err := m.Address.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Address") + } + return err + } + } + + return nil +} + +func (m *User) validateTenantUsers(formats strfmt.Registry) error { + + if swag.IsZero(m.TenantUsers) { // not required + return nil + } + + for i := 0; i < len(m.TenantUsers); i++ { + if swag.IsZero(m.TenantUsers[i]) { // not required + continue + } + + if m.TenantUsers[i] != nil { + if err := m.TenantUsers[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("TenantUsers" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *User) validateUserRoles(formats strfmt.Registry) error { + + if swag.IsZero(m.UserRoles) { // not required + return nil + } + + for i := 0; i < len(m.UserRoles); i++ { + if swag.IsZero(m.UserRoles[i]) { // not required + continue + } + + if m.UserRoles[i] != nil { + if err := m.UserRoles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("UserRoles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *User) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *User) UnmarshalBinary(b []byte) error { + var res User + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/user_request.go b/api/devops/v0.0.1/devops_models/user_request.go new file mode 100644 index 0000000..657c6e7 --- /dev/null +++ b/api/devops/v0.0.1/devops_models/user_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// UserRequest user request +// +// swagger:model UserRequest +type UserRequest struct { + + // data + Data []*User `json:"Data"` +} + +// Validate validates this user request +func (m *UserRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *UserRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *UserRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *UserRequest) UnmarshalBinary(b []byte) error { + var res UserRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/user_response.go b/api/devops/v0.0.1/devops_models/user_response.go new file mode 100644 index 0000000..3905793 --- /dev/null +++ b/api/devops/v0.0.1/devops_models/user_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// UserResponse An array of Print-Ready ingest Objects +// +// swagger:model UserResponse +type UserResponse struct { + + // data + Data []*User `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this user response +func (m *UserResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *UserResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *UserResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *UserResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *UserResponse) UnmarshalBinary(b []byte) error { + var res UserResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/devops/v0.0.1/devops_models/user_role.go b/api/devops/v0.0.1/devops_models/user_role.go new file mode 100644 index 0000000..10cf776 --- /dev/null +++ b/api/devops/v0.0.1/devops_models/user_role.go @@ -0,0 +1,83 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package devops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// UserRole Relationship object that connects user to a role +// +// swagger:model UserRole +type UserRole struct { + + // Account Id + AccountID string `json:"AccountID,omitempty"` + + // Linked role ID + Auth0RoleID string `json:"Auth0RoleID,omitempty"` + + // Auth0 User ID + Auth0UserID string `json:"Auth0UserID,omitempty"` + + // Company Name + CompanyName string `json:"CompanyName,omitempty"` + + // Contact ID + ContactID string `json:"ContactID,omitempty"` + + // Role description + RoleDescription string `json:"RoleDescription,omitempty"` + + // The Role ID + RoleID string `json:"RoleID,omitempty"` + + // Role Name + RoleName string `json:"RoleName,omitempty"` + + // Taxnexus Account Number + TaxnexusAccount string `json:"TaxnexusAccount,omitempty"` + + // User Email Address + UserEmail string `json:"UserEmail,omitempty"` + + // User Full Name + UserFullName string `json:"UserFullName,omitempty"` + + // The User ID + UserID string `json:"UserID,omitempty"` + + // Username + Username string `json:"Username,omitempty"` +} + +// Validate validates this user role +func (m *UserRole) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *UserRole) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *UserRole) UnmarshalBinary(b []byte) error { + var res UserRole + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_client/coordinate/coordinate_client.go b/api/geo/v0.0.1/geo_client/coordinate/coordinate_client.go new file mode 100644 index 0000000..c1217be --- /dev/null +++ b/api/geo/v0.0.1/geo_client/coordinate/coordinate_client.go @@ -0,0 +1,235 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package coordinate + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new coordinate API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for coordinate API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + DeleteCoordinate(params *DeleteCoordinateParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteCoordinateOK, error) + + GetCoordinateBasic(params *GetCoordinateBasicParams, authInfo runtime.ClientAuthInfoWriter) (*GetCoordinateBasicOK, error) + + GetCoordinateObservable(params *GetCoordinateObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetCoordinateObservableOK, error) + + GetCoordinates(params *GetCoordinatesParams, authInfo runtime.ClientAuthInfoWriter) (*GetCoordinatesOK, error) + + PostCoordinates(params *PostCoordinatesParams, authInfo runtime.ClientAuthInfoWriter) (*PostCoordinatesOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + DeleteCoordinate deletes a coordinate + + Delete a Taxneuxs Coordinate record from the Coordinate database +*/ +func (a *Client) DeleteCoordinate(params *DeleteCoordinateParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteCoordinateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDeleteCoordinateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "deleteCoordinate", + Method: "DELETE", + PathPattern: "/coordinates", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &DeleteCoordinateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*DeleteCoordinateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for deleteCoordinate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetCoordinateBasic gets a single taxnexus coordinate from address information + + Response is one minimized Coordinate record including Tax Type IDs +*/ +func (a *Client) GetCoordinateBasic(params *GetCoordinateBasicParams, authInfo runtime.ClientAuthInfoWriter) (*GetCoordinateBasicOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetCoordinateBasicParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getCoordinateBasic", + Method: "GET", + PathPattern: "/coordinates/basic", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetCoordinateBasicReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetCoordinateBasicOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getCoordinateBasic: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetCoordinateObservable gets a single taxnexus coordinate as an observable array + + Response is one minimized Coordinate record including Tax Type IDs as an observable array +*/ +func (a *Client) GetCoordinateObservable(params *GetCoordinateObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetCoordinateObservableOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetCoordinateObservableParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getCoordinateObservable", + Method: "GET", + PathPattern: "/coordinates/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetCoordinateObservableReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetCoordinateObservableOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getCoordinateObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetCoordinates gets a single taxnexus coordinate from address information + + Return a fully-populated Coordinate record including Tax Type array +*/ +func (a *Client) GetCoordinates(params *GetCoordinatesParams, authInfo runtime.ClientAuthInfoWriter) (*GetCoordinatesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetCoordinatesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getCoordinates", + Method: "GET", + PathPattern: "/coordinates", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetCoordinatesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetCoordinatesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getCoordinates: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostCoordinates processes a batch of coordinate g e t requests + + Processes a batch of Coordinate GET requests and returns an array of Coordinate records including Tax Type IDs +*/ +func (a *Client) PostCoordinates(params *PostCoordinatesParams, authInfo runtime.ClientAuthInfoWriter) (*PostCoordinatesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostCoordinatesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postCoordinates", + Method: "POST", + PathPattern: "/coordinates", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostCoordinatesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostCoordinatesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postCoordinates: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/geo/v0.0.1/geo_client/coordinate/delete_coordinate_parameters.go b/api/geo/v0.0.1/geo_client/coordinate/delete_coordinate_parameters.go new file mode 100644 index 0000000..d818fa4 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/coordinate/delete_coordinate_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package coordinate + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewDeleteCoordinateParams creates a new DeleteCoordinateParams object +// with the default values initialized. +func NewDeleteCoordinateParams() *DeleteCoordinateParams { + var () + return &DeleteCoordinateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewDeleteCoordinateParamsWithTimeout creates a new DeleteCoordinateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewDeleteCoordinateParamsWithTimeout(timeout time.Duration) *DeleteCoordinateParams { + var () + return &DeleteCoordinateParams{ + + timeout: timeout, + } +} + +// NewDeleteCoordinateParamsWithContext creates a new DeleteCoordinateParams object +// with the default values initialized, and the ability to set a context for a request +func NewDeleteCoordinateParamsWithContext(ctx context.Context) *DeleteCoordinateParams { + var () + return &DeleteCoordinateParams{ + + Context: ctx, + } +} + +// NewDeleteCoordinateParamsWithHTTPClient creates a new DeleteCoordinateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewDeleteCoordinateParamsWithHTTPClient(client *http.Client) *DeleteCoordinateParams { + var () + return &DeleteCoordinateParams{ + HTTPClient: client, + } +} + +/*DeleteCoordinateParams contains all the parameters to send to the API endpoint +for the delete coordinate operation typically these are written to a http.Request +*/ +type DeleteCoordinateParams struct { + + /*CoordinateID + Taxnexus Record Id of a Coordinate + + */ + CoordinateID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the delete coordinate params +func (o *DeleteCoordinateParams) WithTimeout(timeout time.Duration) *DeleteCoordinateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the delete coordinate params +func (o *DeleteCoordinateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the delete coordinate params +func (o *DeleteCoordinateParams) WithContext(ctx context.Context) *DeleteCoordinateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the delete coordinate params +func (o *DeleteCoordinateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the delete coordinate params +func (o *DeleteCoordinateParams) WithHTTPClient(client *http.Client) *DeleteCoordinateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the delete coordinate params +func (o *DeleteCoordinateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCoordinateID adds the coordinateID to the delete coordinate params +func (o *DeleteCoordinateParams) WithCoordinateID(coordinateID *string) *DeleteCoordinateParams { + o.SetCoordinateID(coordinateID) + return o +} + +// SetCoordinateID adds the coordinateId to the delete coordinate params +func (o *DeleteCoordinateParams) SetCoordinateID(coordinateID *string) { + o.CoordinateID = coordinateID +} + +// WriteToRequest writes these params to a swagger request +func (o *DeleteCoordinateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CoordinateID != nil { + + // query param coordinateId + var qrCoordinateID string + if o.CoordinateID != nil { + qrCoordinateID = *o.CoordinateID + } + qCoordinateID := qrCoordinateID + if qCoordinateID != "" { + if err := r.SetQueryParam("coordinateId", qCoordinateID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/coordinate/delete_coordinate_responses.go b/api/geo/v0.0.1/geo_client/coordinate/delete_coordinate_responses.go new file mode 100644 index 0000000..9574ad1 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/coordinate/delete_coordinate_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package coordinate + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// DeleteCoordinateReader is a Reader for the DeleteCoordinate structure. +type DeleteCoordinateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DeleteCoordinateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDeleteCoordinateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewDeleteCoordinateUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewDeleteCoordinateForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewDeleteCoordinateNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewDeleteCoordinateUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewDeleteCoordinateInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewDeleteCoordinateOK creates a DeleteCoordinateOK with default headers values +func NewDeleteCoordinateOK() *DeleteCoordinateOK { + return &DeleteCoordinateOK{} +} + +/*DeleteCoordinateOK handles this case with default header values. + +Taxnexus Response with Message Objects with Delete Status +*/ +type DeleteCoordinateOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *geo_models.DeleteResponse +} + +func (o *DeleteCoordinateOK) Error() string { + return fmt.Sprintf("[DELETE /coordinates][%d] deleteCoordinateOK %+v", 200, o.Payload) +} + +func (o *DeleteCoordinateOK) GetPayload() *geo_models.DeleteResponse { + return o.Payload +} + +func (o *DeleteCoordinateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(geo_models.DeleteResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteCoordinateUnauthorized creates a DeleteCoordinateUnauthorized with default headers values +func NewDeleteCoordinateUnauthorized() *DeleteCoordinateUnauthorized { + return &DeleteCoordinateUnauthorized{} +} + +/*DeleteCoordinateUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type DeleteCoordinateUnauthorized struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *DeleteCoordinateUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /coordinates][%d] deleteCoordinateUnauthorized %+v", 401, o.Payload) +} + +func (o *DeleteCoordinateUnauthorized) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *DeleteCoordinateUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteCoordinateForbidden creates a DeleteCoordinateForbidden with default headers values +func NewDeleteCoordinateForbidden() *DeleteCoordinateForbidden { + return &DeleteCoordinateForbidden{} +} + +/*DeleteCoordinateForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type DeleteCoordinateForbidden struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *DeleteCoordinateForbidden) Error() string { + return fmt.Sprintf("[DELETE /coordinates][%d] deleteCoordinateForbidden %+v", 403, o.Payload) +} + +func (o *DeleteCoordinateForbidden) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *DeleteCoordinateForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteCoordinateNotFound creates a DeleteCoordinateNotFound with default headers values +func NewDeleteCoordinateNotFound() *DeleteCoordinateNotFound { + return &DeleteCoordinateNotFound{} +} + +/*DeleteCoordinateNotFound handles this case with default header values. + +Resource was not found +*/ +type DeleteCoordinateNotFound struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *DeleteCoordinateNotFound) Error() string { + return fmt.Sprintf("[DELETE /coordinates][%d] deleteCoordinateNotFound %+v", 404, o.Payload) +} + +func (o *DeleteCoordinateNotFound) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *DeleteCoordinateNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteCoordinateUnprocessableEntity creates a DeleteCoordinateUnprocessableEntity with default headers values +func NewDeleteCoordinateUnprocessableEntity() *DeleteCoordinateUnprocessableEntity { + return &DeleteCoordinateUnprocessableEntity{} +} + +/*DeleteCoordinateUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type DeleteCoordinateUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *DeleteCoordinateUnprocessableEntity) Error() string { + return fmt.Sprintf("[DELETE /coordinates][%d] deleteCoordinateUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *DeleteCoordinateUnprocessableEntity) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *DeleteCoordinateUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteCoordinateInternalServerError creates a DeleteCoordinateInternalServerError with default headers values +func NewDeleteCoordinateInternalServerError() *DeleteCoordinateInternalServerError { + return &DeleteCoordinateInternalServerError{} +} + +/*DeleteCoordinateInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type DeleteCoordinateInternalServerError struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *DeleteCoordinateInternalServerError) Error() string { + return fmt.Sprintf("[DELETE /coordinates][%d] deleteCoordinateInternalServerError %+v", 500, o.Payload) +} + +func (o *DeleteCoordinateInternalServerError) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *DeleteCoordinateInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/coordinate/get_coordinate_basic_parameters.go b/api/geo/v0.0.1/geo_client/coordinate/get_coordinate_basic_parameters.go new file mode 100644 index 0000000..7fa6ec9 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/coordinate/get_coordinate_basic_parameters.go @@ -0,0 +1,278 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package coordinate + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetCoordinateBasicParams creates a new GetCoordinateBasicParams object +// with the default values initialized. +func NewGetCoordinateBasicParams() *GetCoordinateBasicParams { + var () + return &GetCoordinateBasicParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetCoordinateBasicParamsWithTimeout creates a new GetCoordinateBasicParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetCoordinateBasicParamsWithTimeout(timeout time.Duration) *GetCoordinateBasicParams { + var () + return &GetCoordinateBasicParams{ + + timeout: timeout, + } +} + +// NewGetCoordinateBasicParamsWithContext creates a new GetCoordinateBasicParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetCoordinateBasicParamsWithContext(ctx context.Context) *GetCoordinateBasicParams { + var () + return &GetCoordinateBasicParams{ + + Context: ctx, + } +} + +// NewGetCoordinateBasicParamsWithHTTPClient creates a new GetCoordinateBasicParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetCoordinateBasicParamsWithHTTPClient(client *http.Client) *GetCoordinateBasicParams { + var () + return &GetCoordinateBasicParams{ + HTTPClient: client, + } +} + +/*GetCoordinateBasicParams contains all the parameters to send to the API endpoint +for the get coordinate basic operation typically these are written to a http.Request +*/ +type GetCoordinateBasicParams struct { + + /*Address + Postal Address URL encoded; partial addresses allowed + + */ + Address *string + /*CoordinateID + Taxnexus Record Id of a Coordinate + + */ + CoordinateID *string + /*Date + Transaction date (defaults to current) + + */ + Date *string + /*PlaceName + Alternate City, ST format to backup addressQuery + + */ + PlaceName *string + /*Ref + Source system reference + + */ + Ref *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get coordinate basic params +func (o *GetCoordinateBasicParams) WithTimeout(timeout time.Duration) *GetCoordinateBasicParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get coordinate basic params +func (o *GetCoordinateBasicParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get coordinate basic params +func (o *GetCoordinateBasicParams) WithContext(ctx context.Context) *GetCoordinateBasicParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get coordinate basic params +func (o *GetCoordinateBasicParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get coordinate basic params +func (o *GetCoordinateBasicParams) WithHTTPClient(client *http.Client) *GetCoordinateBasicParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get coordinate basic params +func (o *GetCoordinateBasicParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAddress adds the address to the get coordinate basic params +func (o *GetCoordinateBasicParams) WithAddress(address *string) *GetCoordinateBasicParams { + o.SetAddress(address) + return o +} + +// SetAddress adds the address to the get coordinate basic params +func (o *GetCoordinateBasicParams) SetAddress(address *string) { + o.Address = address +} + +// WithCoordinateID adds the coordinateID to the get coordinate basic params +func (o *GetCoordinateBasicParams) WithCoordinateID(coordinateID *string) *GetCoordinateBasicParams { + o.SetCoordinateID(coordinateID) + return o +} + +// SetCoordinateID adds the coordinateId to the get coordinate basic params +func (o *GetCoordinateBasicParams) SetCoordinateID(coordinateID *string) { + o.CoordinateID = coordinateID +} + +// WithDate adds the date to the get coordinate basic params +func (o *GetCoordinateBasicParams) WithDate(date *string) *GetCoordinateBasicParams { + o.SetDate(date) + return o +} + +// SetDate adds the date to the get coordinate basic params +func (o *GetCoordinateBasicParams) SetDate(date *string) { + o.Date = date +} + +// WithPlaceName adds the placeName to the get coordinate basic params +func (o *GetCoordinateBasicParams) WithPlaceName(placeName *string) *GetCoordinateBasicParams { + o.SetPlaceName(placeName) + return o +} + +// SetPlaceName adds the placeName to the get coordinate basic params +func (o *GetCoordinateBasicParams) SetPlaceName(placeName *string) { + o.PlaceName = placeName +} + +// WithRef adds the ref to the get coordinate basic params +func (o *GetCoordinateBasicParams) WithRef(ref *string) *GetCoordinateBasicParams { + o.SetRef(ref) + return o +} + +// SetRef adds the ref to the get coordinate basic params +func (o *GetCoordinateBasicParams) SetRef(ref *string) { + o.Ref = ref +} + +// WriteToRequest writes these params to a swagger request +func (o *GetCoordinateBasicParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Address != nil { + + // query param address + var qrAddress string + if o.Address != nil { + qrAddress = *o.Address + } + qAddress := qrAddress + if qAddress != "" { + if err := r.SetQueryParam("address", qAddress); err != nil { + return err + } + } + + } + + if o.CoordinateID != nil { + + // query param coordinateId + var qrCoordinateID string + if o.CoordinateID != nil { + qrCoordinateID = *o.CoordinateID + } + qCoordinateID := qrCoordinateID + if qCoordinateID != "" { + if err := r.SetQueryParam("coordinateId", qCoordinateID); err != nil { + return err + } + } + + } + + if o.Date != nil { + + // query param date + var qrDate string + if o.Date != nil { + qrDate = *o.Date + } + qDate := qrDate + if qDate != "" { + if err := r.SetQueryParam("date", qDate); err != nil { + return err + } + } + + } + + if o.PlaceName != nil { + + // query param placeName + var qrPlaceName string + if o.PlaceName != nil { + qrPlaceName = *o.PlaceName + } + qPlaceName := qrPlaceName + if qPlaceName != "" { + if err := r.SetQueryParam("placeName", qPlaceName); err != nil { + return err + } + } + + } + + if o.Ref != nil { + + // query param ref + var qrRef string + if o.Ref != nil { + qrRef = *o.Ref + } + qRef := qrRef + if qRef != "" { + if err := r.SetQueryParam("ref", qRef); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/coordinate/get_coordinate_basic_responses.go b/api/geo/v0.0.1/geo_client/coordinate/get_coordinate_basic_responses.go new file mode 100644 index 0000000..7976337 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/coordinate/get_coordinate_basic_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package coordinate + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// GetCoordinateBasicReader is a Reader for the GetCoordinateBasic structure. +type GetCoordinateBasicReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetCoordinateBasicReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetCoordinateBasicOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetCoordinateBasicUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetCoordinateBasicForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetCoordinateBasicNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetCoordinateBasicUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetCoordinateBasicInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetCoordinateBasicOK creates a GetCoordinateBasicOK with default headers values +func NewGetCoordinateBasicOK() *GetCoordinateBasicOK { + return &GetCoordinateBasicOK{} +} + +/*GetCoordinateBasicOK handles this case with default header values. + +Taxnexus Response with an array of basic Coordinate objects +*/ +type GetCoordinateBasicOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *geo_models.CoordinateBasicResponse +} + +func (o *GetCoordinateBasicOK) Error() string { + return fmt.Sprintf("[GET /coordinates/basic][%d] getCoordinateBasicOK %+v", 200, o.Payload) +} + +func (o *GetCoordinateBasicOK) GetPayload() *geo_models.CoordinateBasicResponse { + return o.Payload +} + +func (o *GetCoordinateBasicOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(geo_models.CoordinateBasicResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCoordinateBasicUnauthorized creates a GetCoordinateBasicUnauthorized with default headers values +func NewGetCoordinateBasicUnauthorized() *GetCoordinateBasicUnauthorized { + return &GetCoordinateBasicUnauthorized{} +} + +/*GetCoordinateBasicUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetCoordinateBasicUnauthorized struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCoordinateBasicUnauthorized) Error() string { + return fmt.Sprintf("[GET /coordinates/basic][%d] getCoordinateBasicUnauthorized %+v", 401, o.Payload) +} + +func (o *GetCoordinateBasicUnauthorized) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCoordinateBasicUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCoordinateBasicForbidden creates a GetCoordinateBasicForbidden with default headers values +func NewGetCoordinateBasicForbidden() *GetCoordinateBasicForbidden { + return &GetCoordinateBasicForbidden{} +} + +/*GetCoordinateBasicForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetCoordinateBasicForbidden struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCoordinateBasicForbidden) Error() string { + return fmt.Sprintf("[GET /coordinates/basic][%d] getCoordinateBasicForbidden %+v", 403, o.Payload) +} + +func (o *GetCoordinateBasicForbidden) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCoordinateBasicForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCoordinateBasicNotFound creates a GetCoordinateBasicNotFound with default headers values +func NewGetCoordinateBasicNotFound() *GetCoordinateBasicNotFound { + return &GetCoordinateBasicNotFound{} +} + +/*GetCoordinateBasicNotFound handles this case with default header values. + +Resource was not found +*/ +type GetCoordinateBasicNotFound struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCoordinateBasicNotFound) Error() string { + return fmt.Sprintf("[GET /coordinates/basic][%d] getCoordinateBasicNotFound %+v", 404, o.Payload) +} + +func (o *GetCoordinateBasicNotFound) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCoordinateBasicNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCoordinateBasicUnprocessableEntity creates a GetCoordinateBasicUnprocessableEntity with default headers values +func NewGetCoordinateBasicUnprocessableEntity() *GetCoordinateBasicUnprocessableEntity { + return &GetCoordinateBasicUnprocessableEntity{} +} + +/*GetCoordinateBasicUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetCoordinateBasicUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCoordinateBasicUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /coordinates/basic][%d] getCoordinateBasicUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetCoordinateBasicUnprocessableEntity) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCoordinateBasicUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCoordinateBasicInternalServerError creates a GetCoordinateBasicInternalServerError with default headers values +func NewGetCoordinateBasicInternalServerError() *GetCoordinateBasicInternalServerError { + return &GetCoordinateBasicInternalServerError{} +} + +/*GetCoordinateBasicInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetCoordinateBasicInternalServerError struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCoordinateBasicInternalServerError) Error() string { + return fmt.Sprintf("[GET /coordinates/basic][%d] getCoordinateBasicInternalServerError %+v", 500, o.Payload) +} + +func (o *GetCoordinateBasicInternalServerError) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCoordinateBasicInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/coordinate/get_coordinate_observable_parameters.go b/api/geo/v0.0.1/geo_client/coordinate/get_coordinate_observable_parameters.go new file mode 100644 index 0000000..95de158 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/coordinate/get_coordinate_observable_parameters.go @@ -0,0 +1,278 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package coordinate + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetCoordinateObservableParams creates a new GetCoordinateObservableParams object +// with the default values initialized. +func NewGetCoordinateObservableParams() *GetCoordinateObservableParams { + var () + return &GetCoordinateObservableParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetCoordinateObservableParamsWithTimeout creates a new GetCoordinateObservableParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetCoordinateObservableParamsWithTimeout(timeout time.Duration) *GetCoordinateObservableParams { + var () + return &GetCoordinateObservableParams{ + + timeout: timeout, + } +} + +// NewGetCoordinateObservableParamsWithContext creates a new GetCoordinateObservableParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetCoordinateObservableParamsWithContext(ctx context.Context) *GetCoordinateObservableParams { + var () + return &GetCoordinateObservableParams{ + + Context: ctx, + } +} + +// NewGetCoordinateObservableParamsWithHTTPClient creates a new GetCoordinateObservableParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetCoordinateObservableParamsWithHTTPClient(client *http.Client) *GetCoordinateObservableParams { + var () + return &GetCoordinateObservableParams{ + HTTPClient: client, + } +} + +/*GetCoordinateObservableParams contains all the parameters to send to the API endpoint +for the get coordinate observable operation typically these are written to a http.Request +*/ +type GetCoordinateObservableParams struct { + + /*Address + Postal Address URL encoded; partial addresses allowed + + */ + Address *string + /*CoordinateID + Taxnexus Record Id of a Coordinate + + */ + CoordinateID *string + /*Date + Transaction date (defaults to current) + + */ + Date *string + /*PlaceName + Alternate City, ST format to backup addressQuery + + */ + PlaceName *string + /*Ref + Source system reference + + */ + Ref *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get coordinate observable params +func (o *GetCoordinateObservableParams) WithTimeout(timeout time.Duration) *GetCoordinateObservableParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get coordinate observable params +func (o *GetCoordinateObservableParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get coordinate observable params +func (o *GetCoordinateObservableParams) WithContext(ctx context.Context) *GetCoordinateObservableParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get coordinate observable params +func (o *GetCoordinateObservableParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get coordinate observable params +func (o *GetCoordinateObservableParams) WithHTTPClient(client *http.Client) *GetCoordinateObservableParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get coordinate observable params +func (o *GetCoordinateObservableParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAddress adds the address to the get coordinate observable params +func (o *GetCoordinateObservableParams) WithAddress(address *string) *GetCoordinateObservableParams { + o.SetAddress(address) + return o +} + +// SetAddress adds the address to the get coordinate observable params +func (o *GetCoordinateObservableParams) SetAddress(address *string) { + o.Address = address +} + +// WithCoordinateID adds the coordinateID to the get coordinate observable params +func (o *GetCoordinateObservableParams) WithCoordinateID(coordinateID *string) *GetCoordinateObservableParams { + o.SetCoordinateID(coordinateID) + return o +} + +// SetCoordinateID adds the coordinateId to the get coordinate observable params +func (o *GetCoordinateObservableParams) SetCoordinateID(coordinateID *string) { + o.CoordinateID = coordinateID +} + +// WithDate adds the date to the get coordinate observable params +func (o *GetCoordinateObservableParams) WithDate(date *string) *GetCoordinateObservableParams { + o.SetDate(date) + return o +} + +// SetDate adds the date to the get coordinate observable params +func (o *GetCoordinateObservableParams) SetDate(date *string) { + o.Date = date +} + +// WithPlaceName adds the placeName to the get coordinate observable params +func (o *GetCoordinateObservableParams) WithPlaceName(placeName *string) *GetCoordinateObservableParams { + o.SetPlaceName(placeName) + return o +} + +// SetPlaceName adds the placeName to the get coordinate observable params +func (o *GetCoordinateObservableParams) SetPlaceName(placeName *string) { + o.PlaceName = placeName +} + +// WithRef adds the ref to the get coordinate observable params +func (o *GetCoordinateObservableParams) WithRef(ref *string) *GetCoordinateObservableParams { + o.SetRef(ref) + return o +} + +// SetRef adds the ref to the get coordinate observable params +func (o *GetCoordinateObservableParams) SetRef(ref *string) { + o.Ref = ref +} + +// WriteToRequest writes these params to a swagger request +func (o *GetCoordinateObservableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Address != nil { + + // query param address + var qrAddress string + if o.Address != nil { + qrAddress = *o.Address + } + qAddress := qrAddress + if qAddress != "" { + if err := r.SetQueryParam("address", qAddress); err != nil { + return err + } + } + + } + + if o.CoordinateID != nil { + + // query param coordinateId + var qrCoordinateID string + if o.CoordinateID != nil { + qrCoordinateID = *o.CoordinateID + } + qCoordinateID := qrCoordinateID + if qCoordinateID != "" { + if err := r.SetQueryParam("coordinateId", qCoordinateID); err != nil { + return err + } + } + + } + + if o.Date != nil { + + // query param date + var qrDate string + if o.Date != nil { + qrDate = *o.Date + } + qDate := qrDate + if qDate != "" { + if err := r.SetQueryParam("date", qDate); err != nil { + return err + } + } + + } + + if o.PlaceName != nil { + + // query param placeName + var qrPlaceName string + if o.PlaceName != nil { + qrPlaceName = *o.PlaceName + } + qPlaceName := qrPlaceName + if qPlaceName != "" { + if err := r.SetQueryParam("placeName", qPlaceName); err != nil { + return err + } + } + + } + + if o.Ref != nil { + + // query param ref + var qrRef string + if o.Ref != nil { + qrRef = *o.Ref + } + qRef := qrRef + if qRef != "" { + if err := r.SetQueryParam("ref", qRef); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/coordinate/get_coordinate_observable_responses.go b/api/geo/v0.0.1/geo_client/coordinate/get_coordinate_observable_responses.go new file mode 100644 index 0000000..67c089f --- /dev/null +++ b/api/geo/v0.0.1/geo_client/coordinate/get_coordinate_observable_responses.go @@ -0,0 +1,301 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package coordinate + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// GetCoordinateObservableReader is a Reader for the GetCoordinateObservable structure. +type GetCoordinateObservableReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetCoordinateObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetCoordinateObservableOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetCoordinateObservableUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetCoordinateObservableForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetCoordinateObservableNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetCoordinateObservableUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetCoordinateObservableInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetCoordinateObservableOK creates a GetCoordinateObservableOK with default headers values +func NewGetCoordinateObservableOK() *GetCoordinateObservableOK { + return &GetCoordinateObservableOK{} +} + +/*GetCoordinateObservableOK handles this case with default header values. + +Taxnexus Response with an array of basic Coordinate objects +*/ +type GetCoordinateObservableOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload []*geo_models.Coordinate +} + +func (o *GetCoordinateObservableOK) Error() string { + return fmt.Sprintf("[GET /coordinates/observable][%d] getCoordinateObservableOK %+v", 200, o.Payload) +} + +func (o *GetCoordinateObservableOK) GetPayload() []*geo_models.Coordinate { + return o.Payload +} + +func (o *GetCoordinateObservableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCoordinateObservableUnauthorized creates a GetCoordinateObservableUnauthorized with default headers values +func NewGetCoordinateObservableUnauthorized() *GetCoordinateObservableUnauthorized { + return &GetCoordinateObservableUnauthorized{} +} + +/*GetCoordinateObservableUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetCoordinateObservableUnauthorized struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCoordinateObservableUnauthorized) Error() string { + return fmt.Sprintf("[GET /coordinates/observable][%d] getCoordinateObservableUnauthorized %+v", 401, o.Payload) +} + +func (o *GetCoordinateObservableUnauthorized) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCoordinateObservableUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCoordinateObservableForbidden creates a GetCoordinateObservableForbidden with default headers values +func NewGetCoordinateObservableForbidden() *GetCoordinateObservableForbidden { + return &GetCoordinateObservableForbidden{} +} + +/*GetCoordinateObservableForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetCoordinateObservableForbidden struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCoordinateObservableForbidden) Error() string { + return fmt.Sprintf("[GET /coordinates/observable][%d] getCoordinateObservableForbidden %+v", 403, o.Payload) +} + +func (o *GetCoordinateObservableForbidden) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCoordinateObservableForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCoordinateObservableNotFound creates a GetCoordinateObservableNotFound with default headers values +func NewGetCoordinateObservableNotFound() *GetCoordinateObservableNotFound { + return &GetCoordinateObservableNotFound{} +} + +/*GetCoordinateObservableNotFound handles this case with default header values. + +Resource was not found +*/ +type GetCoordinateObservableNotFound struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCoordinateObservableNotFound) Error() string { + return fmt.Sprintf("[GET /coordinates/observable][%d] getCoordinateObservableNotFound %+v", 404, o.Payload) +} + +func (o *GetCoordinateObservableNotFound) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCoordinateObservableNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCoordinateObservableUnprocessableEntity creates a GetCoordinateObservableUnprocessableEntity with default headers values +func NewGetCoordinateObservableUnprocessableEntity() *GetCoordinateObservableUnprocessableEntity { + return &GetCoordinateObservableUnprocessableEntity{} +} + +/*GetCoordinateObservableUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetCoordinateObservableUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCoordinateObservableUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /coordinates/observable][%d] getCoordinateObservableUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetCoordinateObservableUnprocessableEntity) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCoordinateObservableUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCoordinateObservableInternalServerError creates a GetCoordinateObservableInternalServerError with default headers values +func NewGetCoordinateObservableInternalServerError() *GetCoordinateObservableInternalServerError { + return &GetCoordinateObservableInternalServerError{} +} + +/*GetCoordinateObservableInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetCoordinateObservableInternalServerError struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCoordinateObservableInternalServerError) Error() string { + return fmt.Sprintf("[GET /coordinates/observable][%d] getCoordinateObservableInternalServerError %+v", 500, o.Payload) +} + +func (o *GetCoordinateObservableInternalServerError) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCoordinateObservableInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/coordinate/get_coordinates_parameters.go b/api/geo/v0.0.1/geo_client/coordinate/get_coordinates_parameters.go new file mode 100644 index 0000000..cb0bea8 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/coordinate/get_coordinates_parameters.go @@ -0,0 +1,278 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package coordinate + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetCoordinatesParams creates a new GetCoordinatesParams object +// with the default values initialized. +func NewGetCoordinatesParams() *GetCoordinatesParams { + var () + return &GetCoordinatesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetCoordinatesParamsWithTimeout creates a new GetCoordinatesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetCoordinatesParamsWithTimeout(timeout time.Duration) *GetCoordinatesParams { + var () + return &GetCoordinatesParams{ + + timeout: timeout, + } +} + +// NewGetCoordinatesParamsWithContext creates a new GetCoordinatesParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetCoordinatesParamsWithContext(ctx context.Context) *GetCoordinatesParams { + var () + return &GetCoordinatesParams{ + + Context: ctx, + } +} + +// NewGetCoordinatesParamsWithHTTPClient creates a new GetCoordinatesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetCoordinatesParamsWithHTTPClient(client *http.Client) *GetCoordinatesParams { + var () + return &GetCoordinatesParams{ + HTTPClient: client, + } +} + +/*GetCoordinatesParams contains all the parameters to send to the API endpoint +for the get coordinates operation typically these are written to a http.Request +*/ +type GetCoordinatesParams struct { + + /*Address + Postal Address URL encoded; partial addresses allowed + + */ + Address *string + /*CoordinateID + Taxnexus Record Id of a Coordinate + + */ + CoordinateID *string + /*Date + Transaction date (defaults to current) + + */ + Date *string + /*PlaceName + Alternate City, ST format to backup addressQuery + + */ + PlaceName *string + /*Ref + Source system reference + + */ + Ref *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get coordinates params +func (o *GetCoordinatesParams) WithTimeout(timeout time.Duration) *GetCoordinatesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get coordinates params +func (o *GetCoordinatesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get coordinates params +func (o *GetCoordinatesParams) WithContext(ctx context.Context) *GetCoordinatesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get coordinates params +func (o *GetCoordinatesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get coordinates params +func (o *GetCoordinatesParams) WithHTTPClient(client *http.Client) *GetCoordinatesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get coordinates params +func (o *GetCoordinatesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAddress adds the address to the get coordinates params +func (o *GetCoordinatesParams) WithAddress(address *string) *GetCoordinatesParams { + o.SetAddress(address) + return o +} + +// SetAddress adds the address to the get coordinates params +func (o *GetCoordinatesParams) SetAddress(address *string) { + o.Address = address +} + +// WithCoordinateID adds the coordinateID to the get coordinates params +func (o *GetCoordinatesParams) WithCoordinateID(coordinateID *string) *GetCoordinatesParams { + o.SetCoordinateID(coordinateID) + return o +} + +// SetCoordinateID adds the coordinateId to the get coordinates params +func (o *GetCoordinatesParams) SetCoordinateID(coordinateID *string) { + o.CoordinateID = coordinateID +} + +// WithDate adds the date to the get coordinates params +func (o *GetCoordinatesParams) WithDate(date *string) *GetCoordinatesParams { + o.SetDate(date) + return o +} + +// SetDate adds the date to the get coordinates params +func (o *GetCoordinatesParams) SetDate(date *string) { + o.Date = date +} + +// WithPlaceName adds the placeName to the get coordinates params +func (o *GetCoordinatesParams) WithPlaceName(placeName *string) *GetCoordinatesParams { + o.SetPlaceName(placeName) + return o +} + +// SetPlaceName adds the placeName to the get coordinates params +func (o *GetCoordinatesParams) SetPlaceName(placeName *string) { + o.PlaceName = placeName +} + +// WithRef adds the ref to the get coordinates params +func (o *GetCoordinatesParams) WithRef(ref *string) *GetCoordinatesParams { + o.SetRef(ref) + return o +} + +// SetRef adds the ref to the get coordinates params +func (o *GetCoordinatesParams) SetRef(ref *string) { + o.Ref = ref +} + +// WriteToRequest writes these params to a swagger request +func (o *GetCoordinatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Address != nil { + + // query param address + var qrAddress string + if o.Address != nil { + qrAddress = *o.Address + } + qAddress := qrAddress + if qAddress != "" { + if err := r.SetQueryParam("address", qAddress); err != nil { + return err + } + } + + } + + if o.CoordinateID != nil { + + // query param coordinateId + var qrCoordinateID string + if o.CoordinateID != nil { + qrCoordinateID = *o.CoordinateID + } + qCoordinateID := qrCoordinateID + if qCoordinateID != "" { + if err := r.SetQueryParam("coordinateId", qCoordinateID); err != nil { + return err + } + } + + } + + if o.Date != nil { + + // query param date + var qrDate string + if o.Date != nil { + qrDate = *o.Date + } + qDate := qrDate + if qDate != "" { + if err := r.SetQueryParam("date", qDate); err != nil { + return err + } + } + + } + + if o.PlaceName != nil { + + // query param placeName + var qrPlaceName string + if o.PlaceName != nil { + qrPlaceName = *o.PlaceName + } + qPlaceName := qrPlaceName + if qPlaceName != "" { + if err := r.SetQueryParam("placeName", qPlaceName); err != nil { + return err + } + } + + } + + if o.Ref != nil { + + // query param ref + var qrRef string + if o.Ref != nil { + qrRef = *o.Ref + } + qRef := qrRef + if qRef != "" { + if err := r.SetQueryParam("ref", qRef); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/coordinate/get_coordinates_responses.go b/api/geo/v0.0.1/geo_client/coordinate/get_coordinates_responses.go new file mode 100644 index 0000000..885e270 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/coordinate/get_coordinates_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package coordinate + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// GetCoordinatesReader is a Reader for the GetCoordinates structure. +type GetCoordinatesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetCoordinatesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetCoordinatesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetCoordinatesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetCoordinatesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetCoordinatesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetCoordinatesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetCoordinatesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetCoordinatesOK creates a GetCoordinatesOK with default headers values +func NewGetCoordinatesOK() *GetCoordinatesOK { + return &GetCoordinatesOK{} +} + +/*GetCoordinatesOK handles this case with default header values. + +Taxnexus Response with an array of Coordinate objects +*/ +type GetCoordinatesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *geo_models.CoordinateResponse +} + +func (o *GetCoordinatesOK) Error() string { + return fmt.Sprintf("[GET /coordinates][%d] getCoordinatesOK %+v", 200, o.Payload) +} + +func (o *GetCoordinatesOK) GetPayload() *geo_models.CoordinateResponse { + return o.Payload +} + +func (o *GetCoordinatesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(geo_models.CoordinateResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCoordinatesUnauthorized creates a GetCoordinatesUnauthorized with default headers values +func NewGetCoordinatesUnauthorized() *GetCoordinatesUnauthorized { + return &GetCoordinatesUnauthorized{} +} + +/*GetCoordinatesUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetCoordinatesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCoordinatesUnauthorized) Error() string { + return fmt.Sprintf("[GET /coordinates][%d] getCoordinatesUnauthorized %+v", 401, o.Payload) +} + +func (o *GetCoordinatesUnauthorized) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCoordinatesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCoordinatesForbidden creates a GetCoordinatesForbidden with default headers values +func NewGetCoordinatesForbidden() *GetCoordinatesForbidden { + return &GetCoordinatesForbidden{} +} + +/*GetCoordinatesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetCoordinatesForbidden struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCoordinatesForbidden) Error() string { + return fmt.Sprintf("[GET /coordinates][%d] getCoordinatesForbidden %+v", 403, o.Payload) +} + +func (o *GetCoordinatesForbidden) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCoordinatesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCoordinatesNotFound creates a GetCoordinatesNotFound with default headers values +func NewGetCoordinatesNotFound() *GetCoordinatesNotFound { + return &GetCoordinatesNotFound{} +} + +/*GetCoordinatesNotFound handles this case with default header values. + +Resource was not found +*/ +type GetCoordinatesNotFound struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCoordinatesNotFound) Error() string { + return fmt.Sprintf("[GET /coordinates][%d] getCoordinatesNotFound %+v", 404, o.Payload) +} + +func (o *GetCoordinatesNotFound) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCoordinatesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCoordinatesUnprocessableEntity creates a GetCoordinatesUnprocessableEntity with default headers values +func NewGetCoordinatesUnprocessableEntity() *GetCoordinatesUnprocessableEntity { + return &GetCoordinatesUnprocessableEntity{} +} + +/*GetCoordinatesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetCoordinatesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCoordinatesUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /coordinates][%d] getCoordinatesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetCoordinatesUnprocessableEntity) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCoordinatesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCoordinatesInternalServerError creates a GetCoordinatesInternalServerError with default headers values +func NewGetCoordinatesInternalServerError() *GetCoordinatesInternalServerError { + return &GetCoordinatesInternalServerError{} +} + +/*GetCoordinatesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetCoordinatesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCoordinatesInternalServerError) Error() string { + return fmt.Sprintf("[GET /coordinates][%d] getCoordinatesInternalServerError %+v", 500, o.Payload) +} + +func (o *GetCoordinatesInternalServerError) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCoordinatesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/coordinate/post_coordinates_parameters.go b/api/geo/v0.0.1/geo_client/coordinate/post_coordinates_parameters.go new file mode 100644 index 0000000..661a93c --- /dev/null +++ b/api/geo/v0.0.1/geo_client/coordinate/post_coordinates_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package coordinate + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// NewPostCoordinatesParams creates a new PostCoordinatesParams object +// with the default values initialized. +func NewPostCoordinatesParams() *PostCoordinatesParams { + var () + return &PostCoordinatesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostCoordinatesParamsWithTimeout creates a new PostCoordinatesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostCoordinatesParamsWithTimeout(timeout time.Duration) *PostCoordinatesParams { + var () + return &PostCoordinatesParams{ + + timeout: timeout, + } +} + +// NewPostCoordinatesParamsWithContext creates a new PostCoordinatesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostCoordinatesParamsWithContext(ctx context.Context) *PostCoordinatesParams { + var () + return &PostCoordinatesParams{ + + Context: ctx, + } +} + +// NewPostCoordinatesParamsWithHTTPClient creates a new PostCoordinatesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostCoordinatesParamsWithHTTPClient(client *http.Client) *PostCoordinatesParams { + var () + return &PostCoordinatesParams{ + HTTPClient: client, + } +} + +/*PostCoordinatesParams contains all the parameters to send to the API endpoint +for the post coordinates operation typically these are written to a http.Request +*/ +type PostCoordinatesParams struct { + + /*CoordinateRequest + An array of new Coordinate records + + */ + CoordinateRequest *geo_models.CoordinateRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post coordinates params +func (o *PostCoordinatesParams) WithTimeout(timeout time.Duration) *PostCoordinatesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post coordinates params +func (o *PostCoordinatesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post coordinates params +func (o *PostCoordinatesParams) WithContext(ctx context.Context) *PostCoordinatesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post coordinates params +func (o *PostCoordinatesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post coordinates params +func (o *PostCoordinatesParams) WithHTTPClient(client *http.Client) *PostCoordinatesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post coordinates params +func (o *PostCoordinatesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCoordinateRequest adds the coordinateRequest to the post coordinates params +func (o *PostCoordinatesParams) WithCoordinateRequest(coordinateRequest *geo_models.CoordinateRequest) *PostCoordinatesParams { + o.SetCoordinateRequest(coordinateRequest) + return o +} + +// SetCoordinateRequest adds the coordinateRequest to the post coordinates params +func (o *PostCoordinatesParams) SetCoordinateRequest(coordinateRequest *geo_models.CoordinateRequest) { + o.CoordinateRequest = coordinateRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostCoordinatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CoordinateRequest != nil { + if err := r.SetBodyParam(o.CoordinateRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/coordinate/post_coordinates_responses.go b/api/geo/v0.0.1/geo_client/coordinate/post_coordinates_responses.go new file mode 100644 index 0000000..c9538a3 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/coordinate/post_coordinates_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package coordinate + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// PostCoordinatesReader is a Reader for the PostCoordinates structure. +type PostCoordinatesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostCoordinatesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostCoordinatesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostCoordinatesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostCoordinatesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostCoordinatesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostCoordinatesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostCoordinatesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostCoordinatesOK creates a PostCoordinatesOK with default headers values +func NewPostCoordinatesOK() *PostCoordinatesOK { + return &PostCoordinatesOK{} +} + +/*PostCoordinatesOK handles this case with default header values. + +Taxnexus Response with an array of Coordinate objects +*/ +type PostCoordinatesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *geo_models.CoordinateResponse +} + +func (o *PostCoordinatesOK) Error() string { + return fmt.Sprintf("[POST /coordinates][%d] postCoordinatesOK %+v", 200, o.Payload) +} + +func (o *PostCoordinatesOK) GetPayload() *geo_models.CoordinateResponse { + return o.Payload +} + +func (o *PostCoordinatesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(geo_models.CoordinateResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCoordinatesUnauthorized creates a PostCoordinatesUnauthorized with default headers values +func NewPostCoordinatesUnauthorized() *PostCoordinatesUnauthorized { + return &PostCoordinatesUnauthorized{} +} + +/*PostCoordinatesUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PostCoordinatesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostCoordinatesUnauthorized) Error() string { + return fmt.Sprintf("[POST /coordinates][%d] postCoordinatesUnauthorized %+v", 401, o.Payload) +} + +func (o *PostCoordinatesUnauthorized) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostCoordinatesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCoordinatesForbidden creates a PostCoordinatesForbidden with default headers values +func NewPostCoordinatesForbidden() *PostCoordinatesForbidden { + return &PostCoordinatesForbidden{} +} + +/*PostCoordinatesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostCoordinatesForbidden struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostCoordinatesForbidden) Error() string { + return fmt.Sprintf("[POST /coordinates][%d] postCoordinatesForbidden %+v", 403, o.Payload) +} + +func (o *PostCoordinatesForbidden) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostCoordinatesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCoordinatesNotFound creates a PostCoordinatesNotFound with default headers values +func NewPostCoordinatesNotFound() *PostCoordinatesNotFound { + return &PostCoordinatesNotFound{} +} + +/*PostCoordinatesNotFound handles this case with default header values. + +Resource was not found +*/ +type PostCoordinatesNotFound struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostCoordinatesNotFound) Error() string { + return fmt.Sprintf("[POST /coordinates][%d] postCoordinatesNotFound %+v", 404, o.Payload) +} + +func (o *PostCoordinatesNotFound) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostCoordinatesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCoordinatesUnprocessableEntity creates a PostCoordinatesUnprocessableEntity with default headers values +func NewPostCoordinatesUnprocessableEntity() *PostCoordinatesUnprocessableEntity { + return &PostCoordinatesUnprocessableEntity{} +} + +/*PostCoordinatesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostCoordinatesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostCoordinatesUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /coordinates][%d] postCoordinatesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostCoordinatesUnprocessableEntity) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostCoordinatesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCoordinatesInternalServerError creates a PostCoordinatesInternalServerError with default headers values +func NewPostCoordinatesInternalServerError() *PostCoordinatesInternalServerError { + return &PostCoordinatesInternalServerError{} +} + +/*PostCoordinatesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostCoordinatesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostCoordinatesInternalServerError) Error() string { + return fmt.Sprintf("[POST /coordinates][%d] postCoordinatesInternalServerError %+v", 500, o.Payload) +} + +func (o *PostCoordinatesInternalServerError) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostCoordinatesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/cors_client.go b/api/geo/v0.0.1/geo_client/cors/cors_client.go new file mode 100644 index 0000000..af1e957 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/cors_client.go @@ -0,0 +1,688 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new cors API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for cors API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetCoordinatesObservableOptions(params *GetCoordinatesObservableOptionsParams) (*GetCoordinatesObservableOptionsOK, error) + + GetCoordinatesOptions(params *GetCoordinatesOptionsParams) (*GetCoordinatesOptionsOK, error) + + GetCountiesObservableOptions(params *GetCountiesObservableOptionsParams) (*GetCountiesObservableOptionsOK, error) + + GetCountiesOptions(params *GetCountiesOptionsParams) (*GetCountiesOptionsOK, error) + + GetCountriesObservableOptions(params *GetCountriesObservableOptionsParams) (*GetCountriesObservableOptionsOK, error) + + GetCountriesOptions(params *GetCountriesOptionsParams) (*GetCountriesOptionsOK, error) + + GetDomainsObservableOptions(params *GetDomainsObservableOptionsParams) (*GetDomainsObservableOptionsOK, error) + + GetDomainsOptions(params *GetDomainsOptionsParams) (*GetDomainsOptionsOK, error) + + GetPlacesObservableOptions(params *GetPlacesObservableOptionsParams) (*GetPlacesObservableOptionsOK, error) + + GetPlacesOptions(params *GetPlacesOptionsParams) (*GetPlacesOptionsOK, error) + + GetStatesObservableOptions(params *GetStatesObservableOptionsParams) (*GetStatesObservableOptionsOK, error) + + GetStatesOptions(params *GetStatesOptionsParams) (*GetStatesOptionsOK, error) + + GetTaxRateObservableOptions(params *GetTaxRateObservableOptionsParams) (*GetTaxRateObservableOptionsOK, error) + + GetTaxRatesOptions(params *GetTaxRatesOptionsParams) (*GetTaxRatesOptionsOK, error) + + GetTaxTypeObservableOptions(params *GetTaxTypeObservableOptionsParams) (*GetTaxTypeObservableOptionsOK, error) + + GetTaxTypesOptions(params *GetTaxTypesOptionsParams) (*GetTaxTypesOptionsOK, error) + + GetTaxnexusCodesObservableOptions(params *GetTaxnexusCodesObservableOptionsParams) (*GetTaxnexusCodesObservableOptionsOK, error) + + GetTaxnexusCodesOptions(params *GetTaxnexusCodesOptionsParams) (*GetTaxnexusCodesOptionsOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetCoordinatesObservableOptions CORS support +*/ +func (a *Client) GetCoordinatesObservableOptions(params *GetCoordinatesObservableOptionsParams) (*GetCoordinatesObservableOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetCoordinatesObservableOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getCoordinatesObservableOptions", + Method: "OPTIONS", + PathPattern: "/coordinates/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetCoordinatesObservableOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetCoordinatesObservableOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getCoordinatesObservableOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetCoordinatesOptions CORS support +*/ +func (a *Client) GetCoordinatesOptions(params *GetCoordinatesOptionsParams) (*GetCoordinatesOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetCoordinatesOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getCoordinatesOptions", + Method: "OPTIONS", + PathPattern: "/coordinates", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetCoordinatesOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetCoordinatesOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getCoordinatesOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetCountiesObservableOptions CORS support +*/ +func (a *Client) GetCountiesObservableOptions(params *GetCountiesObservableOptionsParams) (*GetCountiesObservableOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetCountiesObservableOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getCountiesObservableOptions", + Method: "OPTIONS", + PathPattern: "/counties/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetCountiesObservableOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetCountiesObservableOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getCountiesObservableOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetCountiesOptions CORS support +*/ +func (a *Client) GetCountiesOptions(params *GetCountiesOptionsParams) (*GetCountiesOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetCountiesOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getCountiesOptions", + Method: "OPTIONS", + PathPattern: "/counties", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetCountiesOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetCountiesOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getCountiesOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetCountriesObservableOptions CORS support +*/ +func (a *Client) GetCountriesObservableOptions(params *GetCountriesObservableOptionsParams) (*GetCountriesObservableOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetCountriesObservableOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getCountriesObservableOptions", + Method: "OPTIONS", + PathPattern: "/countries/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetCountriesObservableOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetCountriesObservableOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getCountriesObservableOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetCountriesOptions CORS support +*/ +func (a *Client) GetCountriesOptions(params *GetCountriesOptionsParams) (*GetCountriesOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetCountriesOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getCountriesOptions", + Method: "OPTIONS", + PathPattern: "/countries", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetCountriesOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetCountriesOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getCountriesOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetDomainsObservableOptions CORS support +*/ +func (a *Client) GetDomainsObservableOptions(params *GetDomainsObservableOptionsParams) (*GetDomainsObservableOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetDomainsObservableOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getDomainsObservableOptions", + Method: "OPTIONS", + PathPattern: "/domains/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetDomainsObservableOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetDomainsObservableOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getDomainsObservableOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetDomainsOptions CORS support +*/ +func (a *Client) GetDomainsOptions(params *GetDomainsOptionsParams) (*GetDomainsOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetDomainsOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getDomainsOptions", + Method: "OPTIONS", + PathPattern: "/domains", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetDomainsOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetDomainsOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getDomainsOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetPlacesObservableOptions CORS support +*/ +func (a *Client) GetPlacesObservableOptions(params *GetPlacesObservableOptionsParams) (*GetPlacesObservableOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetPlacesObservableOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getPlacesObservableOptions", + Method: "OPTIONS", + PathPattern: "/places/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetPlacesObservableOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetPlacesObservableOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getPlacesObservableOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetPlacesOptions CORS support +*/ +func (a *Client) GetPlacesOptions(params *GetPlacesOptionsParams) (*GetPlacesOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetPlacesOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getPlacesOptions", + Method: "OPTIONS", + PathPattern: "/places", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetPlacesOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetPlacesOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getPlacesOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetStatesObservableOptions CORS support +*/ +func (a *Client) GetStatesObservableOptions(params *GetStatesObservableOptionsParams) (*GetStatesObservableOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetStatesObservableOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getStatesObservableOptions", + Method: "OPTIONS", + PathPattern: "/states/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetStatesObservableOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetStatesObservableOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getStatesObservableOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetStatesOptions CORS support +*/ +func (a *Client) GetStatesOptions(params *GetStatesOptionsParams) (*GetStatesOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetStatesOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getStatesOptions", + Method: "OPTIONS", + PathPattern: "/states", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetStatesOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetStatesOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getStatesOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetTaxRateObservableOptions CORS support +*/ +func (a *Client) GetTaxRateObservableOptions(params *GetTaxRateObservableOptionsParams) (*GetTaxRateObservableOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetTaxRateObservableOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getTaxRateObservableOptions", + Method: "OPTIONS", + PathPattern: "/taxrates/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetTaxRateObservableOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetTaxRateObservableOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getTaxRateObservableOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetTaxRatesOptions CORS support +*/ +func (a *Client) GetTaxRatesOptions(params *GetTaxRatesOptionsParams) (*GetTaxRatesOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetTaxRatesOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getTaxRatesOptions", + Method: "OPTIONS", + PathPattern: "/taxrates", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetTaxRatesOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetTaxRatesOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getTaxRatesOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetTaxTypeObservableOptions CORS support +*/ +func (a *Client) GetTaxTypeObservableOptions(params *GetTaxTypeObservableOptionsParams) (*GetTaxTypeObservableOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetTaxTypeObservableOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getTaxTypeObservableOptions", + Method: "OPTIONS", + PathPattern: "/taxtypes/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetTaxTypeObservableOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetTaxTypeObservableOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getTaxTypeObservableOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetTaxTypesOptions CORS support +*/ +func (a *Client) GetTaxTypesOptions(params *GetTaxTypesOptionsParams) (*GetTaxTypesOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetTaxTypesOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getTaxTypesOptions", + Method: "OPTIONS", + PathPattern: "/taxtypes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetTaxTypesOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetTaxTypesOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getTaxTypesOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetTaxnexusCodesObservableOptions CORS support +*/ +func (a *Client) GetTaxnexusCodesObservableOptions(params *GetTaxnexusCodesObservableOptionsParams) (*GetTaxnexusCodesObservableOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetTaxnexusCodesObservableOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getTaxnexusCodesObservableOptions", + Method: "OPTIONS", + PathPattern: "/taxnexuscodes/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetTaxnexusCodesObservableOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetTaxnexusCodesObservableOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getTaxnexusCodesObservableOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetTaxnexusCodesOptions CORS support +*/ +func (a *Client) GetTaxnexusCodesOptions(params *GetTaxnexusCodesOptionsParams) (*GetTaxnexusCodesOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetTaxnexusCodesOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getTaxnexusCodesOptions", + Method: "OPTIONS", + PathPattern: "/taxnexuscodes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetTaxnexusCodesOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetTaxnexusCodesOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getTaxnexusCodesOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_coordinates_observable_options_parameters.go b/api/geo/v0.0.1/geo_client/cors/get_coordinates_observable_options_parameters.go new file mode 100644 index 0000000..7613aaf --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_coordinates_observable_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetCoordinatesObservableOptionsParams creates a new GetCoordinatesObservableOptionsParams object +// with the default values initialized. +func NewGetCoordinatesObservableOptionsParams() *GetCoordinatesObservableOptionsParams { + + return &GetCoordinatesObservableOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetCoordinatesObservableOptionsParamsWithTimeout creates a new GetCoordinatesObservableOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetCoordinatesObservableOptionsParamsWithTimeout(timeout time.Duration) *GetCoordinatesObservableOptionsParams { + + return &GetCoordinatesObservableOptionsParams{ + + timeout: timeout, + } +} + +// NewGetCoordinatesObservableOptionsParamsWithContext creates a new GetCoordinatesObservableOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetCoordinatesObservableOptionsParamsWithContext(ctx context.Context) *GetCoordinatesObservableOptionsParams { + + return &GetCoordinatesObservableOptionsParams{ + + Context: ctx, + } +} + +// NewGetCoordinatesObservableOptionsParamsWithHTTPClient creates a new GetCoordinatesObservableOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetCoordinatesObservableOptionsParamsWithHTTPClient(client *http.Client) *GetCoordinatesObservableOptionsParams { + + return &GetCoordinatesObservableOptionsParams{ + HTTPClient: client, + } +} + +/*GetCoordinatesObservableOptionsParams contains all the parameters to send to the API endpoint +for the get coordinates observable options operation typically these are written to a http.Request +*/ +type GetCoordinatesObservableOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get coordinates observable options params +func (o *GetCoordinatesObservableOptionsParams) WithTimeout(timeout time.Duration) *GetCoordinatesObservableOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get coordinates observable options params +func (o *GetCoordinatesObservableOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get coordinates observable options params +func (o *GetCoordinatesObservableOptionsParams) WithContext(ctx context.Context) *GetCoordinatesObservableOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get coordinates observable options params +func (o *GetCoordinatesObservableOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get coordinates observable options params +func (o *GetCoordinatesObservableOptionsParams) WithHTTPClient(client *http.Client) *GetCoordinatesObservableOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get coordinates observable options params +func (o *GetCoordinatesObservableOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *GetCoordinatesObservableOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_coordinates_observable_options_responses.go b/api/geo/v0.0.1/geo_client/cors/get_coordinates_observable_options_responses.go new file mode 100644 index 0000000..d063e17 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_coordinates_observable_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// GetCoordinatesObservableOptionsReader is a Reader for the GetCoordinatesObservableOptions structure. +type GetCoordinatesObservableOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetCoordinatesObservableOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetCoordinatesObservableOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetCoordinatesObservableOptionsOK creates a GetCoordinatesObservableOptionsOK with default headers values +func NewGetCoordinatesObservableOptionsOK() *GetCoordinatesObservableOptionsOK { + return &GetCoordinatesObservableOptionsOK{} +} + +/*GetCoordinatesObservableOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type GetCoordinatesObservableOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *GetCoordinatesObservableOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /coordinates/observable][%d] getCoordinatesObservableOptionsOK ", 200) +} + +func (o *GetCoordinatesObservableOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_coordinates_options_parameters.go b/api/geo/v0.0.1/geo_client/cors/get_coordinates_options_parameters.go new file mode 100644 index 0000000..7e97d5d --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_coordinates_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetCoordinatesOptionsParams creates a new GetCoordinatesOptionsParams object +// with the default values initialized. +func NewGetCoordinatesOptionsParams() *GetCoordinatesOptionsParams { + + return &GetCoordinatesOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetCoordinatesOptionsParamsWithTimeout creates a new GetCoordinatesOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetCoordinatesOptionsParamsWithTimeout(timeout time.Duration) *GetCoordinatesOptionsParams { + + return &GetCoordinatesOptionsParams{ + + timeout: timeout, + } +} + +// NewGetCoordinatesOptionsParamsWithContext creates a new GetCoordinatesOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetCoordinatesOptionsParamsWithContext(ctx context.Context) *GetCoordinatesOptionsParams { + + return &GetCoordinatesOptionsParams{ + + Context: ctx, + } +} + +// NewGetCoordinatesOptionsParamsWithHTTPClient creates a new GetCoordinatesOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetCoordinatesOptionsParamsWithHTTPClient(client *http.Client) *GetCoordinatesOptionsParams { + + return &GetCoordinatesOptionsParams{ + HTTPClient: client, + } +} + +/*GetCoordinatesOptionsParams contains all the parameters to send to the API endpoint +for the get coordinates options operation typically these are written to a http.Request +*/ +type GetCoordinatesOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get coordinates options params +func (o *GetCoordinatesOptionsParams) WithTimeout(timeout time.Duration) *GetCoordinatesOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get coordinates options params +func (o *GetCoordinatesOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get coordinates options params +func (o *GetCoordinatesOptionsParams) WithContext(ctx context.Context) *GetCoordinatesOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get coordinates options params +func (o *GetCoordinatesOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get coordinates options params +func (o *GetCoordinatesOptionsParams) WithHTTPClient(client *http.Client) *GetCoordinatesOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get coordinates options params +func (o *GetCoordinatesOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *GetCoordinatesOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_coordinates_options_responses.go b/api/geo/v0.0.1/geo_client/cors/get_coordinates_options_responses.go new file mode 100644 index 0000000..afb4dc7 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_coordinates_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// GetCoordinatesOptionsReader is a Reader for the GetCoordinatesOptions structure. +type GetCoordinatesOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetCoordinatesOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetCoordinatesOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetCoordinatesOptionsOK creates a GetCoordinatesOptionsOK with default headers values +func NewGetCoordinatesOptionsOK() *GetCoordinatesOptionsOK { + return &GetCoordinatesOptionsOK{} +} + +/*GetCoordinatesOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type GetCoordinatesOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *GetCoordinatesOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /coordinates][%d] getCoordinatesOptionsOK ", 200) +} + +func (o *GetCoordinatesOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_counties_observable_options_parameters.go b/api/geo/v0.0.1/geo_client/cors/get_counties_observable_options_parameters.go new file mode 100644 index 0000000..800c444 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_counties_observable_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetCountiesObservableOptionsParams creates a new GetCountiesObservableOptionsParams object +// with the default values initialized. +func NewGetCountiesObservableOptionsParams() *GetCountiesObservableOptionsParams { + + return &GetCountiesObservableOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetCountiesObservableOptionsParamsWithTimeout creates a new GetCountiesObservableOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetCountiesObservableOptionsParamsWithTimeout(timeout time.Duration) *GetCountiesObservableOptionsParams { + + return &GetCountiesObservableOptionsParams{ + + timeout: timeout, + } +} + +// NewGetCountiesObservableOptionsParamsWithContext creates a new GetCountiesObservableOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetCountiesObservableOptionsParamsWithContext(ctx context.Context) *GetCountiesObservableOptionsParams { + + return &GetCountiesObservableOptionsParams{ + + Context: ctx, + } +} + +// NewGetCountiesObservableOptionsParamsWithHTTPClient creates a new GetCountiesObservableOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetCountiesObservableOptionsParamsWithHTTPClient(client *http.Client) *GetCountiesObservableOptionsParams { + + return &GetCountiesObservableOptionsParams{ + HTTPClient: client, + } +} + +/*GetCountiesObservableOptionsParams contains all the parameters to send to the API endpoint +for the get counties observable options operation typically these are written to a http.Request +*/ +type GetCountiesObservableOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get counties observable options params +func (o *GetCountiesObservableOptionsParams) WithTimeout(timeout time.Duration) *GetCountiesObservableOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get counties observable options params +func (o *GetCountiesObservableOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get counties observable options params +func (o *GetCountiesObservableOptionsParams) WithContext(ctx context.Context) *GetCountiesObservableOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get counties observable options params +func (o *GetCountiesObservableOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get counties observable options params +func (o *GetCountiesObservableOptionsParams) WithHTTPClient(client *http.Client) *GetCountiesObservableOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get counties observable options params +func (o *GetCountiesObservableOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *GetCountiesObservableOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_counties_observable_options_responses.go b/api/geo/v0.0.1/geo_client/cors/get_counties_observable_options_responses.go new file mode 100644 index 0000000..8e08c61 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_counties_observable_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// GetCountiesObservableOptionsReader is a Reader for the GetCountiesObservableOptions structure. +type GetCountiesObservableOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetCountiesObservableOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetCountiesObservableOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetCountiesObservableOptionsOK creates a GetCountiesObservableOptionsOK with default headers values +func NewGetCountiesObservableOptionsOK() *GetCountiesObservableOptionsOK { + return &GetCountiesObservableOptionsOK{} +} + +/*GetCountiesObservableOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type GetCountiesObservableOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *GetCountiesObservableOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /counties/observable][%d] getCountiesObservableOptionsOK ", 200) +} + +func (o *GetCountiesObservableOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_counties_options_parameters.go b/api/geo/v0.0.1/geo_client/cors/get_counties_options_parameters.go new file mode 100644 index 0000000..faa6072 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_counties_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetCountiesOptionsParams creates a new GetCountiesOptionsParams object +// with the default values initialized. +func NewGetCountiesOptionsParams() *GetCountiesOptionsParams { + + return &GetCountiesOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetCountiesOptionsParamsWithTimeout creates a new GetCountiesOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetCountiesOptionsParamsWithTimeout(timeout time.Duration) *GetCountiesOptionsParams { + + return &GetCountiesOptionsParams{ + + timeout: timeout, + } +} + +// NewGetCountiesOptionsParamsWithContext creates a new GetCountiesOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetCountiesOptionsParamsWithContext(ctx context.Context) *GetCountiesOptionsParams { + + return &GetCountiesOptionsParams{ + + Context: ctx, + } +} + +// NewGetCountiesOptionsParamsWithHTTPClient creates a new GetCountiesOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetCountiesOptionsParamsWithHTTPClient(client *http.Client) *GetCountiesOptionsParams { + + return &GetCountiesOptionsParams{ + HTTPClient: client, + } +} + +/*GetCountiesOptionsParams contains all the parameters to send to the API endpoint +for the get counties options operation typically these are written to a http.Request +*/ +type GetCountiesOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get counties options params +func (o *GetCountiesOptionsParams) WithTimeout(timeout time.Duration) *GetCountiesOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get counties options params +func (o *GetCountiesOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get counties options params +func (o *GetCountiesOptionsParams) WithContext(ctx context.Context) *GetCountiesOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get counties options params +func (o *GetCountiesOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get counties options params +func (o *GetCountiesOptionsParams) WithHTTPClient(client *http.Client) *GetCountiesOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get counties options params +func (o *GetCountiesOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *GetCountiesOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_counties_options_responses.go b/api/geo/v0.0.1/geo_client/cors/get_counties_options_responses.go new file mode 100644 index 0000000..48ac60c --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_counties_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// GetCountiesOptionsReader is a Reader for the GetCountiesOptions structure. +type GetCountiesOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetCountiesOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetCountiesOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetCountiesOptionsOK creates a GetCountiesOptionsOK with default headers values +func NewGetCountiesOptionsOK() *GetCountiesOptionsOK { + return &GetCountiesOptionsOK{} +} + +/*GetCountiesOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type GetCountiesOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *GetCountiesOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /counties][%d] getCountiesOptionsOK ", 200) +} + +func (o *GetCountiesOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_countries_observable_options_parameters.go b/api/geo/v0.0.1/geo_client/cors/get_countries_observable_options_parameters.go new file mode 100644 index 0000000..da77e0c --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_countries_observable_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetCountriesObservableOptionsParams creates a new GetCountriesObservableOptionsParams object +// with the default values initialized. +func NewGetCountriesObservableOptionsParams() *GetCountriesObservableOptionsParams { + + return &GetCountriesObservableOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetCountriesObservableOptionsParamsWithTimeout creates a new GetCountriesObservableOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetCountriesObservableOptionsParamsWithTimeout(timeout time.Duration) *GetCountriesObservableOptionsParams { + + return &GetCountriesObservableOptionsParams{ + + timeout: timeout, + } +} + +// NewGetCountriesObservableOptionsParamsWithContext creates a new GetCountriesObservableOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetCountriesObservableOptionsParamsWithContext(ctx context.Context) *GetCountriesObservableOptionsParams { + + return &GetCountriesObservableOptionsParams{ + + Context: ctx, + } +} + +// NewGetCountriesObservableOptionsParamsWithHTTPClient creates a new GetCountriesObservableOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetCountriesObservableOptionsParamsWithHTTPClient(client *http.Client) *GetCountriesObservableOptionsParams { + + return &GetCountriesObservableOptionsParams{ + HTTPClient: client, + } +} + +/*GetCountriesObservableOptionsParams contains all the parameters to send to the API endpoint +for the get countries observable options operation typically these are written to a http.Request +*/ +type GetCountriesObservableOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get countries observable options params +func (o *GetCountriesObservableOptionsParams) WithTimeout(timeout time.Duration) *GetCountriesObservableOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get countries observable options params +func (o *GetCountriesObservableOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get countries observable options params +func (o *GetCountriesObservableOptionsParams) WithContext(ctx context.Context) *GetCountriesObservableOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get countries observable options params +func (o *GetCountriesObservableOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get countries observable options params +func (o *GetCountriesObservableOptionsParams) WithHTTPClient(client *http.Client) *GetCountriesObservableOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get countries observable options params +func (o *GetCountriesObservableOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *GetCountriesObservableOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_countries_observable_options_responses.go b/api/geo/v0.0.1/geo_client/cors/get_countries_observable_options_responses.go new file mode 100644 index 0000000..0703a40 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_countries_observable_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// GetCountriesObservableOptionsReader is a Reader for the GetCountriesObservableOptions structure. +type GetCountriesObservableOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetCountriesObservableOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetCountriesObservableOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetCountriesObservableOptionsOK creates a GetCountriesObservableOptionsOK with default headers values +func NewGetCountriesObservableOptionsOK() *GetCountriesObservableOptionsOK { + return &GetCountriesObservableOptionsOK{} +} + +/*GetCountriesObservableOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type GetCountriesObservableOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *GetCountriesObservableOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /countries/observable][%d] getCountriesObservableOptionsOK ", 200) +} + +func (o *GetCountriesObservableOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_countries_options_parameters.go b/api/geo/v0.0.1/geo_client/cors/get_countries_options_parameters.go new file mode 100644 index 0000000..5451a90 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_countries_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetCountriesOptionsParams creates a new GetCountriesOptionsParams object +// with the default values initialized. +func NewGetCountriesOptionsParams() *GetCountriesOptionsParams { + + return &GetCountriesOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetCountriesOptionsParamsWithTimeout creates a new GetCountriesOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetCountriesOptionsParamsWithTimeout(timeout time.Duration) *GetCountriesOptionsParams { + + return &GetCountriesOptionsParams{ + + timeout: timeout, + } +} + +// NewGetCountriesOptionsParamsWithContext creates a new GetCountriesOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetCountriesOptionsParamsWithContext(ctx context.Context) *GetCountriesOptionsParams { + + return &GetCountriesOptionsParams{ + + Context: ctx, + } +} + +// NewGetCountriesOptionsParamsWithHTTPClient creates a new GetCountriesOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetCountriesOptionsParamsWithHTTPClient(client *http.Client) *GetCountriesOptionsParams { + + return &GetCountriesOptionsParams{ + HTTPClient: client, + } +} + +/*GetCountriesOptionsParams contains all the parameters to send to the API endpoint +for the get countries options operation typically these are written to a http.Request +*/ +type GetCountriesOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get countries options params +func (o *GetCountriesOptionsParams) WithTimeout(timeout time.Duration) *GetCountriesOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get countries options params +func (o *GetCountriesOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get countries options params +func (o *GetCountriesOptionsParams) WithContext(ctx context.Context) *GetCountriesOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get countries options params +func (o *GetCountriesOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get countries options params +func (o *GetCountriesOptionsParams) WithHTTPClient(client *http.Client) *GetCountriesOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get countries options params +func (o *GetCountriesOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *GetCountriesOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_countries_options_responses.go b/api/geo/v0.0.1/geo_client/cors/get_countries_options_responses.go new file mode 100644 index 0000000..0bc630f --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_countries_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// GetCountriesOptionsReader is a Reader for the GetCountriesOptions structure. +type GetCountriesOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetCountriesOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetCountriesOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetCountriesOptionsOK creates a GetCountriesOptionsOK with default headers values +func NewGetCountriesOptionsOK() *GetCountriesOptionsOK { + return &GetCountriesOptionsOK{} +} + +/*GetCountriesOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type GetCountriesOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *GetCountriesOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /countries][%d] getCountriesOptionsOK ", 200) +} + +func (o *GetCountriesOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_domains_observable_options_parameters.go b/api/geo/v0.0.1/geo_client/cors/get_domains_observable_options_parameters.go new file mode 100644 index 0000000..b3e139a --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_domains_observable_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetDomainsObservableOptionsParams creates a new GetDomainsObservableOptionsParams object +// with the default values initialized. +func NewGetDomainsObservableOptionsParams() *GetDomainsObservableOptionsParams { + + return &GetDomainsObservableOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetDomainsObservableOptionsParamsWithTimeout creates a new GetDomainsObservableOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetDomainsObservableOptionsParamsWithTimeout(timeout time.Duration) *GetDomainsObservableOptionsParams { + + return &GetDomainsObservableOptionsParams{ + + timeout: timeout, + } +} + +// NewGetDomainsObservableOptionsParamsWithContext creates a new GetDomainsObservableOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetDomainsObservableOptionsParamsWithContext(ctx context.Context) *GetDomainsObservableOptionsParams { + + return &GetDomainsObservableOptionsParams{ + + Context: ctx, + } +} + +// NewGetDomainsObservableOptionsParamsWithHTTPClient creates a new GetDomainsObservableOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetDomainsObservableOptionsParamsWithHTTPClient(client *http.Client) *GetDomainsObservableOptionsParams { + + return &GetDomainsObservableOptionsParams{ + HTTPClient: client, + } +} + +/*GetDomainsObservableOptionsParams contains all the parameters to send to the API endpoint +for the get domains observable options operation typically these are written to a http.Request +*/ +type GetDomainsObservableOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get domains observable options params +func (o *GetDomainsObservableOptionsParams) WithTimeout(timeout time.Duration) *GetDomainsObservableOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get domains observable options params +func (o *GetDomainsObservableOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get domains observable options params +func (o *GetDomainsObservableOptionsParams) WithContext(ctx context.Context) *GetDomainsObservableOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get domains observable options params +func (o *GetDomainsObservableOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get domains observable options params +func (o *GetDomainsObservableOptionsParams) WithHTTPClient(client *http.Client) *GetDomainsObservableOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get domains observable options params +func (o *GetDomainsObservableOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *GetDomainsObservableOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_domains_observable_options_responses.go b/api/geo/v0.0.1/geo_client/cors/get_domains_observable_options_responses.go new file mode 100644 index 0000000..25fdf87 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_domains_observable_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// GetDomainsObservableOptionsReader is a Reader for the GetDomainsObservableOptions structure. +type GetDomainsObservableOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetDomainsObservableOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetDomainsObservableOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetDomainsObservableOptionsOK creates a GetDomainsObservableOptionsOK with default headers values +func NewGetDomainsObservableOptionsOK() *GetDomainsObservableOptionsOK { + return &GetDomainsObservableOptionsOK{} +} + +/*GetDomainsObservableOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type GetDomainsObservableOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *GetDomainsObservableOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /domains/observable][%d] getDomainsObservableOptionsOK ", 200) +} + +func (o *GetDomainsObservableOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_domains_options_parameters.go b/api/geo/v0.0.1/geo_client/cors/get_domains_options_parameters.go new file mode 100644 index 0000000..a30132b --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_domains_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetDomainsOptionsParams creates a new GetDomainsOptionsParams object +// with the default values initialized. +func NewGetDomainsOptionsParams() *GetDomainsOptionsParams { + + return &GetDomainsOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetDomainsOptionsParamsWithTimeout creates a new GetDomainsOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetDomainsOptionsParamsWithTimeout(timeout time.Duration) *GetDomainsOptionsParams { + + return &GetDomainsOptionsParams{ + + timeout: timeout, + } +} + +// NewGetDomainsOptionsParamsWithContext creates a new GetDomainsOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetDomainsOptionsParamsWithContext(ctx context.Context) *GetDomainsOptionsParams { + + return &GetDomainsOptionsParams{ + + Context: ctx, + } +} + +// NewGetDomainsOptionsParamsWithHTTPClient creates a new GetDomainsOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetDomainsOptionsParamsWithHTTPClient(client *http.Client) *GetDomainsOptionsParams { + + return &GetDomainsOptionsParams{ + HTTPClient: client, + } +} + +/*GetDomainsOptionsParams contains all the parameters to send to the API endpoint +for the get domains options operation typically these are written to a http.Request +*/ +type GetDomainsOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get domains options params +func (o *GetDomainsOptionsParams) WithTimeout(timeout time.Duration) *GetDomainsOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get domains options params +func (o *GetDomainsOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get domains options params +func (o *GetDomainsOptionsParams) WithContext(ctx context.Context) *GetDomainsOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get domains options params +func (o *GetDomainsOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get domains options params +func (o *GetDomainsOptionsParams) WithHTTPClient(client *http.Client) *GetDomainsOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get domains options params +func (o *GetDomainsOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *GetDomainsOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_domains_options_responses.go b/api/geo/v0.0.1/geo_client/cors/get_domains_options_responses.go new file mode 100644 index 0000000..93fb3fe --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_domains_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// GetDomainsOptionsReader is a Reader for the GetDomainsOptions structure. +type GetDomainsOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetDomainsOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetDomainsOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetDomainsOptionsOK creates a GetDomainsOptionsOK with default headers values +func NewGetDomainsOptionsOK() *GetDomainsOptionsOK { + return &GetDomainsOptionsOK{} +} + +/*GetDomainsOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type GetDomainsOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *GetDomainsOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /domains][%d] getDomainsOptionsOK ", 200) +} + +func (o *GetDomainsOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_places_observable_options_parameters.go b/api/geo/v0.0.1/geo_client/cors/get_places_observable_options_parameters.go new file mode 100644 index 0000000..7e99b51 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_places_observable_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetPlacesObservableOptionsParams creates a new GetPlacesObservableOptionsParams object +// with the default values initialized. +func NewGetPlacesObservableOptionsParams() *GetPlacesObservableOptionsParams { + + return &GetPlacesObservableOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetPlacesObservableOptionsParamsWithTimeout creates a new GetPlacesObservableOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetPlacesObservableOptionsParamsWithTimeout(timeout time.Duration) *GetPlacesObservableOptionsParams { + + return &GetPlacesObservableOptionsParams{ + + timeout: timeout, + } +} + +// NewGetPlacesObservableOptionsParamsWithContext creates a new GetPlacesObservableOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetPlacesObservableOptionsParamsWithContext(ctx context.Context) *GetPlacesObservableOptionsParams { + + return &GetPlacesObservableOptionsParams{ + + Context: ctx, + } +} + +// NewGetPlacesObservableOptionsParamsWithHTTPClient creates a new GetPlacesObservableOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetPlacesObservableOptionsParamsWithHTTPClient(client *http.Client) *GetPlacesObservableOptionsParams { + + return &GetPlacesObservableOptionsParams{ + HTTPClient: client, + } +} + +/*GetPlacesObservableOptionsParams contains all the parameters to send to the API endpoint +for the get places observable options operation typically these are written to a http.Request +*/ +type GetPlacesObservableOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get places observable options params +func (o *GetPlacesObservableOptionsParams) WithTimeout(timeout time.Duration) *GetPlacesObservableOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get places observable options params +func (o *GetPlacesObservableOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get places observable options params +func (o *GetPlacesObservableOptionsParams) WithContext(ctx context.Context) *GetPlacesObservableOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get places observable options params +func (o *GetPlacesObservableOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get places observable options params +func (o *GetPlacesObservableOptionsParams) WithHTTPClient(client *http.Client) *GetPlacesObservableOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get places observable options params +func (o *GetPlacesObservableOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *GetPlacesObservableOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_places_observable_options_responses.go b/api/geo/v0.0.1/geo_client/cors/get_places_observable_options_responses.go new file mode 100644 index 0000000..bf75116 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_places_observable_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// GetPlacesObservableOptionsReader is a Reader for the GetPlacesObservableOptions structure. +type GetPlacesObservableOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetPlacesObservableOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetPlacesObservableOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetPlacesObservableOptionsOK creates a GetPlacesObservableOptionsOK with default headers values +func NewGetPlacesObservableOptionsOK() *GetPlacesObservableOptionsOK { + return &GetPlacesObservableOptionsOK{} +} + +/*GetPlacesObservableOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type GetPlacesObservableOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *GetPlacesObservableOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /places/observable][%d] getPlacesObservableOptionsOK ", 200) +} + +func (o *GetPlacesObservableOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_places_options_parameters.go b/api/geo/v0.0.1/geo_client/cors/get_places_options_parameters.go new file mode 100644 index 0000000..647f1a4 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_places_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetPlacesOptionsParams creates a new GetPlacesOptionsParams object +// with the default values initialized. +func NewGetPlacesOptionsParams() *GetPlacesOptionsParams { + + return &GetPlacesOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetPlacesOptionsParamsWithTimeout creates a new GetPlacesOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetPlacesOptionsParamsWithTimeout(timeout time.Duration) *GetPlacesOptionsParams { + + return &GetPlacesOptionsParams{ + + timeout: timeout, + } +} + +// NewGetPlacesOptionsParamsWithContext creates a new GetPlacesOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetPlacesOptionsParamsWithContext(ctx context.Context) *GetPlacesOptionsParams { + + return &GetPlacesOptionsParams{ + + Context: ctx, + } +} + +// NewGetPlacesOptionsParamsWithHTTPClient creates a new GetPlacesOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetPlacesOptionsParamsWithHTTPClient(client *http.Client) *GetPlacesOptionsParams { + + return &GetPlacesOptionsParams{ + HTTPClient: client, + } +} + +/*GetPlacesOptionsParams contains all the parameters to send to the API endpoint +for the get places options operation typically these are written to a http.Request +*/ +type GetPlacesOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get places options params +func (o *GetPlacesOptionsParams) WithTimeout(timeout time.Duration) *GetPlacesOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get places options params +func (o *GetPlacesOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get places options params +func (o *GetPlacesOptionsParams) WithContext(ctx context.Context) *GetPlacesOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get places options params +func (o *GetPlacesOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get places options params +func (o *GetPlacesOptionsParams) WithHTTPClient(client *http.Client) *GetPlacesOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get places options params +func (o *GetPlacesOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *GetPlacesOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_places_options_responses.go b/api/geo/v0.0.1/geo_client/cors/get_places_options_responses.go new file mode 100644 index 0000000..2553d55 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_places_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// GetPlacesOptionsReader is a Reader for the GetPlacesOptions structure. +type GetPlacesOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetPlacesOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetPlacesOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetPlacesOptionsOK creates a GetPlacesOptionsOK with default headers values +func NewGetPlacesOptionsOK() *GetPlacesOptionsOK { + return &GetPlacesOptionsOK{} +} + +/*GetPlacesOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type GetPlacesOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *GetPlacesOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /places][%d] getPlacesOptionsOK ", 200) +} + +func (o *GetPlacesOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_states_observable_options_parameters.go b/api/geo/v0.0.1/geo_client/cors/get_states_observable_options_parameters.go new file mode 100644 index 0000000..38a8d65 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_states_observable_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetStatesObservableOptionsParams creates a new GetStatesObservableOptionsParams object +// with the default values initialized. +func NewGetStatesObservableOptionsParams() *GetStatesObservableOptionsParams { + + return &GetStatesObservableOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetStatesObservableOptionsParamsWithTimeout creates a new GetStatesObservableOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetStatesObservableOptionsParamsWithTimeout(timeout time.Duration) *GetStatesObservableOptionsParams { + + return &GetStatesObservableOptionsParams{ + + timeout: timeout, + } +} + +// NewGetStatesObservableOptionsParamsWithContext creates a new GetStatesObservableOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetStatesObservableOptionsParamsWithContext(ctx context.Context) *GetStatesObservableOptionsParams { + + return &GetStatesObservableOptionsParams{ + + Context: ctx, + } +} + +// NewGetStatesObservableOptionsParamsWithHTTPClient creates a new GetStatesObservableOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetStatesObservableOptionsParamsWithHTTPClient(client *http.Client) *GetStatesObservableOptionsParams { + + return &GetStatesObservableOptionsParams{ + HTTPClient: client, + } +} + +/*GetStatesObservableOptionsParams contains all the parameters to send to the API endpoint +for the get states observable options operation typically these are written to a http.Request +*/ +type GetStatesObservableOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get states observable options params +func (o *GetStatesObservableOptionsParams) WithTimeout(timeout time.Duration) *GetStatesObservableOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get states observable options params +func (o *GetStatesObservableOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get states observable options params +func (o *GetStatesObservableOptionsParams) WithContext(ctx context.Context) *GetStatesObservableOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get states observable options params +func (o *GetStatesObservableOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get states observable options params +func (o *GetStatesObservableOptionsParams) WithHTTPClient(client *http.Client) *GetStatesObservableOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get states observable options params +func (o *GetStatesObservableOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *GetStatesObservableOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_states_observable_options_responses.go b/api/geo/v0.0.1/geo_client/cors/get_states_observable_options_responses.go new file mode 100644 index 0000000..a49dbec --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_states_observable_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// GetStatesObservableOptionsReader is a Reader for the GetStatesObservableOptions structure. +type GetStatesObservableOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetStatesObservableOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetStatesObservableOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetStatesObservableOptionsOK creates a GetStatesObservableOptionsOK with default headers values +func NewGetStatesObservableOptionsOK() *GetStatesObservableOptionsOK { + return &GetStatesObservableOptionsOK{} +} + +/*GetStatesObservableOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type GetStatesObservableOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *GetStatesObservableOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /states/observable][%d] getStatesObservableOptionsOK ", 200) +} + +func (o *GetStatesObservableOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_states_options_parameters.go b/api/geo/v0.0.1/geo_client/cors/get_states_options_parameters.go new file mode 100644 index 0000000..8a279d4 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_states_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetStatesOptionsParams creates a new GetStatesOptionsParams object +// with the default values initialized. +func NewGetStatesOptionsParams() *GetStatesOptionsParams { + + return &GetStatesOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetStatesOptionsParamsWithTimeout creates a new GetStatesOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetStatesOptionsParamsWithTimeout(timeout time.Duration) *GetStatesOptionsParams { + + return &GetStatesOptionsParams{ + + timeout: timeout, + } +} + +// NewGetStatesOptionsParamsWithContext creates a new GetStatesOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetStatesOptionsParamsWithContext(ctx context.Context) *GetStatesOptionsParams { + + return &GetStatesOptionsParams{ + + Context: ctx, + } +} + +// NewGetStatesOptionsParamsWithHTTPClient creates a new GetStatesOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetStatesOptionsParamsWithHTTPClient(client *http.Client) *GetStatesOptionsParams { + + return &GetStatesOptionsParams{ + HTTPClient: client, + } +} + +/*GetStatesOptionsParams contains all the parameters to send to the API endpoint +for the get states options operation typically these are written to a http.Request +*/ +type GetStatesOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get states options params +func (o *GetStatesOptionsParams) WithTimeout(timeout time.Duration) *GetStatesOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get states options params +func (o *GetStatesOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get states options params +func (o *GetStatesOptionsParams) WithContext(ctx context.Context) *GetStatesOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get states options params +func (o *GetStatesOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get states options params +func (o *GetStatesOptionsParams) WithHTTPClient(client *http.Client) *GetStatesOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get states options params +func (o *GetStatesOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *GetStatesOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_states_options_responses.go b/api/geo/v0.0.1/geo_client/cors/get_states_options_responses.go new file mode 100644 index 0000000..bae13a0 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_states_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// GetStatesOptionsReader is a Reader for the GetStatesOptions structure. +type GetStatesOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetStatesOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetStatesOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetStatesOptionsOK creates a GetStatesOptionsOK with default headers values +func NewGetStatesOptionsOK() *GetStatesOptionsOK { + return &GetStatesOptionsOK{} +} + +/*GetStatesOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type GetStatesOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *GetStatesOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /states][%d] getStatesOptionsOK ", 200) +} + +func (o *GetStatesOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_tax_rate_observable_options_parameters.go b/api/geo/v0.0.1/geo_client/cors/get_tax_rate_observable_options_parameters.go new file mode 100644 index 0000000..1f97df9 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_tax_rate_observable_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetTaxRateObservableOptionsParams creates a new GetTaxRateObservableOptionsParams object +// with the default values initialized. +func NewGetTaxRateObservableOptionsParams() *GetTaxRateObservableOptionsParams { + + return &GetTaxRateObservableOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetTaxRateObservableOptionsParamsWithTimeout creates a new GetTaxRateObservableOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetTaxRateObservableOptionsParamsWithTimeout(timeout time.Duration) *GetTaxRateObservableOptionsParams { + + return &GetTaxRateObservableOptionsParams{ + + timeout: timeout, + } +} + +// NewGetTaxRateObservableOptionsParamsWithContext creates a new GetTaxRateObservableOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetTaxRateObservableOptionsParamsWithContext(ctx context.Context) *GetTaxRateObservableOptionsParams { + + return &GetTaxRateObservableOptionsParams{ + + Context: ctx, + } +} + +// NewGetTaxRateObservableOptionsParamsWithHTTPClient creates a new GetTaxRateObservableOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetTaxRateObservableOptionsParamsWithHTTPClient(client *http.Client) *GetTaxRateObservableOptionsParams { + + return &GetTaxRateObservableOptionsParams{ + HTTPClient: client, + } +} + +/*GetTaxRateObservableOptionsParams contains all the parameters to send to the API endpoint +for the get tax rate observable options operation typically these are written to a http.Request +*/ +type GetTaxRateObservableOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get tax rate observable options params +func (o *GetTaxRateObservableOptionsParams) WithTimeout(timeout time.Duration) *GetTaxRateObservableOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get tax rate observable options params +func (o *GetTaxRateObservableOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get tax rate observable options params +func (o *GetTaxRateObservableOptionsParams) WithContext(ctx context.Context) *GetTaxRateObservableOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get tax rate observable options params +func (o *GetTaxRateObservableOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get tax rate observable options params +func (o *GetTaxRateObservableOptionsParams) WithHTTPClient(client *http.Client) *GetTaxRateObservableOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get tax rate observable options params +func (o *GetTaxRateObservableOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *GetTaxRateObservableOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_tax_rate_observable_options_responses.go b/api/geo/v0.0.1/geo_client/cors/get_tax_rate_observable_options_responses.go new file mode 100644 index 0000000..71e2b9c --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_tax_rate_observable_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// GetTaxRateObservableOptionsReader is a Reader for the GetTaxRateObservableOptions structure. +type GetTaxRateObservableOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetTaxRateObservableOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetTaxRateObservableOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetTaxRateObservableOptionsOK creates a GetTaxRateObservableOptionsOK with default headers values +func NewGetTaxRateObservableOptionsOK() *GetTaxRateObservableOptionsOK { + return &GetTaxRateObservableOptionsOK{} +} + +/*GetTaxRateObservableOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type GetTaxRateObservableOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *GetTaxRateObservableOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /taxrates/observable][%d] getTaxRateObservableOptionsOK ", 200) +} + +func (o *GetTaxRateObservableOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_tax_rates_options_parameters.go b/api/geo/v0.0.1/geo_client/cors/get_tax_rates_options_parameters.go new file mode 100644 index 0000000..187f84a --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_tax_rates_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetTaxRatesOptionsParams creates a new GetTaxRatesOptionsParams object +// with the default values initialized. +func NewGetTaxRatesOptionsParams() *GetTaxRatesOptionsParams { + + return &GetTaxRatesOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetTaxRatesOptionsParamsWithTimeout creates a new GetTaxRatesOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetTaxRatesOptionsParamsWithTimeout(timeout time.Duration) *GetTaxRatesOptionsParams { + + return &GetTaxRatesOptionsParams{ + + timeout: timeout, + } +} + +// NewGetTaxRatesOptionsParamsWithContext creates a new GetTaxRatesOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetTaxRatesOptionsParamsWithContext(ctx context.Context) *GetTaxRatesOptionsParams { + + return &GetTaxRatesOptionsParams{ + + Context: ctx, + } +} + +// NewGetTaxRatesOptionsParamsWithHTTPClient creates a new GetTaxRatesOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetTaxRatesOptionsParamsWithHTTPClient(client *http.Client) *GetTaxRatesOptionsParams { + + return &GetTaxRatesOptionsParams{ + HTTPClient: client, + } +} + +/*GetTaxRatesOptionsParams contains all the parameters to send to the API endpoint +for the get tax rates options operation typically these are written to a http.Request +*/ +type GetTaxRatesOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get tax rates options params +func (o *GetTaxRatesOptionsParams) WithTimeout(timeout time.Duration) *GetTaxRatesOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get tax rates options params +func (o *GetTaxRatesOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get tax rates options params +func (o *GetTaxRatesOptionsParams) WithContext(ctx context.Context) *GetTaxRatesOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get tax rates options params +func (o *GetTaxRatesOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get tax rates options params +func (o *GetTaxRatesOptionsParams) WithHTTPClient(client *http.Client) *GetTaxRatesOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get tax rates options params +func (o *GetTaxRatesOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *GetTaxRatesOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_tax_rates_options_responses.go b/api/geo/v0.0.1/geo_client/cors/get_tax_rates_options_responses.go new file mode 100644 index 0000000..29b73fc --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_tax_rates_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// GetTaxRatesOptionsReader is a Reader for the GetTaxRatesOptions structure. +type GetTaxRatesOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetTaxRatesOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetTaxRatesOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetTaxRatesOptionsOK creates a GetTaxRatesOptionsOK with default headers values +func NewGetTaxRatesOptionsOK() *GetTaxRatesOptionsOK { + return &GetTaxRatesOptionsOK{} +} + +/*GetTaxRatesOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type GetTaxRatesOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *GetTaxRatesOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /taxrates][%d] getTaxRatesOptionsOK ", 200) +} + +func (o *GetTaxRatesOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_tax_type_observable_options_parameters.go b/api/geo/v0.0.1/geo_client/cors/get_tax_type_observable_options_parameters.go new file mode 100644 index 0000000..fa9f38b --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_tax_type_observable_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetTaxTypeObservableOptionsParams creates a new GetTaxTypeObservableOptionsParams object +// with the default values initialized. +func NewGetTaxTypeObservableOptionsParams() *GetTaxTypeObservableOptionsParams { + + return &GetTaxTypeObservableOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetTaxTypeObservableOptionsParamsWithTimeout creates a new GetTaxTypeObservableOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetTaxTypeObservableOptionsParamsWithTimeout(timeout time.Duration) *GetTaxTypeObservableOptionsParams { + + return &GetTaxTypeObservableOptionsParams{ + + timeout: timeout, + } +} + +// NewGetTaxTypeObservableOptionsParamsWithContext creates a new GetTaxTypeObservableOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetTaxTypeObservableOptionsParamsWithContext(ctx context.Context) *GetTaxTypeObservableOptionsParams { + + return &GetTaxTypeObservableOptionsParams{ + + Context: ctx, + } +} + +// NewGetTaxTypeObservableOptionsParamsWithHTTPClient creates a new GetTaxTypeObservableOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetTaxTypeObservableOptionsParamsWithHTTPClient(client *http.Client) *GetTaxTypeObservableOptionsParams { + + return &GetTaxTypeObservableOptionsParams{ + HTTPClient: client, + } +} + +/*GetTaxTypeObservableOptionsParams contains all the parameters to send to the API endpoint +for the get tax type observable options operation typically these are written to a http.Request +*/ +type GetTaxTypeObservableOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get tax type observable options params +func (o *GetTaxTypeObservableOptionsParams) WithTimeout(timeout time.Duration) *GetTaxTypeObservableOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get tax type observable options params +func (o *GetTaxTypeObservableOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get tax type observable options params +func (o *GetTaxTypeObservableOptionsParams) WithContext(ctx context.Context) *GetTaxTypeObservableOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get tax type observable options params +func (o *GetTaxTypeObservableOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get tax type observable options params +func (o *GetTaxTypeObservableOptionsParams) WithHTTPClient(client *http.Client) *GetTaxTypeObservableOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get tax type observable options params +func (o *GetTaxTypeObservableOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *GetTaxTypeObservableOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_tax_type_observable_options_responses.go b/api/geo/v0.0.1/geo_client/cors/get_tax_type_observable_options_responses.go new file mode 100644 index 0000000..569e922 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_tax_type_observable_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// GetTaxTypeObservableOptionsReader is a Reader for the GetTaxTypeObservableOptions structure. +type GetTaxTypeObservableOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetTaxTypeObservableOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetTaxTypeObservableOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetTaxTypeObservableOptionsOK creates a GetTaxTypeObservableOptionsOK with default headers values +func NewGetTaxTypeObservableOptionsOK() *GetTaxTypeObservableOptionsOK { + return &GetTaxTypeObservableOptionsOK{} +} + +/*GetTaxTypeObservableOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type GetTaxTypeObservableOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *GetTaxTypeObservableOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /taxtypes/observable][%d] getTaxTypeObservableOptionsOK ", 200) +} + +func (o *GetTaxTypeObservableOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_tax_types_options_parameters.go b/api/geo/v0.0.1/geo_client/cors/get_tax_types_options_parameters.go new file mode 100644 index 0000000..1a49f02 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_tax_types_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetTaxTypesOptionsParams creates a new GetTaxTypesOptionsParams object +// with the default values initialized. +func NewGetTaxTypesOptionsParams() *GetTaxTypesOptionsParams { + + return &GetTaxTypesOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetTaxTypesOptionsParamsWithTimeout creates a new GetTaxTypesOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetTaxTypesOptionsParamsWithTimeout(timeout time.Duration) *GetTaxTypesOptionsParams { + + return &GetTaxTypesOptionsParams{ + + timeout: timeout, + } +} + +// NewGetTaxTypesOptionsParamsWithContext creates a new GetTaxTypesOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetTaxTypesOptionsParamsWithContext(ctx context.Context) *GetTaxTypesOptionsParams { + + return &GetTaxTypesOptionsParams{ + + Context: ctx, + } +} + +// NewGetTaxTypesOptionsParamsWithHTTPClient creates a new GetTaxTypesOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetTaxTypesOptionsParamsWithHTTPClient(client *http.Client) *GetTaxTypesOptionsParams { + + return &GetTaxTypesOptionsParams{ + HTTPClient: client, + } +} + +/*GetTaxTypesOptionsParams contains all the parameters to send to the API endpoint +for the get tax types options operation typically these are written to a http.Request +*/ +type GetTaxTypesOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get tax types options params +func (o *GetTaxTypesOptionsParams) WithTimeout(timeout time.Duration) *GetTaxTypesOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get tax types options params +func (o *GetTaxTypesOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get tax types options params +func (o *GetTaxTypesOptionsParams) WithContext(ctx context.Context) *GetTaxTypesOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get tax types options params +func (o *GetTaxTypesOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get tax types options params +func (o *GetTaxTypesOptionsParams) WithHTTPClient(client *http.Client) *GetTaxTypesOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get tax types options params +func (o *GetTaxTypesOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *GetTaxTypesOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_tax_types_options_responses.go b/api/geo/v0.0.1/geo_client/cors/get_tax_types_options_responses.go new file mode 100644 index 0000000..d1ecf68 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_tax_types_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// GetTaxTypesOptionsReader is a Reader for the GetTaxTypesOptions structure. +type GetTaxTypesOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetTaxTypesOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetTaxTypesOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetTaxTypesOptionsOK creates a GetTaxTypesOptionsOK with default headers values +func NewGetTaxTypesOptionsOK() *GetTaxTypesOptionsOK { + return &GetTaxTypesOptionsOK{} +} + +/*GetTaxTypesOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type GetTaxTypesOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *GetTaxTypesOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /taxtypes][%d] getTaxTypesOptionsOK ", 200) +} + +func (o *GetTaxTypesOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_taxnexus_codes_observable_options_parameters.go b/api/geo/v0.0.1/geo_client/cors/get_taxnexus_codes_observable_options_parameters.go new file mode 100644 index 0000000..4184b54 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_taxnexus_codes_observable_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetTaxnexusCodesObservableOptionsParams creates a new GetTaxnexusCodesObservableOptionsParams object +// with the default values initialized. +func NewGetTaxnexusCodesObservableOptionsParams() *GetTaxnexusCodesObservableOptionsParams { + + return &GetTaxnexusCodesObservableOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetTaxnexusCodesObservableOptionsParamsWithTimeout creates a new GetTaxnexusCodesObservableOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetTaxnexusCodesObservableOptionsParamsWithTimeout(timeout time.Duration) *GetTaxnexusCodesObservableOptionsParams { + + return &GetTaxnexusCodesObservableOptionsParams{ + + timeout: timeout, + } +} + +// NewGetTaxnexusCodesObservableOptionsParamsWithContext creates a new GetTaxnexusCodesObservableOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetTaxnexusCodesObservableOptionsParamsWithContext(ctx context.Context) *GetTaxnexusCodesObservableOptionsParams { + + return &GetTaxnexusCodesObservableOptionsParams{ + + Context: ctx, + } +} + +// NewGetTaxnexusCodesObservableOptionsParamsWithHTTPClient creates a new GetTaxnexusCodesObservableOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetTaxnexusCodesObservableOptionsParamsWithHTTPClient(client *http.Client) *GetTaxnexusCodesObservableOptionsParams { + + return &GetTaxnexusCodesObservableOptionsParams{ + HTTPClient: client, + } +} + +/*GetTaxnexusCodesObservableOptionsParams contains all the parameters to send to the API endpoint +for the get taxnexus codes observable options operation typically these are written to a http.Request +*/ +type GetTaxnexusCodesObservableOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get taxnexus codes observable options params +func (o *GetTaxnexusCodesObservableOptionsParams) WithTimeout(timeout time.Duration) *GetTaxnexusCodesObservableOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get taxnexus codes observable options params +func (o *GetTaxnexusCodesObservableOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get taxnexus codes observable options params +func (o *GetTaxnexusCodesObservableOptionsParams) WithContext(ctx context.Context) *GetTaxnexusCodesObservableOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get taxnexus codes observable options params +func (o *GetTaxnexusCodesObservableOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get taxnexus codes observable options params +func (o *GetTaxnexusCodesObservableOptionsParams) WithHTTPClient(client *http.Client) *GetTaxnexusCodesObservableOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get taxnexus codes observable options params +func (o *GetTaxnexusCodesObservableOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *GetTaxnexusCodesObservableOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_taxnexus_codes_observable_options_responses.go b/api/geo/v0.0.1/geo_client/cors/get_taxnexus_codes_observable_options_responses.go new file mode 100644 index 0000000..03006f9 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_taxnexus_codes_observable_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// GetTaxnexusCodesObservableOptionsReader is a Reader for the GetTaxnexusCodesObservableOptions structure. +type GetTaxnexusCodesObservableOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetTaxnexusCodesObservableOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetTaxnexusCodesObservableOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetTaxnexusCodesObservableOptionsOK creates a GetTaxnexusCodesObservableOptionsOK with default headers values +func NewGetTaxnexusCodesObservableOptionsOK() *GetTaxnexusCodesObservableOptionsOK { + return &GetTaxnexusCodesObservableOptionsOK{} +} + +/*GetTaxnexusCodesObservableOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type GetTaxnexusCodesObservableOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *GetTaxnexusCodesObservableOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /taxnexuscodes/observable][%d] getTaxnexusCodesObservableOptionsOK ", 200) +} + +func (o *GetTaxnexusCodesObservableOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_taxnexus_codes_options_parameters.go b/api/geo/v0.0.1/geo_client/cors/get_taxnexus_codes_options_parameters.go new file mode 100644 index 0000000..591b23e --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_taxnexus_codes_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetTaxnexusCodesOptionsParams creates a new GetTaxnexusCodesOptionsParams object +// with the default values initialized. +func NewGetTaxnexusCodesOptionsParams() *GetTaxnexusCodesOptionsParams { + + return &GetTaxnexusCodesOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetTaxnexusCodesOptionsParamsWithTimeout creates a new GetTaxnexusCodesOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetTaxnexusCodesOptionsParamsWithTimeout(timeout time.Duration) *GetTaxnexusCodesOptionsParams { + + return &GetTaxnexusCodesOptionsParams{ + + timeout: timeout, + } +} + +// NewGetTaxnexusCodesOptionsParamsWithContext creates a new GetTaxnexusCodesOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetTaxnexusCodesOptionsParamsWithContext(ctx context.Context) *GetTaxnexusCodesOptionsParams { + + return &GetTaxnexusCodesOptionsParams{ + + Context: ctx, + } +} + +// NewGetTaxnexusCodesOptionsParamsWithHTTPClient creates a new GetTaxnexusCodesOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetTaxnexusCodesOptionsParamsWithHTTPClient(client *http.Client) *GetTaxnexusCodesOptionsParams { + + return &GetTaxnexusCodesOptionsParams{ + HTTPClient: client, + } +} + +/*GetTaxnexusCodesOptionsParams contains all the parameters to send to the API endpoint +for the get taxnexus codes options operation typically these are written to a http.Request +*/ +type GetTaxnexusCodesOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get taxnexus codes options params +func (o *GetTaxnexusCodesOptionsParams) WithTimeout(timeout time.Duration) *GetTaxnexusCodesOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get taxnexus codes options params +func (o *GetTaxnexusCodesOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get taxnexus codes options params +func (o *GetTaxnexusCodesOptionsParams) WithContext(ctx context.Context) *GetTaxnexusCodesOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get taxnexus codes options params +func (o *GetTaxnexusCodesOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get taxnexus codes options params +func (o *GetTaxnexusCodesOptionsParams) WithHTTPClient(client *http.Client) *GetTaxnexusCodesOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get taxnexus codes options params +func (o *GetTaxnexusCodesOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *GetTaxnexusCodesOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/cors/get_taxnexus_codes_options_responses.go b/api/geo/v0.0.1/geo_client/cors/get_taxnexus_codes_options_responses.go new file mode 100644 index 0000000..134659c --- /dev/null +++ b/api/geo/v0.0.1/geo_client/cors/get_taxnexus_codes_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// GetTaxnexusCodesOptionsReader is a Reader for the GetTaxnexusCodesOptions structure. +type GetTaxnexusCodesOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetTaxnexusCodesOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetTaxnexusCodesOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetTaxnexusCodesOptionsOK creates a GetTaxnexusCodesOptionsOK with default headers values +func NewGetTaxnexusCodesOptionsOK() *GetTaxnexusCodesOptionsOK { + return &GetTaxnexusCodesOptionsOK{} +} + +/*GetTaxnexusCodesOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type GetTaxnexusCodesOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *GetTaxnexusCodesOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /taxnexuscodes][%d] getTaxnexusCodesOptionsOK ", 200) +} + +func (o *GetTaxnexusCodesOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/country/country_client.go b/api/geo/v0.0.1/geo_client/country/country_client.go new file mode 100644 index 0000000..6db9608 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/country/country_client.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package country + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new country API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for country API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetCountries(params *GetCountriesParams, authInfo runtime.ClientAuthInfoWriter) (*GetCountriesOK, error) + + GetCountriesObservable(params *GetCountriesObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetCountriesObservableOK, error) + + PostCountries(params *PostCountriesParams, authInfo runtime.ClientAuthInfoWriter) (*PostCountriesOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetCountries retrieves countries + + Retrieve Countries, filter with parameters +*/ +func (a *Client) GetCountries(params *GetCountriesParams, authInfo runtime.ClientAuthInfoWriter) (*GetCountriesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetCountriesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getCountries", + Method: "GET", + PathPattern: "/countries", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetCountriesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetCountriesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getCountries: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetCountriesObservable gets countries in an observable array + + Returns a country retrieval in a observable array +*/ +func (a *Client) GetCountriesObservable(params *GetCountriesObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetCountriesObservableOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetCountriesObservableParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getCountriesObservable", + Method: "GET", + PathPattern: "/countries/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetCountriesObservableReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetCountriesObservableOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getCountriesObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostCountries stores new countries + + Create New Countries +*/ +func (a *Client) PostCountries(params *PostCountriesParams, authInfo runtime.ClientAuthInfoWriter) (*PostCountriesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostCountriesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postCountries", + Method: "POST", + PathPattern: "/countries", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostCountriesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostCountriesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postCountries: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/geo/v0.0.1/geo_client/country/get_countries_observable_parameters.go b/api/geo/v0.0.1/geo_client/country/get_countries_observable_parameters.go new file mode 100644 index 0000000..dac5621 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/country/get_countries_observable_parameters.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package country + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetCountriesObservableParams creates a new GetCountriesObservableParams object +// with the default values initialized. +func NewGetCountriesObservableParams() *GetCountriesObservableParams { + var () + return &GetCountriesObservableParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetCountriesObservableParamsWithTimeout creates a new GetCountriesObservableParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetCountriesObservableParamsWithTimeout(timeout time.Duration) *GetCountriesObservableParams { + var () + return &GetCountriesObservableParams{ + + timeout: timeout, + } +} + +// NewGetCountriesObservableParamsWithContext creates a new GetCountriesObservableParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetCountriesObservableParamsWithContext(ctx context.Context) *GetCountriesObservableParams { + var () + return &GetCountriesObservableParams{ + + Context: ctx, + } +} + +// NewGetCountriesObservableParamsWithHTTPClient creates a new GetCountriesObservableParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetCountriesObservableParamsWithHTTPClient(client *http.Client) *GetCountriesObservableParams { + var () + return &GetCountriesObservableParams{ + HTTPClient: client, + } +} + +/*GetCountriesObservableParams contains all the parameters to send to the API endpoint +for the get countries observable operation typically these are written to a http.Request +*/ +type GetCountriesObservableParams struct { + + /*CountryCode + The Country abbreviation (2 char) + + */ + CountryCode *string + /*CountryID + The ID of this Object + + */ + CountryID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get countries observable params +func (o *GetCountriesObservableParams) WithTimeout(timeout time.Duration) *GetCountriesObservableParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get countries observable params +func (o *GetCountriesObservableParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get countries observable params +func (o *GetCountriesObservableParams) WithContext(ctx context.Context) *GetCountriesObservableParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get countries observable params +func (o *GetCountriesObservableParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get countries observable params +func (o *GetCountriesObservableParams) WithHTTPClient(client *http.Client) *GetCountriesObservableParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get countries observable params +func (o *GetCountriesObservableParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCountryCode adds the countryCode to the get countries observable params +func (o *GetCountriesObservableParams) WithCountryCode(countryCode *string) *GetCountriesObservableParams { + o.SetCountryCode(countryCode) + return o +} + +// SetCountryCode adds the countryCode to the get countries observable params +func (o *GetCountriesObservableParams) SetCountryCode(countryCode *string) { + o.CountryCode = countryCode +} + +// WithCountryID adds the countryID to the get countries observable params +func (o *GetCountriesObservableParams) WithCountryID(countryID *string) *GetCountriesObservableParams { + o.SetCountryID(countryID) + return o +} + +// SetCountryID adds the countryId to the get countries observable params +func (o *GetCountriesObservableParams) SetCountryID(countryID *string) { + o.CountryID = countryID +} + +// WriteToRequest writes these params to a swagger request +func (o *GetCountriesObservableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CountryCode != nil { + + // query param countryCode + var qrCountryCode string + if o.CountryCode != nil { + qrCountryCode = *o.CountryCode + } + qCountryCode := qrCountryCode + if qCountryCode != "" { + if err := r.SetQueryParam("countryCode", qCountryCode); err != nil { + return err + } + } + + } + + if o.CountryID != nil { + + // query param countryId + var qrCountryID string + if o.CountryID != nil { + qrCountryID = *o.CountryID + } + qCountryID := qrCountryID + if qCountryID != "" { + if err := r.SetQueryParam("countryId", qCountryID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/country/get_countries_observable_responses.go b/api/geo/v0.0.1/geo_client/country/get_countries_observable_responses.go new file mode 100644 index 0000000..77bbfd8 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/country/get_countries_observable_responses.go @@ -0,0 +1,301 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package country + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// GetCountriesObservableReader is a Reader for the GetCountriesObservable structure. +type GetCountriesObservableReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetCountriesObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetCountriesObservableOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetCountriesObservableUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetCountriesObservableForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetCountriesObservableNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetCountriesObservableUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetCountriesObservableInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetCountriesObservableOK creates a GetCountriesObservableOK with default headers values +func NewGetCountriesObservableOK() *GetCountriesObservableOK { + return &GetCountriesObservableOK{} +} + +/*GetCountriesObservableOK handles this case with default header values. + +Observable array response to a country retrieval +*/ +type GetCountriesObservableOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload []*geo_models.Country +} + +func (o *GetCountriesObservableOK) Error() string { + return fmt.Sprintf("[GET /countries/observable][%d] getCountriesObservableOK %+v", 200, o.Payload) +} + +func (o *GetCountriesObservableOK) GetPayload() []*geo_models.Country { + return o.Payload +} + +func (o *GetCountriesObservableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCountriesObservableUnauthorized creates a GetCountriesObservableUnauthorized with default headers values +func NewGetCountriesObservableUnauthorized() *GetCountriesObservableUnauthorized { + return &GetCountriesObservableUnauthorized{} +} + +/*GetCountriesObservableUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetCountriesObservableUnauthorized struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCountriesObservableUnauthorized) Error() string { + return fmt.Sprintf("[GET /countries/observable][%d] getCountriesObservableUnauthorized %+v", 401, o.Payload) +} + +func (o *GetCountriesObservableUnauthorized) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCountriesObservableUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCountriesObservableForbidden creates a GetCountriesObservableForbidden with default headers values +func NewGetCountriesObservableForbidden() *GetCountriesObservableForbidden { + return &GetCountriesObservableForbidden{} +} + +/*GetCountriesObservableForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetCountriesObservableForbidden struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCountriesObservableForbidden) Error() string { + return fmt.Sprintf("[GET /countries/observable][%d] getCountriesObservableForbidden %+v", 403, o.Payload) +} + +func (o *GetCountriesObservableForbidden) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCountriesObservableForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCountriesObservableNotFound creates a GetCountriesObservableNotFound with default headers values +func NewGetCountriesObservableNotFound() *GetCountriesObservableNotFound { + return &GetCountriesObservableNotFound{} +} + +/*GetCountriesObservableNotFound handles this case with default header values. + +Resource was not found +*/ +type GetCountriesObservableNotFound struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCountriesObservableNotFound) Error() string { + return fmt.Sprintf("[GET /countries/observable][%d] getCountriesObservableNotFound %+v", 404, o.Payload) +} + +func (o *GetCountriesObservableNotFound) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCountriesObservableNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCountriesObservableUnprocessableEntity creates a GetCountriesObservableUnprocessableEntity with default headers values +func NewGetCountriesObservableUnprocessableEntity() *GetCountriesObservableUnprocessableEntity { + return &GetCountriesObservableUnprocessableEntity{} +} + +/*GetCountriesObservableUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetCountriesObservableUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCountriesObservableUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /countries/observable][%d] getCountriesObservableUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetCountriesObservableUnprocessableEntity) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCountriesObservableUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCountriesObservableInternalServerError creates a GetCountriesObservableInternalServerError with default headers values +func NewGetCountriesObservableInternalServerError() *GetCountriesObservableInternalServerError { + return &GetCountriesObservableInternalServerError{} +} + +/*GetCountriesObservableInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetCountriesObservableInternalServerError struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCountriesObservableInternalServerError) Error() string { + return fmt.Sprintf("[GET /countries/observable][%d] getCountriesObservableInternalServerError %+v", 500, o.Payload) +} + +func (o *GetCountriesObservableInternalServerError) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCountriesObservableInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/country/get_countries_parameters.go b/api/geo/v0.0.1/geo_client/country/get_countries_parameters.go new file mode 100644 index 0000000..6334cc5 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/country/get_countries_parameters.go @@ -0,0 +1,247 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package country + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetCountriesParams creates a new GetCountriesParams object +// with the default values initialized. +func NewGetCountriesParams() *GetCountriesParams { + var () + return &GetCountriesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetCountriesParamsWithTimeout creates a new GetCountriesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetCountriesParamsWithTimeout(timeout time.Duration) *GetCountriesParams { + var () + return &GetCountriesParams{ + + timeout: timeout, + } +} + +// NewGetCountriesParamsWithContext creates a new GetCountriesParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetCountriesParamsWithContext(ctx context.Context) *GetCountriesParams { + var () + return &GetCountriesParams{ + + Context: ctx, + } +} + +// NewGetCountriesParamsWithHTTPClient creates a new GetCountriesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetCountriesParamsWithHTTPClient(client *http.Client) *GetCountriesParams { + var () + return &GetCountriesParams{ + HTTPClient: client, + } +} + +/*GetCountriesParams contains all the parameters to send to the API endpoint +for the get countries operation typically these are written to a http.Request +*/ +type GetCountriesParams struct { + + /*CountryCode + The Country abbreviation (2 char) + + */ + CountryCode *string + /*CountryID + The ID of this Object + + */ + CountryID *string + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get countries params +func (o *GetCountriesParams) WithTimeout(timeout time.Duration) *GetCountriesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get countries params +func (o *GetCountriesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get countries params +func (o *GetCountriesParams) WithContext(ctx context.Context) *GetCountriesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get countries params +func (o *GetCountriesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get countries params +func (o *GetCountriesParams) WithHTTPClient(client *http.Client) *GetCountriesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get countries params +func (o *GetCountriesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCountryCode adds the countryCode to the get countries params +func (o *GetCountriesParams) WithCountryCode(countryCode *string) *GetCountriesParams { + o.SetCountryCode(countryCode) + return o +} + +// SetCountryCode adds the countryCode to the get countries params +func (o *GetCountriesParams) SetCountryCode(countryCode *string) { + o.CountryCode = countryCode +} + +// WithCountryID adds the countryID to the get countries params +func (o *GetCountriesParams) WithCountryID(countryID *string) *GetCountriesParams { + o.SetCountryID(countryID) + return o +} + +// SetCountryID adds the countryId to the get countries params +func (o *GetCountriesParams) SetCountryID(countryID *string) { + o.CountryID = countryID +} + +// WithLimit adds the limit to the get countries params +func (o *GetCountriesParams) WithLimit(limit *int64) *GetCountriesParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get countries params +func (o *GetCountriesParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get countries params +func (o *GetCountriesParams) WithOffset(offset *int64) *GetCountriesParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get countries params +func (o *GetCountriesParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *GetCountriesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CountryCode != nil { + + // query param countryCode + var qrCountryCode string + if o.CountryCode != nil { + qrCountryCode = *o.CountryCode + } + qCountryCode := qrCountryCode + if qCountryCode != "" { + if err := r.SetQueryParam("countryCode", qCountryCode); err != nil { + return err + } + } + + } + + if o.CountryID != nil { + + // query param countryId + var qrCountryID string + if o.CountryID != nil { + qrCountryID = *o.CountryID + } + qCountryID := qrCountryID + if qCountryID != "" { + if err := r.SetQueryParam("countryId", qCountryID); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/country/get_countries_responses.go b/api/geo/v0.0.1/geo_client/country/get_countries_responses.go new file mode 100644 index 0000000..7e6ae2a --- /dev/null +++ b/api/geo/v0.0.1/geo_client/country/get_countries_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package country + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// GetCountriesReader is a Reader for the GetCountries structure. +type GetCountriesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetCountriesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetCountriesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetCountriesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetCountriesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetCountriesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetCountriesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetCountriesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetCountriesOK creates a GetCountriesOK with default headers values +func NewGetCountriesOK() *GetCountriesOK { + return &GetCountriesOK{} +} + +/*GetCountriesOK handles this case with default header values. + +Taxnexus Response with an array of Country objects +*/ +type GetCountriesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *geo_models.CountryResponse +} + +func (o *GetCountriesOK) Error() string { + return fmt.Sprintf("[GET /countries][%d] getCountriesOK %+v", 200, o.Payload) +} + +func (o *GetCountriesOK) GetPayload() *geo_models.CountryResponse { + return o.Payload +} + +func (o *GetCountriesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(geo_models.CountryResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCountriesUnauthorized creates a GetCountriesUnauthorized with default headers values +func NewGetCountriesUnauthorized() *GetCountriesUnauthorized { + return &GetCountriesUnauthorized{} +} + +/*GetCountriesUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetCountriesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCountriesUnauthorized) Error() string { + return fmt.Sprintf("[GET /countries][%d] getCountriesUnauthorized %+v", 401, o.Payload) +} + +func (o *GetCountriesUnauthorized) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCountriesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCountriesForbidden creates a GetCountriesForbidden with default headers values +func NewGetCountriesForbidden() *GetCountriesForbidden { + return &GetCountriesForbidden{} +} + +/*GetCountriesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetCountriesForbidden struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCountriesForbidden) Error() string { + return fmt.Sprintf("[GET /countries][%d] getCountriesForbidden %+v", 403, o.Payload) +} + +func (o *GetCountriesForbidden) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCountriesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCountriesNotFound creates a GetCountriesNotFound with default headers values +func NewGetCountriesNotFound() *GetCountriesNotFound { + return &GetCountriesNotFound{} +} + +/*GetCountriesNotFound handles this case with default header values. + +Resource was not found +*/ +type GetCountriesNotFound struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCountriesNotFound) Error() string { + return fmt.Sprintf("[GET /countries][%d] getCountriesNotFound %+v", 404, o.Payload) +} + +func (o *GetCountriesNotFound) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCountriesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCountriesUnprocessableEntity creates a GetCountriesUnprocessableEntity with default headers values +func NewGetCountriesUnprocessableEntity() *GetCountriesUnprocessableEntity { + return &GetCountriesUnprocessableEntity{} +} + +/*GetCountriesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetCountriesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCountriesUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /countries][%d] getCountriesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetCountriesUnprocessableEntity) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCountriesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCountriesInternalServerError creates a GetCountriesInternalServerError with default headers values +func NewGetCountriesInternalServerError() *GetCountriesInternalServerError { + return &GetCountriesInternalServerError{} +} + +/*GetCountriesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetCountriesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCountriesInternalServerError) Error() string { + return fmt.Sprintf("[GET /countries][%d] getCountriesInternalServerError %+v", 500, o.Payload) +} + +func (o *GetCountriesInternalServerError) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCountriesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/country/post_countries_parameters.go b/api/geo/v0.0.1/geo_client/country/post_countries_parameters.go new file mode 100644 index 0000000..6ee9a20 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/country/post_countries_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package country + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// NewPostCountriesParams creates a new PostCountriesParams object +// with the default values initialized. +func NewPostCountriesParams() *PostCountriesParams { + var () + return &PostCountriesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostCountriesParamsWithTimeout creates a new PostCountriesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostCountriesParamsWithTimeout(timeout time.Duration) *PostCountriesParams { + var () + return &PostCountriesParams{ + + timeout: timeout, + } +} + +// NewPostCountriesParamsWithContext creates a new PostCountriesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostCountriesParamsWithContext(ctx context.Context) *PostCountriesParams { + var () + return &PostCountriesParams{ + + Context: ctx, + } +} + +// NewPostCountriesParamsWithHTTPClient creates a new PostCountriesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostCountriesParamsWithHTTPClient(client *http.Client) *PostCountriesParams { + var () + return &PostCountriesParams{ + HTTPClient: client, + } +} + +/*PostCountriesParams contains all the parameters to send to the API endpoint +for the post countries operation typically these are written to a http.Request +*/ +type PostCountriesParams struct { + + /*CountryRequest*/ + CountryRequest *geo_models.CountryRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post countries params +func (o *PostCountriesParams) WithTimeout(timeout time.Duration) *PostCountriesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post countries params +func (o *PostCountriesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post countries params +func (o *PostCountriesParams) WithContext(ctx context.Context) *PostCountriesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post countries params +func (o *PostCountriesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post countries params +func (o *PostCountriesParams) WithHTTPClient(client *http.Client) *PostCountriesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post countries params +func (o *PostCountriesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCountryRequest adds the countryRequest to the post countries params +func (o *PostCountriesParams) WithCountryRequest(countryRequest *geo_models.CountryRequest) *PostCountriesParams { + o.SetCountryRequest(countryRequest) + return o +} + +// SetCountryRequest adds the countryRequest to the post countries params +func (o *PostCountriesParams) SetCountryRequest(countryRequest *geo_models.CountryRequest) { + o.CountryRequest = countryRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostCountriesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CountryRequest != nil { + if err := r.SetBodyParam(o.CountryRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/country/post_countries_responses.go b/api/geo/v0.0.1/geo_client/country/post_countries_responses.go new file mode 100644 index 0000000..77557a8 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/country/post_countries_responses.go @@ -0,0 +1,259 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package country + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// PostCountriesReader is a Reader for the PostCountries structure. +type PostCountriesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostCountriesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostCountriesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostCountriesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostCountriesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostCountriesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostCountriesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostCountriesOK creates a PostCountriesOK with default headers values +func NewPostCountriesOK() *PostCountriesOK { + return &PostCountriesOK{} +} + +/*PostCountriesOK handles this case with default header values. + +Taxnexus Response with an array of Country objects +*/ +type PostCountriesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *geo_models.CountryResponse +} + +func (o *PostCountriesOK) Error() string { + return fmt.Sprintf("[POST /countries][%d] postCountriesOK %+v", 200, o.Payload) +} + +func (o *PostCountriesOK) GetPayload() *geo_models.CountryResponse { + return o.Payload +} + +func (o *PostCountriesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(geo_models.CountryResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCountriesUnauthorized creates a PostCountriesUnauthorized with default headers values +func NewPostCountriesUnauthorized() *PostCountriesUnauthorized { + return &PostCountriesUnauthorized{} +} + +/*PostCountriesUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PostCountriesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostCountriesUnauthorized) Error() string { + return fmt.Sprintf("[POST /countries][%d] postCountriesUnauthorized %+v", 401, o.Payload) +} + +func (o *PostCountriesUnauthorized) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostCountriesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCountriesForbidden creates a PostCountriesForbidden with default headers values +func NewPostCountriesForbidden() *PostCountriesForbidden { + return &PostCountriesForbidden{} +} + +/*PostCountriesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostCountriesForbidden struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostCountriesForbidden) Error() string { + return fmt.Sprintf("[POST /countries][%d] postCountriesForbidden %+v", 403, o.Payload) +} + +func (o *PostCountriesForbidden) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostCountriesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCountriesNotFound creates a PostCountriesNotFound with default headers values +func NewPostCountriesNotFound() *PostCountriesNotFound { + return &PostCountriesNotFound{} +} + +/*PostCountriesNotFound handles this case with default header values. + +Resource was not found +*/ +type PostCountriesNotFound struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostCountriesNotFound) Error() string { + return fmt.Sprintf("[POST /countries][%d] postCountriesNotFound %+v", 404, o.Payload) +} + +func (o *PostCountriesNotFound) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostCountriesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCountriesInternalServerError creates a PostCountriesInternalServerError with default headers values +func NewPostCountriesInternalServerError() *PostCountriesInternalServerError { + return &PostCountriesInternalServerError{} +} + +/*PostCountriesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostCountriesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostCountriesInternalServerError) Error() string { + return fmt.Sprintf("[POST /countries][%d] postCountriesInternalServerError %+v", 500, o.Payload) +} + +func (o *PostCountriesInternalServerError) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostCountriesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/county/county_client.go b/api/geo/v0.0.1/geo_client/county/county_client.go new file mode 100644 index 0000000..93ac57d --- /dev/null +++ b/api/geo/v0.0.1/geo_client/county/county_client.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package county + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new county API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for county API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetCounties(params *GetCountiesParams, authInfo runtime.ClientAuthInfoWriter) (*GetCountiesOK, error) + + GetCountiesObservable(params *GetCountiesObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetCountiesObservableOK, error) + + PostCounties(params *PostCountiesParams, authInfo runtime.ClientAuthInfoWriter) (*PostCountiesOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetCounties retrieves counties + + Retrieve Counties, filter with parameters +*/ +func (a *Client) GetCounties(params *GetCountiesParams, authInfo runtime.ClientAuthInfoWriter) (*GetCountiesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetCountiesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getCounties", + Method: "GET", + PathPattern: "/counties", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetCountiesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetCountiesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getCounties: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetCountiesObservable gets counties in an observable array + + Returns a county retrieval in a observable array +*/ +func (a *Client) GetCountiesObservable(params *GetCountiesObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetCountiesObservableOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetCountiesObservableParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getCountiesObservable", + Method: "GET", + PathPattern: "/counties/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetCountiesObservableReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetCountiesObservableOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getCountiesObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostCounties stores new counties + + Create New Counties +*/ +func (a *Client) PostCounties(params *PostCountiesParams, authInfo runtime.ClientAuthInfoWriter) (*PostCountiesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostCountiesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postCounties", + Method: "POST", + PathPattern: "/counties", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostCountiesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostCountiesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postCounties: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/geo/v0.0.1/geo_client/county/get_counties_observable_parameters.go b/api/geo/v0.0.1/geo_client/county/get_counties_observable_parameters.go new file mode 100644 index 0000000..052a115 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/county/get_counties_observable_parameters.go @@ -0,0 +1,246 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package county + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetCountiesObservableParams creates a new GetCountiesObservableParams object +// with the default values initialized. +func NewGetCountiesObservableParams() *GetCountiesObservableParams { + var () + return &GetCountiesObservableParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetCountiesObservableParamsWithTimeout creates a new GetCountiesObservableParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetCountiesObservableParamsWithTimeout(timeout time.Duration) *GetCountiesObservableParams { + var () + return &GetCountiesObservableParams{ + + timeout: timeout, + } +} + +// NewGetCountiesObservableParamsWithContext creates a new GetCountiesObservableParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetCountiesObservableParamsWithContext(ctx context.Context) *GetCountiesObservableParams { + var () + return &GetCountiesObservableParams{ + + Context: ctx, + } +} + +// NewGetCountiesObservableParamsWithHTTPClient creates a new GetCountiesObservableParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetCountiesObservableParamsWithHTTPClient(client *http.Client) *GetCountiesObservableParams { + var () + return &GetCountiesObservableParams{ + HTTPClient: client, + } +} + +/*GetCountiesObservableParams contains all the parameters to send to the API endpoint +for the get counties observable operation typically these are written to a http.Request +*/ +type GetCountiesObservableParams struct { + + /*County + The County Name + + */ + County *string + /*CountyID + The ID of this Object + + */ + CountyID *string + /*Geocode + The Geocode of this Place record + + */ + Geocode *string + /*State + The State or Province abbreviation (2 char) + + */ + State *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get counties observable params +func (o *GetCountiesObservableParams) WithTimeout(timeout time.Duration) *GetCountiesObservableParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get counties observable params +func (o *GetCountiesObservableParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get counties observable params +func (o *GetCountiesObservableParams) WithContext(ctx context.Context) *GetCountiesObservableParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get counties observable params +func (o *GetCountiesObservableParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get counties observable params +func (o *GetCountiesObservableParams) WithHTTPClient(client *http.Client) *GetCountiesObservableParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get counties observable params +func (o *GetCountiesObservableParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCounty adds the county to the get counties observable params +func (o *GetCountiesObservableParams) WithCounty(county *string) *GetCountiesObservableParams { + o.SetCounty(county) + return o +} + +// SetCounty adds the county to the get counties observable params +func (o *GetCountiesObservableParams) SetCounty(county *string) { + o.County = county +} + +// WithCountyID adds the countyID to the get counties observable params +func (o *GetCountiesObservableParams) WithCountyID(countyID *string) *GetCountiesObservableParams { + o.SetCountyID(countyID) + return o +} + +// SetCountyID adds the countyId to the get counties observable params +func (o *GetCountiesObservableParams) SetCountyID(countyID *string) { + o.CountyID = countyID +} + +// WithGeocode adds the geocode to the get counties observable params +func (o *GetCountiesObservableParams) WithGeocode(geocode *string) *GetCountiesObservableParams { + o.SetGeocode(geocode) + return o +} + +// SetGeocode adds the geocode to the get counties observable params +func (o *GetCountiesObservableParams) SetGeocode(geocode *string) { + o.Geocode = geocode +} + +// WithState adds the state to the get counties observable params +func (o *GetCountiesObservableParams) WithState(state *string) *GetCountiesObservableParams { + o.SetState(state) + return o +} + +// SetState adds the state to the get counties observable params +func (o *GetCountiesObservableParams) SetState(state *string) { + o.State = state +} + +// WriteToRequest writes these params to a swagger request +func (o *GetCountiesObservableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.County != nil { + + // query param county + var qrCounty string + if o.County != nil { + qrCounty = *o.County + } + qCounty := qrCounty + if qCounty != "" { + if err := r.SetQueryParam("county", qCounty); err != nil { + return err + } + } + + } + + if o.CountyID != nil { + + // query param countyId + var qrCountyID string + if o.CountyID != nil { + qrCountyID = *o.CountyID + } + qCountyID := qrCountyID + if qCountyID != "" { + if err := r.SetQueryParam("countyId", qCountyID); err != nil { + return err + } + } + + } + + if o.Geocode != nil { + + // query param geocode + var qrGeocode string + if o.Geocode != nil { + qrGeocode = *o.Geocode + } + qGeocode := qrGeocode + if qGeocode != "" { + if err := r.SetQueryParam("geocode", qGeocode); err != nil { + return err + } + } + + } + + if o.State != nil { + + // query param state + var qrState string + if o.State != nil { + qrState = *o.State + } + qState := qrState + if qState != "" { + if err := r.SetQueryParam("state", qState); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/county/get_counties_observable_responses.go b/api/geo/v0.0.1/geo_client/county/get_counties_observable_responses.go new file mode 100644 index 0000000..c54a68c --- /dev/null +++ b/api/geo/v0.0.1/geo_client/county/get_counties_observable_responses.go @@ -0,0 +1,301 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package county + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// GetCountiesObservableReader is a Reader for the GetCountiesObservable structure. +type GetCountiesObservableReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetCountiesObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetCountiesObservableOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetCountiesObservableUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetCountiesObservableForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetCountiesObservableNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetCountiesObservableUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetCountiesObservableInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetCountiesObservableOK creates a GetCountiesObservableOK with default headers values +func NewGetCountiesObservableOK() *GetCountiesObservableOK { + return &GetCountiesObservableOK{} +} + +/*GetCountiesObservableOK handles this case with default header values. + +Observable array response to a county retrieval +*/ +type GetCountiesObservableOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload []*geo_models.County +} + +func (o *GetCountiesObservableOK) Error() string { + return fmt.Sprintf("[GET /counties/observable][%d] getCountiesObservableOK %+v", 200, o.Payload) +} + +func (o *GetCountiesObservableOK) GetPayload() []*geo_models.County { + return o.Payload +} + +func (o *GetCountiesObservableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCountiesObservableUnauthorized creates a GetCountiesObservableUnauthorized with default headers values +func NewGetCountiesObservableUnauthorized() *GetCountiesObservableUnauthorized { + return &GetCountiesObservableUnauthorized{} +} + +/*GetCountiesObservableUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetCountiesObservableUnauthorized struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCountiesObservableUnauthorized) Error() string { + return fmt.Sprintf("[GET /counties/observable][%d] getCountiesObservableUnauthorized %+v", 401, o.Payload) +} + +func (o *GetCountiesObservableUnauthorized) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCountiesObservableUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCountiesObservableForbidden creates a GetCountiesObservableForbidden with default headers values +func NewGetCountiesObservableForbidden() *GetCountiesObservableForbidden { + return &GetCountiesObservableForbidden{} +} + +/*GetCountiesObservableForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetCountiesObservableForbidden struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCountiesObservableForbidden) Error() string { + return fmt.Sprintf("[GET /counties/observable][%d] getCountiesObservableForbidden %+v", 403, o.Payload) +} + +func (o *GetCountiesObservableForbidden) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCountiesObservableForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCountiesObservableNotFound creates a GetCountiesObservableNotFound with default headers values +func NewGetCountiesObservableNotFound() *GetCountiesObservableNotFound { + return &GetCountiesObservableNotFound{} +} + +/*GetCountiesObservableNotFound handles this case with default header values. + +Resource was not found +*/ +type GetCountiesObservableNotFound struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCountiesObservableNotFound) Error() string { + return fmt.Sprintf("[GET /counties/observable][%d] getCountiesObservableNotFound %+v", 404, o.Payload) +} + +func (o *GetCountiesObservableNotFound) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCountiesObservableNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCountiesObservableUnprocessableEntity creates a GetCountiesObservableUnprocessableEntity with default headers values +func NewGetCountiesObservableUnprocessableEntity() *GetCountiesObservableUnprocessableEntity { + return &GetCountiesObservableUnprocessableEntity{} +} + +/*GetCountiesObservableUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetCountiesObservableUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCountiesObservableUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /counties/observable][%d] getCountiesObservableUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetCountiesObservableUnprocessableEntity) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCountiesObservableUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCountiesObservableInternalServerError creates a GetCountiesObservableInternalServerError with default headers values +func NewGetCountiesObservableInternalServerError() *GetCountiesObservableInternalServerError { + return &GetCountiesObservableInternalServerError{} +} + +/*GetCountiesObservableInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetCountiesObservableInternalServerError struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCountiesObservableInternalServerError) Error() string { + return fmt.Sprintf("[GET /counties/observable][%d] getCountiesObservableInternalServerError %+v", 500, o.Payload) +} + +func (o *GetCountiesObservableInternalServerError) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCountiesObservableInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/county/get_counties_parameters.go b/api/geo/v0.0.1/geo_client/county/get_counties_parameters.go new file mode 100644 index 0000000..2cce813 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/county/get_counties_parameters.go @@ -0,0 +1,311 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package county + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetCountiesParams creates a new GetCountiesParams object +// with the default values initialized. +func NewGetCountiesParams() *GetCountiesParams { + var () + return &GetCountiesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetCountiesParamsWithTimeout creates a new GetCountiesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetCountiesParamsWithTimeout(timeout time.Duration) *GetCountiesParams { + var () + return &GetCountiesParams{ + + timeout: timeout, + } +} + +// NewGetCountiesParamsWithContext creates a new GetCountiesParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetCountiesParamsWithContext(ctx context.Context) *GetCountiesParams { + var () + return &GetCountiesParams{ + + Context: ctx, + } +} + +// NewGetCountiesParamsWithHTTPClient creates a new GetCountiesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetCountiesParamsWithHTTPClient(client *http.Client) *GetCountiesParams { + var () + return &GetCountiesParams{ + HTTPClient: client, + } +} + +/*GetCountiesParams contains all the parameters to send to the API endpoint +for the get counties operation typically these are written to a http.Request +*/ +type GetCountiesParams struct { + + /*County + The County Name + + */ + County *string + /*CountyID + The ID of this Object + + */ + CountyID *string + /*Geocode + The Geocode of this Place record + + */ + Geocode *string + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + /*State + The State or Province abbreviation (2 char) + + */ + State *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get counties params +func (o *GetCountiesParams) WithTimeout(timeout time.Duration) *GetCountiesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get counties params +func (o *GetCountiesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get counties params +func (o *GetCountiesParams) WithContext(ctx context.Context) *GetCountiesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get counties params +func (o *GetCountiesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get counties params +func (o *GetCountiesParams) WithHTTPClient(client *http.Client) *GetCountiesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get counties params +func (o *GetCountiesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCounty adds the county to the get counties params +func (o *GetCountiesParams) WithCounty(county *string) *GetCountiesParams { + o.SetCounty(county) + return o +} + +// SetCounty adds the county to the get counties params +func (o *GetCountiesParams) SetCounty(county *string) { + o.County = county +} + +// WithCountyID adds the countyID to the get counties params +func (o *GetCountiesParams) WithCountyID(countyID *string) *GetCountiesParams { + o.SetCountyID(countyID) + return o +} + +// SetCountyID adds the countyId to the get counties params +func (o *GetCountiesParams) SetCountyID(countyID *string) { + o.CountyID = countyID +} + +// WithGeocode adds the geocode to the get counties params +func (o *GetCountiesParams) WithGeocode(geocode *string) *GetCountiesParams { + o.SetGeocode(geocode) + return o +} + +// SetGeocode adds the geocode to the get counties params +func (o *GetCountiesParams) SetGeocode(geocode *string) { + o.Geocode = geocode +} + +// WithLimit adds the limit to the get counties params +func (o *GetCountiesParams) WithLimit(limit *int64) *GetCountiesParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get counties params +func (o *GetCountiesParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get counties params +func (o *GetCountiesParams) WithOffset(offset *int64) *GetCountiesParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get counties params +func (o *GetCountiesParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithState adds the state to the get counties params +func (o *GetCountiesParams) WithState(state *string) *GetCountiesParams { + o.SetState(state) + return o +} + +// SetState adds the state to the get counties params +func (o *GetCountiesParams) SetState(state *string) { + o.State = state +} + +// WriteToRequest writes these params to a swagger request +func (o *GetCountiesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.County != nil { + + // query param county + var qrCounty string + if o.County != nil { + qrCounty = *o.County + } + qCounty := qrCounty + if qCounty != "" { + if err := r.SetQueryParam("county", qCounty); err != nil { + return err + } + } + + } + + if o.CountyID != nil { + + // query param countyId + var qrCountyID string + if o.CountyID != nil { + qrCountyID = *o.CountyID + } + qCountyID := qrCountyID + if qCountyID != "" { + if err := r.SetQueryParam("countyId", qCountyID); err != nil { + return err + } + } + + } + + if o.Geocode != nil { + + // query param geocode + var qrGeocode string + if o.Geocode != nil { + qrGeocode = *o.Geocode + } + qGeocode := qrGeocode + if qGeocode != "" { + if err := r.SetQueryParam("geocode", qGeocode); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.State != nil { + + // query param state + var qrState string + if o.State != nil { + qrState = *o.State + } + qState := qrState + if qState != "" { + if err := r.SetQueryParam("state", qState); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/county/get_counties_responses.go b/api/geo/v0.0.1/geo_client/county/get_counties_responses.go new file mode 100644 index 0000000..64098a1 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/county/get_counties_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package county + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// GetCountiesReader is a Reader for the GetCounties structure. +type GetCountiesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetCountiesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetCountiesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetCountiesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetCountiesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetCountiesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetCountiesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetCountiesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetCountiesOK creates a GetCountiesOK with default headers values +func NewGetCountiesOK() *GetCountiesOK { + return &GetCountiesOK{} +} + +/*GetCountiesOK handles this case with default header values. + +Taxnexus Response with an array of County objects +*/ +type GetCountiesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *geo_models.CountyResponse +} + +func (o *GetCountiesOK) Error() string { + return fmt.Sprintf("[GET /counties][%d] getCountiesOK %+v", 200, o.Payload) +} + +func (o *GetCountiesOK) GetPayload() *geo_models.CountyResponse { + return o.Payload +} + +func (o *GetCountiesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(geo_models.CountyResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCountiesUnauthorized creates a GetCountiesUnauthorized with default headers values +func NewGetCountiesUnauthorized() *GetCountiesUnauthorized { + return &GetCountiesUnauthorized{} +} + +/*GetCountiesUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetCountiesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCountiesUnauthorized) Error() string { + return fmt.Sprintf("[GET /counties][%d] getCountiesUnauthorized %+v", 401, o.Payload) +} + +func (o *GetCountiesUnauthorized) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCountiesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCountiesForbidden creates a GetCountiesForbidden with default headers values +func NewGetCountiesForbidden() *GetCountiesForbidden { + return &GetCountiesForbidden{} +} + +/*GetCountiesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetCountiesForbidden struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCountiesForbidden) Error() string { + return fmt.Sprintf("[GET /counties][%d] getCountiesForbidden %+v", 403, o.Payload) +} + +func (o *GetCountiesForbidden) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCountiesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCountiesNotFound creates a GetCountiesNotFound with default headers values +func NewGetCountiesNotFound() *GetCountiesNotFound { + return &GetCountiesNotFound{} +} + +/*GetCountiesNotFound handles this case with default header values. + +Resource was not found +*/ +type GetCountiesNotFound struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCountiesNotFound) Error() string { + return fmt.Sprintf("[GET /counties][%d] getCountiesNotFound %+v", 404, o.Payload) +} + +func (o *GetCountiesNotFound) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCountiesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCountiesUnprocessableEntity creates a GetCountiesUnprocessableEntity with default headers values +func NewGetCountiesUnprocessableEntity() *GetCountiesUnprocessableEntity { + return &GetCountiesUnprocessableEntity{} +} + +/*GetCountiesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetCountiesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCountiesUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /counties][%d] getCountiesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetCountiesUnprocessableEntity) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCountiesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCountiesInternalServerError creates a GetCountiesInternalServerError with default headers values +func NewGetCountiesInternalServerError() *GetCountiesInternalServerError { + return &GetCountiesInternalServerError{} +} + +/*GetCountiesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetCountiesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetCountiesInternalServerError) Error() string { + return fmt.Sprintf("[GET /counties][%d] getCountiesInternalServerError %+v", 500, o.Payload) +} + +func (o *GetCountiesInternalServerError) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetCountiesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/county/post_counties_parameters.go b/api/geo/v0.0.1/geo_client/county/post_counties_parameters.go new file mode 100644 index 0000000..8fef69c --- /dev/null +++ b/api/geo/v0.0.1/geo_client/county/post_counties_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package county + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// NewPostCountiesParams creates a new PostCountiesParams object +// with the default values initialized. +func NewPostCountiesParams() *PostCountiesParams { + var () + return &PostCountiesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostCountiesParamsWithTimeout creates a new PostCountiesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostCountiesParamsWithTimeout(timeout time.Duration) *PostCountiesParams { + var () + return &PostCountiesParams{ + + timeout: timeout, + } +} + +// NewPostCountiesParamsWithContext creates a new PostCountiesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostCountiesParamsWithContext(ctx context.Context) *PostCountiesParams { + var () + return &PostCountiesParams{ + + Context: ctx, + } +} + +// NewPostCountiesParamsWithHTTPClient creates a new PostCountiesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostCountiesParamsWithHTTPClient(client *http.Client) *PostCountiesParams { + var () + return &PostCountiesParams{ + HTTPClient: client, + } +} + +/*PostCountiesParams contains all the parameters to send to the API endpoint +for the post counties operation typically these are written to a http.Request +*/ +type PostCountiesParams struct { + + /*CountyRequest*/ + CountyRequest *geo_models.CountyRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post counties params +func (o *PostCountiesParams) WithTimeout(timeout time.Duration) *PostCountiesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post counties params +func (o *PostCountiesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post counties params +func (o *PostCountiesParams) WithContext(ctx context.Context) *PostCountiesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post counties params +func (o *PostCountiesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post counties params +func (o *PostCountiesParams) WithHTTPClient(client *http.Client) *PostCountiesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post counties params +func (o *PostCountiesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCountyRequest adds the countyRequest to the post counties params +func (o *PostCountiesParams) WithCountyRequest(countyRequest *geo_models.CountyRequest) *PostCountiesParams { + o.SetCountyRequest(countyRequest) + return o +} + +// SetCountyRequest adds the countyRequest to the post counties params +func (o *PostCountiesParams) SetCountyRequest(countyRequest *geo_models.CountyRequest) { + o.CountyRequest = countyRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostCountiesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CountyRequest != nil { + if err := r.SetBodyParam(o.CountyRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/county/post_counties_responses.go b/api/geo/v0.0.1/geo_client/county/post_counties_responses.go new file mode 100644 index 0000000..90b14e2 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/county/post_counties_responses.go @@ -0,0 +1,259 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package county + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// PostCountiesReader is a Reader for the PostCounties structure. +type PostCountiesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostCountiesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostCountiesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostCountiesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostCountiesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostCountiesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostCountiesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostCountiesOK creates a PostCountiesOK with default headers values +func NewPostCountiesOK() *PostCountiesOK { + return &PostCountiesOK{} +} + +/*PostCountiesOK handles this case with default header values. + +Taxnexus Response with an array of County objects +*/ +type PostCountiesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *geo_models.CountyResponse +} + +func (o *PostCountiesOK) Error() string { + return fmt.Sprintf("[POST /counties][%d] postCountiesOK %+v", 200, o.Payload) +} + +func (o *PostCountiesOK) GetPayload() *geo_models.CountyResponse { + return o.Payload +} + +func (o *PostCountiesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(geo_models.CountyResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCountiesUnauthorized creates a PostCountiesUnauthorized with default headers values +func NewPostCountiesUnauthorized() *PostCountiesUnauthorized { + return &PostCountiesUnauthorized{} +} + +/*PostCountiesUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PostCountiesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostCountiesUnauthorized) Error() string { + return fmt.Sprintf("[POST /counties][%d] postCountiesUnauthorized %+v", 401, o.Payload) +} + +func (o *PostCountiesUnauthorized) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostCountiesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCountiesForbidden creates a PostCountiesForbidden with default headers values +func NewPostCountiesForbidden() *PostCountiesForbidden { + return &PostCountiesForbidden{} +} + +/*PostCountiesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostCountiesForbidden struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostCountiesForbidden) Error() string { + return fmt.Sprintf("[POST /counties][%d] postCountiesForbidden %+v", 403, o.Payload) +} + +func (o *PostCountiesForbidden) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostCountiesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCountiesNotFound creates a PostCountiesNotFound with default headers values +func NewPostCountiesNotFound() *PostCountiesNotFound { + return &PostCountiesNotFound{} +} + +/*PostCountiesNotFound handles this case with default header values. + +Resource was not found +*/ +type PostCountiesNotFound struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostCountiesNotFound) Error() string { + return fmt.Sprintf("[POST /counties][%d] postCountiesNotFound %+v", 404, o.Payload) +} + +func (o *PostCountiesNotFound) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostCountiesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCountiesInternalServerError creates a PostCountiesInternalServerError with default headers values +func NewPostCountiesInternalServerError() *PostCountiesInternalServerError { + return &PostCountiesInternalServerError{} +} + +/*PostCountiesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostCountiesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostCountiesInternalServerError) Error() string { + return fmt.Sprintf("[POST /counties][%d] postCountiesInternalServerError %+v", 500, o.Payload) +} + +func (o *PostCountiesInternalServerError) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostCountiesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/domain/domain_client.go b/api/geo/v0.0.1/geo_client/domain/domain_client.go new file mode 100644 index 0000000..6f272cf --- /dev/null +++ b/api/geo/v0.0.1/geo_client/domain/domain_client.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package domain + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new domain API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for domain API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetDomainObservable(params *GetDomainObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetDomainObservableOK, error) + + GetDomains(params *GetDomainsParams, authInfo runtime.ClientAuthInfoWriter) (*GetDomainsOK, error) + + PostDomains(params *PostDomainsParams, authInfo runtime.ClientAuthInfoWriter) (*PostDomainsOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetDomainObservable gets domains in an observable array + + Returns a domain retrieval in a observable array +*/ +func (a *Client) GetDomainObservable(params *GetDomainObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetDomainObservableOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetDomainObservableParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getDomainObservable", + Method: "GET", + PathPattern: "/domains/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetDomainObservableReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetDomainObservableOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getDomainObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetDomains gets domain records + + Return all Domain records or by ID +*/ +func (a *Client) GetDomains(params *GetDomainsParams, authInfo runtime.ClientAuthInfoWriter) (*GetDomainsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetDomainsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getDomains", + Method: "GET", + PathPattern: "/domains", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetDomainsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetDomainsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getDomains: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostDomains stores new domain records + + Store a batch of new Domain records +*/ +func (a *Client) PostDomains(params *PostDomainsParams, authInfo runtime.ClientAuthInfoWriter) (*PostDomainsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostDomainsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postDomains", + Method: "POST", + PathPattern: "/domains", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostDomainsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostDomainsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postDomains: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/geo/v0.0.1/geo_client/domain/get_domain_observable_parameters.go b/api/geo/v0.0.1/geo_client/domain/get_domain_observable_parameters.go new file mode 100644 index 0000000..e272d9c --- /dev/null +++ b/api/geo/v0.0.1/geo_client/domain/get_domain_observable_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package domain + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetDomainObservableParams creates a new GetDomainObservableParams object +// with the default values initialized. +func NewGetDomainObservableParams() *GetDomainObservableParams { + + return &GetDomainObservableParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetDomainObservableParamsWithTimeout creates a new GetDomainObservableParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetDomainObservableParamsWithTimeout(timeout time.Duration) *GetDomainObservableParams { + + return &GetDomainObservableParams{ + + timeout: timeout, + } +} + +// NewGetDomainObservableParamsWithContext creates a new GetDomainObservableParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetDomainObservableParamsWithContext(ctx context.Context) *GetDomainObservableParams { + + return &GetDomainObservableParams{ + + Context: ctx, + } +} + +// NewGetDomainObservableParamsWithHTTPClient creates a new GetDomainObservableParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetDomainObservableParamsWithHTTPClient(client *http.Client) *GetDomainObservableParams { + + return &GetDomainObservableParams{ + HTTPClient: client, + } +} + +/*GetDomainObservableParams contains all the parameters to send to the API endpoint +for the get domain observable operation typically these are written to a http.Request +*/ +type GetDomainObservableParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get domain observable params +func (o *GetDomainObservableParams) WithTimeout(timeout time.Duration) *GetDomainObservableParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get domain observable params +func (o *GetDomainObservableParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get domain observable params +func (o *GetDomainObservableParams) WithContext(ctx context.Context) *GetDomainObservableParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get domain observable params +func (o *GetDomainObservableParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get domain observable params +func (o *GetDomainObservableParams) WithHTTPClient(client *http.Client) *GetDomainObservableParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get domain observable params +func (o *GetDomainObservableParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *GetDomainObservableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/domain/get_domain_observable_responses.go b/api/geo/v0.0.1/geo_client/domain/get_domain_observable_responses.go new file mode 100644 index 0000000..33977c0 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/domain/get_domain_observable_responses.go @@ -0,0 +1,301 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package domain + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// GetDomainObservableReader is a Reader for the GetDomainObservable structure. +type GetDomainObservableReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetDomainObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetDomainObservableOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetDomainObservableUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetDomainObservableForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetDomainObservableNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetDomainObservableUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetDomainObservableInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetDomainObservableOK creates a GetDomainObservableOK with default headers values +func NewGetDomainObservableOK() *GetDomainObservableOK { + return &GetDomainObservableOK{} +} + +/*GetDomainObservableOK handles this case with default header values. + +Observable array response to a domain retrieval +*/ +type GetDomainObservableOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload []*geo_models.Domain +} + +func (o *GetDomainObservableOK) Error() string { + return fmt.Sprintf("[GET /domains/observable][%d] getDomainObservableOK %+v", 200, o.Payload) +} + +func (o *GetDomainObservableOK) GetPayload() []*geo_models.Domain { + return o.Payload +} + +func (o *GetDomainObservableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetDomainObservableUnauthorized creates a GetDomainObservableUnauthorized with default headers values +func NewGetDomainObservableUnauthorized() *GetDomainObservableUnauthorized { + return &GetDomainObservableUnauthorized{} +} + +/*GetDomainObservableUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetDomainObservableUnauthorized struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetDomainObservableUnauthorized) Error() string { + return fmt.Sprintf("[GET /domains/observable][%d] getDomainObservableUnauthorized %+v", 401, o.Payload) +} + +func (o *GetDomainObservableUnauthorized) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetDomainObservableUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetDomainObservableForbidden creates a GetDomainObservableForbidden with default headers values +func NewGetDomainObservableForbidden() *GetDomainObservableForbidden { + return &GetDomainObservableForbidden{} +} + +/*GetDomainObservableForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetDomainObservableForbidden struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetDomainObservableForbidden) Error() string { + return fmt.Sprintf("[GET /domains/observable][%d] getDomainObservableForbidden %+v", 403, o.Payload) +} + +func (o *GetDomainObservableForbidden) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetDomainObservableForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetDomainObservableNotFound creates a GetDomainObservableNotFound with default headers values +func NewGetDomainObservableNotFound() *GetDomainObservableNotFound { + return &GetDomainObservableNotFound{} +} + +/*GetDomainObservableNotFound handles this case with default header values. + +Resource was not found +*/ +type GetDomainObservableNotFound struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetDomainObservableNotFound) Error() string { + return fmt.Sprintf("[GET /domains/observable][%d] getDomainObservableNotFound %+v", 404, o.Payload) +} + +func (o *GetDomainObservableNotFound) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetDomainObservableNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetDomainObservableUnprocessableEntity creates a GetDomainObservableUnprocessableEntity with default headers values +func NewGetDomainObservableUnprocessableEntity() *GetDomainObservableUnprocessableEntity { + return &GetDomainObservableUnprocessableEntity{} +} + +/*GetDomainObservableUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetDomainObservableUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetDomainObservableUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /domains/observable][%d] getDomainObservableUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetDomainObservableUnprocessableEntity) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetDomainObservableUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetDomainObservableInternalServerError creates a GetDomainObservableInternalServerError with default headers values +func NewGetDomainObservableInternalServerError() *GetDomainObservableInternalServerError { + return &GetDomainObservableInternalServerError{} +} + +/*GetDomainObservableInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetDomainObservableInternalServerError struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetDomainObservableInternalServerError) Error() string { + return fmt.Sprintf("[GET /domains/observable][%d] getDomainObservableInternalServerError %+v", 500, o.Payload) +} + +func (o *GetDomainObservableInternalServerError) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetDomainObservableInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/domain/get_domains_parameters.go b/api/geo/v0.0.1/geo_client/domain/get_domains_parameters.go new file mode 100644 index 0000000..48c7197 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/domain/get_domains_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package domain + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetDomainsParams creates a new GetDomainsParams object +// with the default values initialized. +func NewGetDomainsParams() *GetDomainsParams { + + return &GetDomainsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetDomainsParamsWithTimeout creates a new GetDomainsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetDomainsParamsWithTimeout(timeout time.Duration) *GetDomainsParams { + + return &GetDomainsParams{ + + timeout: timeout, + } +} + +// NewGetDomainsParamsWithContext creates a new GetDomainsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetDomainsParamsWithContext(ctx context.Context) *GetDomainsParams { + + return &GetDomainsParams{ + + Context: ctx, + } +} + +// NewGetDomainsParamsWithHTTPClient creates a new GetDomainsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetDomainsParamsWithHTTPClient(client *http.Client) *GetDomainsParams { + + return &GetDomainsParams{ + HTTPClient: client, + } +} + +/*GetDomainsParams contains all the parameters to send to the API endpoint +for the get domains operation typically these are written to a http.Request +*/ +type GetDomainsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get domains params +func (o *GetDomainsParams) WithTimeout(timeout time.Duration) *GetDomainsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get domains params +func (o *GetDomainsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get domains params +func (o *GetDomainsParams) WithContext(ctx context.Context) *GetDomainsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get domains params +func (o *GetDomainsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get domains params +func (o *GetDomainsParams) WithHTTPClient(client *http.Client) *GetDomainsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get domains params +func (o *GetDomainsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *GetDomainsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/domain/get_domains_responses.go b/api/geo/v0.0.1/geo_client/domain/get_domains_responses.go new file mode 100644 index 0000000..8ec4d97 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/domain/get_domains_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package domain + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// GetDomainsReader is a Reader for the GetDomains structure. +type GetDomainsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetDomainsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetDomainsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetDomainsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetDomainsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetDomainsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetDomainsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetDomainsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetDomainsOK creates a GetDomainsOK with default headers values +func NewGetDomainsOK() *GetDomainsOK { + return &GetDomainsOK{} +} + +/*GetDomainsOK handles this case with default header values. + +Taxnexus Response with an array of Domain objects +*/ +type GetDomainsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *geo_models.DomainResponse +} + +func (o *GetDomainsOK) Error() string { + return fmt.Sprintf("[GET /domains][%d] getDomainsOK %+v", 200, o.Payload) +} + +func (o *GetDomainsOK) GetPayload() *geo_models.DomainResponse { + return o.Payload +} + +func (o *GetDomainsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(geo_models.DomainResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetDomainsUnauthorized creates a GetDomainsUnauthorized with default headers values +func NewGetDomainsUnauthorized() *GetDomainsUnauthorized { + return &GetDomainsUnauthorized{} +} + +/*GetDomainsUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetDomainsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetDomainsUnauthorized) Error() string { + return fmt.Sprintf("[GET /domains][%d] getDomainsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetDomainsUnauthorized) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetDomainsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetDomainsForbidden creates a GetDomainsForbidden with default headers values +func NewGetDomainsForbidden() *GetDomainsForbidden { + return &GetDomainsForbidden{} +} + +/*GetDomainsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetDomainsForbidden struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetDomainsForbidden) Error() string { + return fmt.Sprintf("[GET /domains][%d] getDomainsForbidden %+v", 403, o.Payload) +} + +func (o *GetDomainsForbidden) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetDomainsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetDomainsNotFound creates a GetDomainsNotFound with default headers values +func NewGetDomainsNotFound() *GetDomainsNotFound { + return &GetDomainsNotFound{} +} + +/*GetDomainsNotFound handles this case with default header values. + +Resource was not found +*/ +type GetDomainsNotFound struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetDomainsNotFound) Error() string { + return fmt.Sprintf("[GET /domains][%d] getDomainsNotFound %+v", 404, o.Payload) +} + +func (o *GetDomainsNotFound) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetDomainsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetDomainsUnprocessableEntity creates a GetDomainsUnprocessableEntity with default headers values +func NewGetDomainsUnprocessableEntity() *GetDomainsUnprocessableEntity { + return &GetDomainsUnprocessableEntity{} +} + +/*GetDomainsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetDomainsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetDomainsUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /domains][%d] getDomainsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetDomainsUnprocessableEntity) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetDomainsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetDomainsInternalServerError creates a GetDomainsInternalServerError with default headers values +func NewGetDomainsInternalServerError() *GetDomainsInternalServerError { + return &GetDomainsInternalServerError{} +} + +/*GetDomainsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetDomainsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetDomainsInternalServerError) Error() string { + return fmt.Sprintf("[GET /domains][%d] getDomainsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetDomainsInternalServerError) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetDomainsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/domain/post_domains_parameters.go b/api/geo/v0.0.1/geo_client/domain/post_domains_parameters.go new file mode 100644 index 0000000..9682669 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/domain/post_domains_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package domain + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// NewPostDomainsParams creates a new PostDomainsParams object +// with the default values initialized. +func NewPostDomainsParams() *PostDomainsParams { + var () + return &PostDomainsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostDomainsParamsWithTimeout creates a new PostDomainsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostDomainsParamsWithTimeout(timeout time.Duration) *PostDomainsParams { + var () + return &PostDomainsParams{ + + timeout: timeout, + } +} + +// NewPostDomainsParamsWithContext creates a new PostDomainsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostDomainsParamsWithContext(ctx context.Context) *PostDomainsParams { + var () + return &PostDomainsParams{ + + Context: ctx, + } +} + +// NewPostDomainsParamsWithHTTPClient creates a new PostDomainsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostDomainsParamsWithHTTPClient(client *http.Client) *PostDomainsParams { + var () + return &PostDomainsParams{ + HTTPClient: client, + } +} + +/*PostDomainsParams contains all the parameters to send to the API endpoint +for the post domains operation typically these are written to a http.Request +*/ +type PostDomainsParams struct { + + /*DomainRequest*/ + DomainRequest *geo_models.DomainRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post domains params +func (o *PostDomainsParams) WithTimeout(timeout time.Duration) *PostDomainsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post domains params +func (o *PostDomainsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post domains params +func (o *PostDomainsParams) WithContext(ctx context.Context) *PostDomainsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post domains params +func (o *PostDomainsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post domains params +func (o *PostDomainsParams) WithHTTPClient(client *http.Client) *PostDomainsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post domains params +func (o *PostDomainsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDomainRequest adds the domainRequest to the post domains params +func (o *PostDomainsParams) WithDomainRequest(domainRequest *geo_models.DomainRequest) *PostDomainsParams { + o.SetDomainRequest(domainRequest) + return o +} + +// SetDomainRequest adds the domainRequest to the post domains params +func (o *PostDomainsParams) SetDomainRequest(domainRequest *geo_models.DomainRequest) { + o.DomainRequest = domainRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostDomainsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.DomainRequest != nil { + if err := r.SetBodyParam(o.DomainRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/domain/post_domains_responses.go b/api/geo/v0.0.1/geo_client/domain/post_domains_responses.go new file mode 100644 index 0000000..7b49a77 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/domain/post_domains_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package domain + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// PostDomainsReader is a Reader for the PostDomains structure. +type PostDomainsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostDomainsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostDomainsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostDomainsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostDomainsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostDomainsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostDomainsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostDomainsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostDomainsOK creates a PostDomainsOK with default headers values +func NewPostDomainsOK() *PostDomainsOK { + return &PostDomainsOK{} +} + +/*PostDomainsOK handles this case with default header values. + +Taxnexus Response with an array of Domain objects +*/ +type PostDomainsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *geo_models.DomainResponse +} + +func (o *PostDomainsOK) Error() string { + return fmt.Sprintf("[POST /domains][%d] postDomainsOK %+v", 200, o.Payload) +} + +func (o *PostDomainsOK) GetPayload() *geo_models.DomainResponse { + return o.Payload +} + +func (o *PostDomainsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(geo_models.DomainResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostDomainsUnauthorized creates a PostDomainsUnauthorized with default headers values +func NewPostDomainsUnauthorized() *PostDomainsUnauthorized { + return &PostDomainsUnauthorized{} +} + +/*PostDomainsUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PostDomainsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostDomainsUnauthorized) Error() string { + return fmt.Sprintf("[POST /domains][%d] postDomainsUnauthorized %+v", 401, o.Payload) +} + +func (o *PostDomainsUnauthorized) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostDomainsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostDomainsForbidden creates a PostDomainsForbidden with default headers values +func NewPostDomainsForbidden() *PostDomainsForbidden { + return &PostDomainsForbidden{} +} + +/*PostDomainsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostDomainsForbidden struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostDomainsForbidden) Error() string { + return fmt.Sprintf("[POST /domains][%d] postDomainsForbidden %+v", 403, o.Payload) +} + +func (o *PostDomainsForbidden) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostDomainsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostDomainsNotFound creates a PostDomainsNotFound with default headers values +func NewPostDomainsNotFound() *PostDomainsNotFound { + return &PostDomainsNotFound{} +} + +/*PostDomainsNotFound handles this case with default header values. + +Resource was not found +*/ +type PostDomainsNotFound struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostDomainsNotFound) Error() string { + return fmt.Sprintf("[POST /domains][%d] postDomainsNotFound %+v", 404, o.Payload) +} + +func (o *PostDomainsNotFound) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostDomainsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostDomainsUnprocessableEntity creates a PostDomainsUnprocessableEntity with default headers values +func NewPostDomainsUnprocessableEntity() *PostDomainsUnprocessableEntity { + return &PostDomainsUnprocessableEntity{} +} + +/*PostDomainsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostDomainsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostDomainsUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /domains][%d] postDomainsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostDomainsUnprocessableEntity) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostDomainsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostDomainsInternalServerError creates a PostDomainsInternalServerError with default headers values +func NewPostDomainsInternalServerError() *PostDomainsInternalServerError { + return &PostDomainsInternalServerError{} +} + +/*PostDomainsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostDomainsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostDomainsInternalServerError) Error() string { + return fmt.Sprintf("[POST /domains][%d] postDomainsInternalServerError %+v", 500, o.Payload) +} + +func (o *PostDomainsInternalServerError) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostDomainsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/geo_client.go b/api/geo/v0.0.1/geo_client/geo_client.go new file mode 100644 index 0000000..3677b63 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/geo_client.go @@ -0,0 +1,161 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_client + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_client/coordinate" + "github.com/taxnexus/lib/api/geo/geo_client/cors" + "github.com/taxnexus/lib/api/geo/geo_client/country" + "github.com/taxnexus/lib/api/geo/geo_client/county" + "github.com/taxnexus/lib/api/geo/geo_client/domain" + "github.com/taxnexus/lib/api/geo/geo_client/place" + "github.com/taxnexus/lib/api/geo/geo_client/state" + "github.com/taxnexus/lib/api/geo/geo_client/tax_rate" + "github.com/taxnexus/lib/api/geo/geo_client/tax_type" + "github.com/taxnexus/lib/api/geo/geo_client/taxnexus_code" +) + +// Default geo HTTP client. +var Default = NewHTTPClient(nil) + +const ( + // DefaultHost is the default Host + // found in Meta (info) section of spec file + DefaultHost string = "geo.fabric.tnxs.net:8080" + // DefaultBasePath is the default BasePath + // found in Meta (info) section of spec file + DefaultBasePath string = "/v1" +) + +// DefaultSchemes are the default schemes found in Meta (info) section of spec file +var DefaultSchemes = []string{"http"} + +// NewHTTPClient creates a new geo HTTP client. +func NewHTTPClient(formats strfmt.Registry) *Geo { + return NewHTTPClientWithConfig(formats, nil) +} + +// NewHTTPClientWithConfig creates a new geo HTTP client, +// using a customizable transport config. +func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *Geo { + // ensure nullable parameters have default + if cfg == nil { + cfg = DefaultTransportConfig() + } + + // create transport and client + transport := httptransport.New(cfg.Host, cfg.BasePath, cfg.Schemes) + return New(transport, formats) +} + +// New creates a new geo client +func New(transport runtime.ClientTransport, formats strfmt.Registry) *Geo { + // ensure nullable parameters have default + if formats == nil { + formats = strfmt.Default + } + + cli := new(Geo) + cli.Transport = transport + cli.Coordinate = coordinate.New(transport, formats) + cli.Cors = cors.New(transport, formats) + cli.Country = country.New(transport, formats) + cli.County = county.New(transport, formats) + cli.Domain = domain.New(transport, formats) + cli.Place = place.New(transport, formats) + cli.State = state.New(transport, formats) + cli.TaxRate = tax_rate.New(transport, formats) + cli.TaxType = tax_type.New(transport, formats) + cli.TaxnexusCode = taxnexus_code.New(transport, formats) + return cli +} + +// DefaultTransportConfig creates a TransportConfig with the +// default settings taken from the meta section of the spec file. +func DefaultTransportConfig() *TransportConfig { + return &TransportConfig{ + Host: DefaultHost, + BasePath: DefaultBasePath, + Schemes: DefaultSchemes, + } +} + +// TransportConfig contains the transport related info, +// found in the meta section of the spec file. +type TransportConfig struct { + Host string + BasePath string + Schemes []string +} + +// WithHost overrides the default host, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithHost(host string) *TransportConfig { + cfg.Host = host + return cfg +} + +// WithBasePath overrides the default basePath, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithBasePath(basePath string) *TransportConfig { + cfg.BasePath = basePath + return cfg +} + +// WithSchemes overrides the default schemes, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { + cfg.Schemes = schemes + return cfg +} + +// Geo is a client for geo +type Geo struct { + Coordinate coordinate.ClientService + + Cors cors.ClientService + + Country country.ClientService + + County county.ClientService + + Domain domain.ClientService + + Place place.ClientService + + State state.ClientService + + TaxRate tax_rate.ClientService + + TaxType tax_type.ClientService + + TaxnexusCode taxnexus_code.ClientService + + Transport runtime.ClientTransport +} + +// SetTransport changes the transport on the client and all its subresources +func (c *Geo) SetTransport(transport runtime.ClientTransport) { + c.Transport = transport + c.Coordinate.SetTransport(transport) + c.Cors.SetTransport(transport) + c.Country.SetTransport(transport) + c.County.SetTransport(transport) + c.Domain.SetTransport(transport) + c.Place.SetTransport(transport) + c.State.SetTransport(transport) + c.TaxRate.SetTransport(transport) + c.TaxType.SetTransport(transport) + c.TaxnexusCode.SetTransport(transport) +} diff --git a/api/geo/v0.0.1/geo_client/place/get_place_observable_parameters.go b/api/geo/v0.0.1/geo_client/place/get_place_observable_parameters.go new file mode 100644 index 0000000..0cb7df4 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/place/get_place_observable_parameters.go @@ -0,0 +1,214 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package place + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetPlaceObservableParams creates a new GetPlaceObservableParams object +// with the default values initialized. +func NewGetPlaceObservableParams() *GetPlaceObservableParams { + var () + return &GetPlaceObservableParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetPlaceObservableParamsWithTimeout creates a new GetPlaceObservableParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetPlaceObservableParamsWithTimeout(timeout time.Duration) *GetPlaceObservableParams { + var () + return &GetPlaceObservableParams{ + + timeout: timeout, + } +} + +// NewGetPlaceObservableParamsWithContext creates a new GetPlaceObservableParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetPlaceObservableParamsWithContext(ctx context.Context) *GetPlaceObservableParams { + var () + return &GetPlaceObservableParams{ + + Context: ctx, + } +} + +// NewGetPlaceObservableParamsWithHTTPClient creates a new GetPlaceObservableParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetPlaceObservableParamsWithHTTPClient(client *http.Client) *GetPlaceObservableParams { + var () + return &GetPlaceObservableParams{ + HTTPClient: client, + } +} + +/*GetPlaceObservableParams contains all the parameters to send to the API endpoint +for the get place observable operation typically these are written to a http.Request +*/ +type GetPlaceObservableParams struct { + + /*Geocode + The Geocode of this Place record + + */ + Geocode *string + /*PlaceID + The ID of a Place record + + */ + PlaceID *string + /*State + The State or Province abbreviation (2 char) + + */ + State *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get place observable params +func (o *GetPlaceObservableParams) WithTimeout(timeout time.Duration) *GetPlaceObservableParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get place observable params +func (o *GetPlaceObservableParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get place observable params +func (o *GetPlaceObservableParams) WithContext(ctx context.Context) *GetPlaceObservableParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get place observable params +func (o *GetPlaceObservableParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get place observable params +func (o *GetPlaceObservableParams) WithHTTPClient(client *http.Client) *GetPlaceObservableParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get place observable params +func (o *GetPlaceObservableParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithGeocode adds the geocode to the get place observable params +func (o *GetPlaceObservableParams) WithGeocode(geocode *string) *GetPlaceObservableParams { + o.SetGeocode(geocode) + return o +} + +// SetGeocode adds the geocode to the get place observable params +func (o *GetPlaceObservableParams) SetGeocode(geocode *string) { + o.Geocode = geocode +} + +// WithPlaceID adds the placeID to the get place observable params +func (o *GetPlaceObservableParams) WithPlaceID(placeID *string) *GetPlaceObservableParams { + o.SetPlaceID(placeID) + return o +} + +// SetPlaceID adds the placeId to the get place observable params +func (o *GetPlaceObservableParams) SetPlaceID(placeID *string) { + o.PlaceID = placeID +} + +// WithState adds the state to the get place observable params +func (o *GetPlaceObservableParams) WithState(state *string) *GetPlaceObservableParams { + o.SetState(state) + return o +} + +// SetState adds the state to the get place observable params +func (o *GetPlaceObservableParams) SetState(state *string) { + o.State = state +} + +// WriteToRequest writes these params to a swagger request +func (o *GetPlaceObservableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Geocode != nil { + + // query param geocode + var qrGeocode string + if o.Geocode != nil { + qrGeocode = *o.Geocode + } + qGeocode := qrGeocode + if qGeocode != "" { + if err := r.SetQueryParam("geocode", qGeocode); err != nil { + return err + } + } + + } + + if o.PlaceID != nil { + + // query param placeId + var qrPlaceID string + if o.PlaceID != nil { + qrPlaceID = *o.PlaceID + } + qPlaceID := qrPlaceID + if qPlaceID != "" { + if err := r.SetQueryParam("placeId", qPlaceID); err != nil { + return err + } + } + + } + + if o.State != nil { + + // query param state + var qrState string + if o.State != nil { + qrState = *o.State + } + qState := qrState + if qState != "" { + if err := r.SetQueryParam("state", qState); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/place/get_place_observable_responses.go b/api/geo/v0.0.1/geo_client/place/get_place_observable_responses.go new file mode 100644 index 0000000..2006672 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/place/get_place_observable_responses.go @@ -0,0 +1,301 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package place + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// GetPlaceObservableReader is a Reader for the GetPlaceObservable structure. +type GetPlaceObservableReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetPlaceObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetPlaceObservableOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetPlaceObservableUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetPlaceObservableForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetPlaceObservableNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetPlaceObservableUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetPlaceObservableInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetPlaceObservableOK creates a GetPlaceObservableOK with default headers values +func NewGetPlaceObservableOK() *GetPlaceObservableOK { + return &GetPlaceObservableOK{} +} + +/*GetPlaceObservableOK handles this case with default header values. + +Observable array response to a place retrieval +*/ +type GetPlaceObservableOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload []*geo_models.Place +} + +func (o *GetPlaceObservableOK) Error() string { + return fmt.Sprintf("[GET /places/observable][%d] getPlaceObservableOK %+v", 200, o.Payload) +} + +func (o *GetPlaceObservableOK) GetPayload() []*geo_models.Place { + return o.Payload +} + +func (o *GetPlaceObservableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetPlaceObservableUnauthorized creates a GetPlaceObservableUnauthorized with default headers values +func NewGetPlaceObservableUnauthorized() *GetPlaceObservableUnauthorized { + return &GetPlaceObservableUnauthorized{} +} + +/*GetPlaceObservableUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetPlaceObservableUnauthorized struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetPlaceObservableUnauthorized) Error() string { + return fmt.Sprintf("[GET /places/observable][%d] getPlaceObservableUnauthorized %+v", 401, o.Payload) +} + +func (o *GetPlaceObservableUnauthorized) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetPlaceObservableUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetPlaceObservableForbidden creates a GetPlaceObservableForbidden with default headers values +func NewGetPlaceObservableForbidden() *GetPlaceObservableForbidden { + return &GetPlaceObservableForbidden{} +} + +/*GetPlaceObservableForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetPlaceObservableForbidden struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetPlaceObservableForbidden) Error() string { + return fmt.Sprintf("[GET /places/observable][%d] getPlaceObservableForbidden %+v", 403, o.Payload) +} + +func (o *GetPlaceObservableForbidden) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetPlaceObservableForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetPlaceObservableNotFound creates a GetPlaceObservableNotFound with default headers values +func NewGetPlaceObservableNotFound() *GetPlaceObservableNotFound { + return &GetPlaceObservableNotFound{} +} + +/*GetPlaceObservableNotFound handles this case with default header values. + +Resource was not found +*/ +type GetPlaceObservableNotFound struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetPlaceObservableNotFound) Error() string { + return fmt.Sprintf("[GET /places/observable][%d] getPlaceObservableNotFound %+v", 404, o.Payload) +} + +func (o *GetPlaceObservableNotFound) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetPlaceObservableNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetPlaceObservableUnprocessableEntity creates a GetPlaceObservableUnprocessableEntity with default headers values +func NewGetPlaceObservableUnprocessableEntity() *GetPlaceObservableUnprocessableEntity { + return &GetPlaceObservableUnprocessableEntity{} +} + +/*GetPlaceObservableUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetPlaceObservableUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetPlaceObservableUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /places/observable][%d] getPlaceObservableUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetPlaceObservableUnprocessableEntity) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetPlaceObservableUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetPlaceObservableInternalServerError creates a GetPlaceObservableInternalServerError with default headers values +func NewGetPlaceObservableInternalServerError() *GetPlaceObservableInternalServerError { + return &GetPlaceObservableInternalServerError{} +} + +/*GetPlaceObservableInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetPlaceObservableInternalServerError struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetPlaceObservableInternalServerError) Error() string { + return fmt.Sprintf("[GET /places/observable][%d] getPlaceObservableInternalServerError %+v", 500, o.Payload) +} + +func (o *GetPlaceObservableInternalServerError) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetPlaceObservableInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/place/get_places_parameters.go b/api/geo/v0.0.1/geo_client/place/get_places_parameters.go new file mode 100644 index 0000000..d0a97e2 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/place/get_places_parameters.go @@ -0,0 +1,279 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package place + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetPlacesParams creates a new GetPlacesParams object +// with the default values initialized. +func NewGetPlacesParams() *GetPlacesParams { + var () + return &GetPlacesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetPlacesParamsWithTimeout creates a new GetPlacesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetPlacesParamsWithTimeout(timeout time.Duration) *GetPlacesParams { + var () + return &GetPlacesParams{ + + timeout: timeout, + } +} + +// NewGetPlacesParamsWithContext creates a new GetPlacesParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetPlacesParamsWithContext(ctx context.Context) *GetPlacesParams { + var () + return &GetPlacesParams{ + + Context: ctx, + } +} + +// NewGetPlacesParamsWithHTTPClient creates a new GetPlacesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetPlacesParamsWithHTTPClient(client *http.Client) *GetPlacesParams { + var () + return &GetPlacesParams{ + HTTPClient: client, + } +} + +/*GetPlacesParams contains all the parameters to send to the API endpoint +for the get places operation typically these are written to a http.Request +*/ +type GetPlacesParams struct { + + /*Geocode + The Geocode of this Place record + + */ + Geocode *string + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + /*PlaceID + The ID of a Place record + + */ + PlaceID *string + /*State + The State or Province abbreviation (2 char) + + */ + State *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get places params +func (o *GetPlacesParams) WithTimeout(timeout time.Duration) *GetPlacesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get places params +func (o *GetPlacesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get places params +func (o *GetPlacesParams) WithContext(ctx context.Context) *GetPlacesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get places params +func (o *GetPlacesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get places params +func (o *GetPlacesParams) WithHTTPClient(client *http.Client) *GetPlacesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get places params +func (o *GetPlacesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithGeocode adds the geocode to the get places params +func (o *GetPlacesParams) WithGeocode(geocode *string) *GetPlacesParams { + o.SetGeocode(geocode) + return o +} + +// SetGeocode adds the geocode to the get places params +func (o *GetPlacesParams) SetGeocode(geocode *string) { + o.Geocode = geocode +} + +// WithLimit adds the limit to the get places params +func (o *GetPlacesParams) WithLimit(limit *int64) *GetPlacesParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get places params +func (o *GetPlacesParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get places params +func (o *GetPlacesParams) WithOffset(offset *int64) *GetPlacesParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get places params +func (o *GetPlacesParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithPlaceID adds the placeID to the get places params +func (o *GetPlacesParams) WithPlaceID(placeID *string) *GetPlacesParams { + o.SetPlaceID(placeID) + return o +} + +// SetPlaceID adds the placeId to the get places params +func (o *GetPlacesParams) SetPlaceID(placeID *string) { + o.PlaceID = placeID +} + +// WithState adds the state to the get places params +func (o *GetPlacesParams) WithState(state *string) *GetPlacesParams { + o.SetState(state) + return o +} + +// SetState adds the state to the get places params +func (o *GetPlacesParams) SetState(state *string) { + o.State = state +} + +// WriteToRequest writes these params to a swagger request +func (o *GetPlacesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Geocode != nil { + + // query param geocode + var qrGeocode string + if o.Geocode != nil { + qrGeocode = *o.Geocode + } + qGeocode := qrGeocode + if qGeocode != "" { + if err := r.SetQueryParam("geocode", qGeocode); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.PlaceID != nil { + + // query param placeId + var qrPlaceID string + if o.PlaceID != nil { + qrPlaceID = *o.PlaceID + } + qPlaceID := qrPlaceID + if qPlaceID != "" { + if err := r.SetQueryParam("placeId", qPlaceID); err != nil { + return err + } + } + + } + + if o.State != nil { + + // query param state + var qrState string + if o.State != nil { + qrState = *o.State + } + qState := qrState + if qState != "" { + if err := r.SetQueryParam("state", qState); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/place/get_places_responses.go b/api/geo/v0.0.1/geo_client/place/get_places_responses.go new file mode 100644 index 0000000..1b791d8 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/place/get_places_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package place + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// GetPlacesReader is a Reader for the GetPlaces structure. +type GetPlacesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetPlacesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetPlacesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetPlacesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetPlacesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetPlacesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetPlacesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetPlacesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetPlacesOK creates a GetPlacesOK with default headers values +func NewGetPlacesOK() *GetPlacesOK { + return &GetPlacesOK{} +} + +/*GetPlacesOK handles this case with default header values. + +Taxnexus Response with an array of Place objects +*/ +type GetPlacesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *geo_models.PlaceResponse +} + +func (o *GetPlacesOK) Error() string { + return fmt.Sprintf("[GET /places][%d] getPlacesOK %+v", 200, o.Payload) +} + +func (o *GetPlacesOK) GetPayload() *geo_models.PlaceResponse { + return o.Payload +} + +func (o *GetPlacesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(geo_models.PlaceResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetPlacesUnauthorized creates a GetPlacesUnauthorized with default headers values +func NewGetPlacesUnauthorized() *GetPlacesUnauthorized { + return &GetPlacesUnauthorized{} +} + +/*GetPlacesUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetPlacesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetPlacesUnauthorized) Error() string { + return fmt.Sprintf("[GET /places][%d] getPlacesUnauthorized %+v", 401, o.Payload) +} + +func (o *GetPlacesUnauthorized) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetPlacesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetPlacesForbidden creates a GetPlacesForbidden with default headers values +func NewGetPlacesForbidden() *GetPlacesForbidden { + return &GetPlacesForbidden{} +} + +/*GetPlacesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetPlacesForbidden struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetPlacesForbidden) Error() string { + return fmt.Sprintf("[GET /places][%d] getPlacesForbidden %+v", 403, o.Payload) +} + +func (o *GetPlacesForbidden) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetPlacesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetPlacesNotFound creates a GetPlacesNotFound with default headers values +func NewGetPlacesNotFound() *GetPlacesNotFound { + return &GetPlacesNotFound{} +} + +/*GetPlacesNotFound handles this case with default header values. + +Resource was not found +*/ +type GetPlacesNotFound struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetPlacesNotFound) Error() string { + return fmt.Sprintf("[GET /places][%d] getPlacesNotFound %+v", 404, o.Payload) +} + +func (o *GetPlacesNotFound) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetPlacesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetPlacesUnprocessableEntity creates a GetPlacesUnprocessableEntity with default headers values +func NewGetPlacesUnprocessableEntity() *GetPlacesUnprocessableEntity { + return &GetPlacesUnprocessableEntity{} +} + +/*GetPlacesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetPlacesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetPlacesUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /places][%d] getPlacesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetPlacesUnprocessableEntity) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetPlacesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetPlacesInternalServerError creates a GetPlacesInternalServerError with default headers values +func NewGetPlacesInternalServerError() *GetPlacesInternalServerError { + return &GetPlacesInternalServerError{} +} + +/*GetPlacesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetPlacesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetPlacesInternalServerError) Error() string { + return fmt.Sprintf("[GET /places][%d] getPlacesInternalServerError %+v", 500, o.Payload) +} + +func (o *GetPlacesInternalServerError) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetPlacesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/place/place_client.go b/api/geo/v0.0.1/geo_client/place/place_client.go new file mode 100644 index 0000000..3f45255 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/place/place_client.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package place + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new place API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for place API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetPlaceObservable(params *GetPlaceObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetPlaceObservableOK, error) + + GetPlaces(params *GetPlacesParams, authInfo runtime.ClientAuthInfoWriter) (*GetPlacesOK, error) + + PostPlaces(params *PostPlacesParams, authInfo runtime.ClientAuthInfoWriter) (*PostPlacesOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetPlaceObservable gets places in an observable array + + Returns a place retrieval in a observable array +*/ +func (a *Client) GetPlaceObservable(params *GetPlaceObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetPlaceObservableOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetPlaceObservableParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getPlaceObservable", + Method: "GET", + PathPattern: "/places/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetPlaceObservableReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetPlaceObservableOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getPlaceObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetPlaces retrieves places + + Retrieve Places, filter with parameters +*/ +func (a *Client) GetPlaces(params *GetPlacesParams, authInfo runtime.ClientAuthInfoWriter) (*GetPlacesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetPlacesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getPlaces", + Method: "GET", + PathPattern: "/places", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetPlacesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetPlacesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getPlaces: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostPlaces stores new place records + + Store a batch of new Place records +*/ +func (a *Client) PostPlaces(params *PostPlacesParams, authInfo runtime.ClientAuthInfoWriter) (*PostPlacesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostPlacesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postPlaces", + Method: "POST", + PathPattern: "/places", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostPlacesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostPlacesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postPlaces: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/geo/v0.0.1/geo_client/place/post_places_parameters.go b/api/geo/v0.0.1/geo_client/place/post_places_parameters.go new file mode 100644 index 0000000..5c09d7c --- /dev/null +++ b/api/geo/v0.0.1/geo_client/place/post_places_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package place + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// NewPostPlacesParams creates a new PostPlacesParams object +// with the default values initialized. +func NewPostPlacesParams() *PostPlacesParams { + var () + return &PostPlacesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostPlacesParamsWithTimeout creates a new PostPlacesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostPlacesParamsWithTimeout(timeout time.Duration) *PostPlacesParams { + var () + return &PostPlacesParams{ + + timeout: timeout, + } +} + +// NewPostPlacesParamsWithContext creates a new PostPlacesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostPlacesParamsWithContext(ctx context.Context) *PostPlacesParams { + var () + return &PostPlacesParams{ + + Context: ctx, + } +} + +// NewPostPlacesParamsWithHTTPClient creates a new PostPlacesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostPlacesParamsWithHTTPClient(client *http.Client) *PostPlacesParams { + var () + return &PostPlacesParams{ + HTTPClient: client, + } +} + +/*PostPlacesParams contains all the parameters to send to the API endpoint +for the post places operation typically these are written to a http.Request +*/ +type PostPlacesParams struct { + + /*PlaceRequest + The new Places request package + + */ + PlaceRequest *geo_models.PlaceRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post places params +func (o *PostPlacesParams) WithTimeout(timeout time.Duration) *PostPlacesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post places params +func (o *PostPlacesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post places params +func (o *PostPlacesParams) WithContext(ctx context.Context) *PostPlacesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post places params +func (o *PostPlacesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post places params +func (o *PostPlacesParams) WithHTTPClient(client *http.Client) *PostPlacesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post places params +func (o *PostPlacesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPlaceRequest adds the placeRequest to the post places params +func (o *PostPlacesParams) WithPlaceRequest(placeRequest *geo_models.PlaceRequest) *PostPlacesParams { + o.SetPlaceRequest(placeRequest) + return o +} + +// SetPlaceRequest adds the placeRequest to the post places params +func (o *PostPlacesParams) SetPlaceRequest(placeRequest *geo_models.PlaceRequest) { + o.PlaceRequest = placeRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostPlacesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.PlaceRequest != nil { + if err := r.SetBodyParam(o.PlaceRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/place/post_places_responses.go b/api/geo/v0.0.1/geo_client/place/post_places_responses.go new file mode 100644 index 0000000..9e37e46 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/place/post_places_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package place + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// PostPlacesReader is a Reader for the PostPlaces structure. +type PostPlacesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostPlacesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostPlacesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostPlacesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostPlacesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostPlacesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostPlacesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostPlacesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostPlacesOK creates a PostPlacesOK with default headers values +func NewPostPlacesOK() *PostPlacesOK { + return &PostPlacesOK{} +} + +/*PostPlacesOK handles this case with default header values. + +Taxnexus Response with an array of Place objects +*/ +type PostPlacesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *geo_models.PlaceResponse +} + +func (o *PostPlacesOK) Error() string { + return fmt.Sprintf("[POST /places][%d] postPlacesOK %+v", 200, o.Payload) +} + +func (o *PostPlacesOK) GetPayload() *geo_models.PlaceResponse { + return o.Payload +} + +func (o *PostPlacesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(geo_models.PlaceResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPlacesUnauthorized creates a PostPlacesUnauthorized with default headers values +func NewPostPlacesUnauthorized() *PostPlacesUnauthorized { + return &PostPlacesUnauthorized{} +} + +/*PostPlacesUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PostPlacesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostPlacesUnauthorized) Error() string { + return fmt.Sprintf("[POST /places][%d] postPlacesUnauthorized %+v", 401, o.Payload) +} + +func (o *PostPlacesUnauthorized) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostPlacesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPlacesForbidden creates a PostPlacesForbidden with default headers values +func NewPostPlacesForbidden() *PostPlacesForbidden { + return &PostPlacesForbidden{} +} + +/*PostPlacesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostPlacesForbidden struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostPlacesForbidden) Error() string { + return fmt.Sprintf("[POST /places][%d] postPlacesForbidden %+v", 403, o.Payload) +} + +func (o *PostPlacesForbidden) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostPlacesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPlacesNotFound creates a PostPlacesNotFound with default headers values +func NewPostPlacesNotFound() *PostPlacesNotFound { + return &PostPlacesNotFound{} +} + +/*PostPlacesNotFound handles this case with default header values. + +Resource was not found +*/ +type PostPlacesNotFound struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostPlacesNotFound) Error() string { + return fmt.Sprintf("[POST /places][%d] postPlacesNotFound %+v", 404, o.Payload) +} + +func (o *PostPlacesNotFound) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostPlacesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPlacesUnprocessableEntity creates a PostPlacesUnprocessableEntity with default headers values +func NewPostPlacesUnprocessableEntity() *PostPlacesUnprocessableEntity { + return &PostPlacesUnprocessableEntity{} +} + +/*PostPlacesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostPlacesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostPlacesUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /places][%d] postPlacesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostPlacesUnprocessableEntity) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostPlacesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPlacesInternalServerError creates a PostPlacesInternalServerError with default headers values +func NewPostPlacesInternalServerError() *PostPlacesInternalServerError { + return &PostPlacesInternalServerError{} +} + +/*PostPlacesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostPlacesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostPlacesInternalServerError) Error() string { + return fmt.Sprintf("[POST /places][%d] postPlacesInternalServerError %+v", 500, o.Payload) +} + +func (o *PostPlacesInternalServerError) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostPlacesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/state/get_state_observable_parameters.go b/api/geo/v0.0.1/geo_client/state/get_state_observable_parameters.go new file mode 100644 index 0000000..ac1745a --- /dev/null +++ b/api/geo/v0.0.1/geo_client/state/get_state_observable_parameters.go @@ -0,0 +1,214 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package state + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetStateObservableParams creates a new GetStateObservableParams object +// with the default values initialized. +func NewGetStateObservableParams() *GetStateObservableParams { + var () + return &GetStateObservableParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetStateObservableParamsWithTimeout creates a new GetStateObservableParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetStateObservableParamsWithTimeout(timeout time.Duration) *GetStateObservableParams { + var () + return &GetStateObservableParams{ + + timeout: timeout, + } +} + +// NewGetStateObservableParamsWithContext creates a new GetStateObservableParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetStateObservableParamsWithContext(ctx context.Context) *GetStateObservableParams { + var () + return &GetStateObservableParams{ + + Context: ctx, + } +} + +// NewGetStateObservableParamsWithHTTPClient creates a new GetStateObservableParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetStateObservableParamsWithHTTPClient(client *http.Client) *GetStateObservableParams { + var () + return &GetStateObservableParams{ + HTTPClient: client, + } +} + +/*GetStateObservableParams contains all the parameters to send to the API endpoint +for the get state observable operation typically these are written to a http.Request +*/ +type GetStateObservableParams struct { + + /*StateID + The ID of this Object + + */ + StateID *string + /*CountryCode + The Country abbreviation (2 char) + + */ + CountryCode *string + /*Geocode + The Geocode of this Place record + + */ + Geocode *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get state observable params +func (o *GetStateObservableParams) WithTimeout(timeout time.Duration) *GetStateObservableParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get state observable params +func (o *GetStateObservableParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get state observable params +func (o *GetStateObservableParams) WithContext(ctx context.Context) *GetStateObservableParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get state observable params +func (o *GetStateObservableParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get state observable params +func (o *GetStateObservableParams) WithHTTPClient(client *http.Client) *GetStateObservableParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get state observable params +func (o *GetStateObservableParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithStateID adds the stateID to the get state observable params +func (o *GetStateObservableParams) WithStateID(stateID *string) *GetStateObservableParams { + o.SetStateID(stateID) + return o +} + +// SetStateID adds the stateId to the get state observable params +func (o *GetStateObservableParams) SetStateID(stateID *string) { + o.StateID = stateID +} + +// WithCountryCode adds the countryCode to the get state observable params +func (o *GetStateObservableParams) WithCountryCode(countryCode *string) *GetStateObservableParams { + o.SetCountryCode(countryCode) + return o +} + +// SetCountryCode adds the countryCode to the get state observable params +func (o *GetStateObservableParams) SetCountryCode(countryCode *string) { + o.CountryCode = countryCode +} + +// WithGeocode adds the geocode to the get state observable params +func (o *GetStateObservableParams) WithGeocode(geocode *string) *GetStateObservableParams { + o.SetGeocode(geocode) + return o +} + +// SetGeocode adds the geocode to the get state observable params +func (o *GetStateObservableParams) SetGeocode(geocode *string) { + o.Geocode = geocode +} + +// WriteToRequest writes these params to a swagger request +func (o *GetStateObservableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.StateID != nil { + + // query param StateID + var qrStateID string + if o.StateID != nil { + qrStateID = *o.StateID + } + qStateID := qrStateID + if qStateID != "" { + if err := r.SetQueryParam("StateID", qStateID); err != nil { + return err + } + } + + } + + if o.CountryCode != nil { + + // query param countryCode + var qrCountryCode string + if o.CountryCode != nil { + qrCountryCode = *o.CountryCode + } + qCountryCode := qrCountryCode + if qCountryCode != "" { + if err := r.SetQueryParam("countryCode", qCountryCode); err != nil { + return err + } + } + + } + + if o.Geocode != nil { + + // query param geocode + var qrGeocode string + if o.Geocode != nil { + qrGeocode = *o.Geocode + } + qGeocode := qrGeocode + if qGeocode != "" { + if err := r.SetQueryParam("geocode", qGeocode); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/state/get_state_observable_responses.go b/api/geo/v0.0.1/geo_client/state/get_state_observable_responses.go new file mode 100644 index 0000000..fd3efcc --- /dev/null +++ b/api/geo/v0.0.1/geo_client/state/get_state_observable_responses.go @@ -0,0 +1,301 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package state + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// GetStateObservableReader is a Reader for the GetStateObservable structure. +type GetStateObservableReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetStateObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetStateObservableOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetStateObservableUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetStateObservableForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetStateObservableNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetStateObservableUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetStateObservableInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetStateObservableOK creates a GetStateObservableOK with default headers values +func NewGetStateObservableOK() *GetStateObservableOK { + return &GetStateObservableOK{} +} + +/*GetStateObservableOK handles this case with default header values. + +Observable array response to a state retrieval +*/ +type GetStateObservableOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload []*geo_models.State +} + +func (o *GetStateObservableOK) Error() string { + return fmt.Sprintf("[GET /states/observable][%d] getStateObservableOK %+v", 200, o.Payload) +} + +func (o *GetStateObservableOK) GetPayload() []*geo_models.State { + return o.Payload +} + +func (o *GetStateObservableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetStateObservableUnauthorized creates a GetStateObservableUnauthorized with default headers values +func NewGetStateObservableUnauthorized() *GetStateObservableUnauthorized { + return &GetStateObservableUnauthorized{} +} + +/*GetStateObservableUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetStateObservableUnauthorized struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetStateObservableUnauthorized) Error() string { + return fmt.Sprintf("[GET /states/observable][%d] getStateObservableUnauthorized %+v", 401, o.Payload) +} + +func (o *GetStateObservableUnauthorized) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetStateObservableUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetStateObservableForbidden creates a GetStateObservableForbidden with default headers values +func NewGetStateObservableForbidden() *GetStateObservableForbidden { + return &GetStateObservableForbidden{} +} + +/*GetStateObservableForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetStateObservableForbidden struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetStateObservableForbidden) Error() string { + return fmt.Sprintf("[GET /states/observable][%d] getStateObservableForbidden %+v", 403, o.Payload) +} + +func (o *GetStateObservableForbidden) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetStateObservableForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetStateObservableNotFound creates a GetStateObservableNotFound with default headers values +func NewGetStateObservableNotFound() *GetStateObservableNotFound { + return &GetStateObservableNotFound{} +} + +/*GetStateObservableNotFound handles this case with default header values. + +Resource was not found +*/ +type GetStateObservableNotFound struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetStateObservableNotFound) Error() string { + return fmt.Sprintf("[GET /states/observable][%d] getStateObservableNotFound %+v", 404, o.Payload) +} + +func (o *GetStateObservableNotFound) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetStateObservableNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetStateObservableUnprocessableEntity creates a GetStateObservableUnprocessableEntity with default headers values +func NewGetStateObservableUnprocessableEntity() *GetStateObservableUnprocessableEntity { + return &GetStateObservableUnprocessableEntity{} +} + +/*GetStateObservableUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetStateObservableUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetStateObservableUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /states/observable][%d] getStateObservableUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetStateObservableUnprocessableEntity) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetStateObservableUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetStateObservableInternalServerError creates a GetStateObservableInternalServerError with default headers values +func NewGetStateObservableInternalServerError() *GetStateObservableInternalServerError { + return &GetStateObservableInternalServerError{} +} + +/*GetStateObservableInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetStateObservableInternalServerError struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetStateObservableInternalServerError) Error() string { + return fmt.Sprintf("[GET /states/observable][%d] getStateObservableInternalServerError %+v", 500, o.Payload) +} + +func (o *GetStateObservableInternalServerError) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetStateObservableInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/state/get_states_parameters.go b/api/geo/v0.0.1/geo_client/state/get_states_parameters.go new file mode 100644 index 0000000..21826e5 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/state/get_states_parameters.go @@ -0,0 +1,279 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package state + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetStatesParams creates a new GetStatesParams object +// with the default values initialized. +func NewGetStatesParams() *GetStatesParams { + var () + return &GetStatesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetStatesParamsWithTimeout creates a new GetStatesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetStatesParamsWithTimeout(timeout time.Duration) *GetStatesParams { + var () + return &GetStatesParams{ + + timeout: timeout, + } +} + +// NewGetStatesParamsWithContext creates a new GetStatesParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetStatesParamsWithContext(ctx context.Context) *GetStatesParams { + var () + return &GetStatesParams{ + + Context: ctx, + } +} + +// NewGetStatesParamsWithHTTPClient creates a new GetStatesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetStatesParamsWithHTTPClient(client *http.Client) *GetStatesParams { + var () + return &GetStatesParams{ + HTTPClient: client, + } +} + +/*GetStatesParams contains all the parameters to send to the API endpoint +for the get states operation typically these are written to a http.Request +*/ +type GetStatesParams struct { + + /*StateID + The ID of this Object + + */ + StateID *string + /*CountryCode + The Country abbreviation (2 char) + + */ + CountryCode *string + /*Geocode + The Geocode of this Place record + + */ + Geocode *string + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get states params +func (o *GetStatesParams) WithTimeout(timeout time.Duration) *GetStatesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get states params +func (o *GetStatesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get states params +func (o *GetStatesParams) WithContext(ctx context.Context) *GetStatesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get states params +func (o *GetStatesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get states params +func (o *GetStatesParams) WithHTTPClient(client *http.Client) *GetStatesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get states params +func (o *GetStatesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithStateID adds the stateID to the get states params +func (o *GetStatesParams) WithStateID(stateID *string) *GetStatesParams { + o.SetStateID(stateID) + return o +} + +// SetStateID adds the stateId to the get states params +func (o *GetStatesParams) SetStateID(stateID *string) { + o.StateID = stateID +} + +// WithCountryCode adds the countryCode to the get states params +func (o *GetStatesParams) WithCountryCode(countryCode *string) *GetStatesParams { + o.SetCountryCode(countryCode) + return o +} + +// SetCountryCode adds the countryCode to the get states params +func (o *GetStatesParams) SetCountryCode(countryCode *string) { + o.CountryCode = countryCode +} + +// WithGeocode adds the geocode to the get states params +func (o *GetStatesParams) WithGeocode(geocode *string) *GetStatesParams { + o.SetGeocode(geocode) + return o +} + +// SetGeocode adds the geocode to the get states params +func (o *GetStatesParams) SetGeocode(geocode *string) { + o.Geocode = geocode +} + +// WithLimit adds the limit to the get states params +func (o *GetStatesParams) WithLimit(limit *int64) *GetStatesParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get states params +func (o *GetStatesParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get states params +func (o *GetStatesParams) WithOffset(offset *int64) *GetStatesParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get states params +func (o *GetStatesParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *GetStatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.StateID != nil { + + // query param StateID + var qrStateID string + if o.StateID != nil { + qrStateID = *o.StateID + } + qStateID := qrStateID + if qStateID != "" { + if err := r.SetQueryParam("StateID", qStateID); err != nil { + return err + } + } + + } + + if o.CountryCode != nil { + + // query param countryCode + var qrCountryCode string + if o.CountryCode != nil { + qrCountryCode = *o.CountryCode + } + qCountryCode := qrCountryCode + if qCountryCode != "" { + if err := r.SetQueryParam("countryCode", qCountryCode); err != nil { + return err + } + } + + } + + if o.Geocode != nil { + + // query param geocode + var qrGeocode string + if o.Geocode != nil { + qrGeocode = *o.Geocode + } + qGeocode := qrGeocode + if qGeocode != "" { + if err := r.SetQueryParam("geocode", qGeocode); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/state/get_states_responses.go b/api/geo/v0.0.1/geo_client/state/get_states_responses.go new file mode 100644 index 0000000..9a0d5f4 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/state/get_states_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package state + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// GetStatesReader is a Reader for the GetStates structure. +type GetStatesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetStatesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetStatesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetStatesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetStatesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetStatesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetStatesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetStatesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetStatesOK creates a GetStatesOK with default headers values +func NewGetStatesOK() *GetStatesOK { + return &GetStatesOK{} +} + +/*GetStatesOK handles this case with default header values. + +Taxnexus Response with an array of State objects +*/ +type GetStatesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *geo_models.StateResponse +} + +func (o *GetStatesOK) Error() string { + return fmt.Sprintf("[GET /states][%d] getStatesOK %+v", 200, o.Payload) +} + +func (o *GetStatesOK) GetPayload() *geo_models.StateResponse { + return o.Payload +} + +func (o *GetStatesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(geo_models.StateResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetStatesUnauthorized creates a GetStatesUnauthorized with default headers values +func NewGetStatesUnauthorized() *GetStatesUnauthorized { + return &GetStatesUnauthorized{} +} + +/*GetStatesUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetStatesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetStatesUnauthorized) Error() string { + return fmt.Sprintf("[GET /states][%d] getStatesUnauthorized %+v", 401, o.Payload) +} + +func (o *GetStatesUnauthorized) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetStatesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetStatesForbidden creates a GetStatesForbidden with default headers values +func NewGetStatesForbidden() *GetStatesForbidden { + return &GetStatesForbidden{} +} + +/*GetStatesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetStatesForbidden struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetStatesForbidden) Error() string { + return fmt.Sprintf("[GET /states][%d] getStatesForbidden %+v", 403, o.Payload) +} + +func (o *GetStatesForbidden) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetStatesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetStatesNotFound creates a GetStatesNotFound with default headers values +func NewGetStatesNotFound() *GetStatesNotFound { + return &GetStatesNotFound{} +} + +/*GetStatesNotFound handles this case with default header values. + +Resource was not found +*/ +type GetStatesNotFound struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetStatesNotFound) Error() string { + return fmt.Sprintf("[GET /states][%d] getStatesNotFound %+v", 404, o.Payload) +} + +func (o *GetStatesNotFound) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetStatesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetStatesUnprocessableEntity creates a GetStatesUnprocessableEntity with default headers values +func NewGetStatesUnprocessableEntity() *GetStatesUnprocessableEntity { + return &GetStatesUnprocessableEntity{} +} + +/*GetStatesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetStatesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetStatesUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /states][%d] getStatesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetStatesUnprocessableEntity) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetStatesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetStatesInternalServerError creates a GetStatesInternalServerError with default headers values +func NewGetStatesInternalServerError() *GetStatesInternalServerError { + return &GetStatesInternalServerError{} +} + +/*GetStatesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetStatesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetStatesInternalServerError) Error() string { + return fmt.Sprintf("[GET /states][%d] getStatesInternalServerError %+v", 500, o.Payload) +} + +func (o *GetStatesInternalServerError) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetStatesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/state/post_states_parameters.go b/api/geo/v0.0.1/geo_client/state/post_states_parameters.go new file mode 100644 index 0000000..0dceff6 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/state/post_states_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package state + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// NewPostStatesParams creates a new PostStatesParams object +// with the default values initialized. +func NewPostStatesParams() *PostStatesParams { + var () + return &PostStatesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostStatesParamsWithTimeout creates a new PostStatesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostStatesParamsWithTimeout(timeout time.Duration) *PostStatesParams { + var () + return &PostStatesParams{ + + timeout: timeout, + } +} + +// NewPostStatesParamsWithContext creates a new PostStatesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostStatesParamsWithContext(ctx context.Context) *PostStatesParams { + var () + return &PostStatesParams{ + + Context: ctx, + } +} + +// NewPostStatesParamsWithHTTPClient creates a new PostStatesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostStatesParamsWithHTTPClient(client *http.Client) *PostStatesParams { + var () + return &PostStatesParams{ + HTTPClient: client, + } +} + +/*PostStatesParams contains all the parameters to send to the API endpoint +for the post states operation typically these are written to a http.Request +*/ +type PostStatesParams struct { + + /*StateRequest + The new Places request package + + */ + StateRequest *geo_models.StateRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post states params +func (o *PostStatesParams) WithTimeout(timeout time.Duration) *PostStatesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post states params +func (o *PostStatesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post states params +func (o *PostStatesParams) WithContext(ctx context.Context) *PostStatesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post states params +func (o *PostStatesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post states params +func (o *PostStatesParams) WithHTTPClient(client *http.Client) *PostStatesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post states params +func (o *PostStatesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithStateRequest adds the stateRequest to the post states params +func (o *PostStatesParams) WithStateRequest(stateRequest *geo_models.StateRequest) *PostStatesParams { + o.SetStateRequest(stateRequest) + return o +} + +// SetStateRequest adds the stateRequest to the post states params +func (o *PostStatesParams) SetStateRequest(stateRequest *geo_models.StateRequest) { + o.StateRequest = stateRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostStatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.StateRequest != nil { + if err := r.SetBodyParam(o.StateRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/state/post_states_responses.go b/api/geo/v0.0.1/geo_client/state/post_states_responses.go new file mode 100644 index 0000000..cbb122d --- /dev/null +++ b/api/geo/v0.0.1/geo_client/state/post_states_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package state + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// PostStatesReader is a Reader for the PostStates structure. +type PostStatesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostStatesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostStatesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostStatesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostStatesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostStatesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostStatesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostStatesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostStatesOK creates a PostStatesOK with default headers values +func NewPostStatesOK() *PostStatesOK { + return &PostStatesOK{} +} + +/*PostStatesOK handles this case with default header values. + +Taxnexus Response with an array of State objects +*/ +type PostStatesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *geo_models.StateResponse +} + +func (o *PostStatesOK) Error() string { + return fmt.Sprintf("[POST /states][%d] postStatesOK %+v", 200, o.Payload) +} + +func (o *PostStatesOK) GetPayload() *geo_models.StateResponse { + return o.Payload +} + +func (o *PostStatesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(geo_models.StateResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostStatesUnauthorized creates a PostStatesUnauthorized with default headers values +func NewPostStatesUnauthorized() *PostStatesUnauthorized { + return &PostStatesUnauthorized{} +} + +/*PostStatesUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PostStatesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostStatesUnauthorized) Error() string { + return fmt.Sprintf("[POST /states][%d] postStatesUnauthorized %+v", 401, o.Payload) +} + +func (o *PostStatesUnauthorized) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostStatesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostStatesForbidden creates a PostStatesForbidden with default headers values +func NewPostStatesForbidden() *PostStatesForbidden { + return &PostStatesForbidden{} +} + +/*PostStatesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostStatesForbidden struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostStatesForbidden) Error() string { + return fmt.Sprintf("[POST /states][%d] postStatesForbidden %+v", 403, o.Payload) +} + +func (o *PostStatesForbidden) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostStatesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostStatesNotFound creates a PostStatesNotFound with default headers values +func NewPostStatesNotFound() *PostStatesNotFound { + return &PostStatesNotFound{} +} + +/*PostStatesNotFound handles this case with default header values. + +Resource was not found +*/ +type PostStatesNotFound struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostStatesNotFound) Error() string { + return fmt.Sprintf("[POST /states][%d] postStatesNotFound %+v", 404, o.Payload) +} + +func (o *PostStatesNotFound) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostStatesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostStatesUnprocessableEntity creates a PostStatesUnprocessableEntity with default headers values +func NewPostStatesUnprocessableEntity() *PostStatesUnprocessableEntity { + return &PostStatesUnprocessableEntity{} +} + +/*PostStatesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostStatesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostStatesUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /states][%d] postStatesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostStatesUnprocessableEntity) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostStatesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostStatesInternalServerError creates a PostStatesInternalServerError with default headers values +func NewPostStatesInternalServerError() *PostStatesInternalServerError { + return &PostStatesInternalServerError{} +} + +/*PostStatesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostStatesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostStatesInternalServerError) Error() string { + return fmt.Sprintf("[POST /states][%d] postStatesInternalServerError %+v", 500, o.Payload) +} + +func (o *PostStatesInternalServerError) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostStatesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/state/state_client.go b/api/geo/v0.0.1/geo_client/state/state_client.go new file mode 100644 index 0000000..2134c9c --- /dev/null +++ b/api/geo/v0.0.1/geo_client/state/state_client.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package state + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new state API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for state API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetStateObservable(params *GetStateObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetStateObservableOK, error) + + GetStates(params *GetStatesParams, authInfo runtime.ClientAuthInfoWriter) (*GetStatesOK, error) + + PostStates(params *PostStatesParams, authInfo runtime.ClientAuthInfoWriter) (*PostStatesOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetStateObservable gets states in an observable array + + Returns a state retrieval in a observable array +*/ +func (a *Client) GetStateObservable(params *GetStateObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetStateObservableOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetStateObservableParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getStateObservable", + Method: "GET", + PathPattern: "/states/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetStateObservableReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetStateObservableOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getStateObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetStates retrieves states + + Retrieve States, filter with parameters +*/ +func (a *Client) GetStates(params *GetStatesParams, authInfo runtime.ClientAuthInfoWriter) (*GetStatesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetStatesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getStates", + Method: "GET", + PathPattern: "/states", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetStatesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetStatesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getStates: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostStates stores new state records + + Store a batch of new State records +*/ +func (a *Client) PostStates(params *PostStatesParams, authInfo runtime.ClientAuthInfoWriter) (*PostStatesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostStatesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postStates", + Method: "POST", + PathPattern: "/states", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostStatesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostStatesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postStates: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/geo/v0.0.1/geo_client/tax_rate/get_tax_rate_observable_parameters.go b/api/geo/v0.0.1/geo_client/tax_rate/get_tax_rate_observable_parameters.go new file mode 100644 index 0000000..f9a9510 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/tax_rate/get_tax_rate_observable_parameters.go @@ -0,0 +1,207 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tax_rate + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetTaxRateObservableParams creates a new GetTaxRateObservableParams object +// with the default values initialized. +func NewGetTaxRateObservableParams() *GetTaxRateObservableParams { + var () + return &GetTaxRateObservableParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetTaxRateObservableParamsWithTimeout creates a new GetTaxRateObservableParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetTaxRateObservableParamsWithTimeout(timeout time.Duration) *GetTaxRateObservableParams { + var () + return &GetTaxRateObservableParams{ + + timeout: timeout, + } +} + +// NewGetTaxRateObservableParamsWithContext creates a new GetTaxRateObservableParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetTaxRateObservableParamsWithContext(ctx context.Context) *GetTaxRateObservableParams { + var () + return &GetTaxRateObservableParams{ + + Context: ctx, + } +} + +// NewGetTaxRateObservableParamsWithHTTPClient creates a new GetTaxRateObservableParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetTaxRateObservableParamsWithHTTPClient(client *http.Client) *GetTaxRateObservableParams { + var () + return &GetTaxRateObservableParams{ + HTTPClient: client, + } +} + +/*GetTaxRateObservableParams contains all the parameters to send to the API endpoint +for the get tax rate observable operation typically these are written to a http.Request +*/ +type GetTaxRateObservableParams struct { + + /*CountyID + The ID of this Object + + */ + CountyID *string + /*JournalDate + Journal Entry Date (transaction date), required + + */ + JournalDate string + /*PlaceID + The ID of a Place record + + */ + PlaceID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get tax rate observable params +func (o *GetTaxRateObservableParams) WithTimeout(timeout time.Duration) *GetTaxRateObservableParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get tax rate observable params +func (o *GetTaxRateObservableParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get tax rate observable params +func (o *GetTaxRateObservableParams) WithContext(ctx context.Context) *GetTaxRateObservableParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get tax rate observable params +func (o *GetTaxRateObservableParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get tax rate observable params +func (o *GetTaxRateObservableParams) WithHTTPClient(client *http.Client) *GetTaxRateObservableParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get tax rate observable params +func (o *GetTaxRateObservableParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCountyID adds the countyID to the get tax rate observable params +func (o *GetTaxRateObservableParams) WithCountyID(countyID *string) *GetTaxRateObservableParams { + o.SetCountyID(countyID) + return o +} + +// SetCountyID adds the countyId to the get tax rate observable params +func (o *GetTaxRateObservableParams) SetCountyID(countyID *string) { + o.CountyID = countyID +} + +// WithJournalDate adds the journalDate to the get tax rate observable params +func (o *GetTaxRateObservableParams) WithJournalDate(journalDate string) *GetTaxRateObservableParams { + o.SetJournalDate(journalDate) + return o +} + +// SetJournalDate adds the journalDate to the get tax rate observable params +func (o *GetTaxRateObservableParams) SetJournalDate(journalDate string) { + o.JournalDate = journalDate +} + +// WithPlaceID adds the placeID to the get tax rate observable params +func (o *GetTaxRateObservableParams) WithPlaceID(placeID *string) *GetTaxRateObservableParams { + o.SetPlaceID(placeID) + return o +} + +// SetPlaceID adds the placeId to the get tax rate observable params +func (o *GetTaxRateObservableParams) SetPlaceID(placeID *string) { + o.PlaceID = placeID +} + +// WriteToRequest writes these params to a swagger request +func (o *GetTaxRateObservableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CountyID != nil { + + // query param countyId + var qrCountyID string + if o.CountyID != nil { + qrCountyID = *o.CountyID + } + qCountyID := qrCountyID + if qCountyID != "" { + if err := r.SetQueryParam("countyId", qCountyID); err != nil { + return err + } + } + + } + + // query param journalDate + qrJournalDate := o.JournalDate + qJournalDate := qrJournalDate + if qJournalDate != "" { + if err := r.SetQueryParam("journalDate", qJournalDate); err != nil { + return err + } + } + + if o.PlaceID != nil { + + // query param placeId + var qrPlaceID string + if o.PlaceID != nil { + qrPlaceID = *o.PlaceID + } + qPlaceID := qrPlaceID + if qPlaceID != "" { + if err := r.SetQueryParam("placeId", qPlaceID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/tax_rate/get_tax_rate_observable_responses.go b/api/geo/v0.0.1/geo_client/tax_rate/get_tax_rate_observable_responses.go new file mode 100644 index 0000000..3e4ff41 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/tax_rate/get_tax_rate_observable_responses.go @@ -0,0 +1,301 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tax_rate + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// GetTaxRateObservableReader is a Reader for the GetTaxRateObservable structure. +type GetTaxRateObservableReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetTaxRateObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetTaxRateObservableOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetTaxRateObservableUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetTaxRateObservableForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetTaxRateObservableNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetTaxRateObservableUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetTaxRateObservableInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetTaxRateObservableOK creates a GetTaxRateObservableOK with default headers values +func NewGetTaxRateObservableOK() *GetTaxRateObservableOK { + return &GetTaxRateObservableOK{} +} + +/*GetTaxRateObservableOK handles this case with default header values. + +Observable array response to a tax rate retrieval +*/ +type GetTaxRateObservableOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload []*geo_models.TaxRate +} + +func (o *GetTaxRateObservableOK) Error() string { + return fmt.Sprintf("[GET /taxrates/observable][%d] getTaxRateObservableOK %+v", 200, o.Payload) +} + +func (o *GetTaxRateObservableOK) GetPayload() []*geo_models.TaxRate { + return o.Payload +} + +func (o *GetTaxRateObservableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxRateObservableUnauthorized creates a GetTaxRateObservableUnauthorized with default headers values +func NewGetTaxRateObservableUnauthorized() *GetTaxRateObservableUnauthorized { + return &GetTaxRateObservableUnauthorized{} +} + +/*GetTaxRateObservableUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetTaxRateObservableUnauthorized struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetTaxRateObservableUnauthorized) Error() string { + return fmt.Sprintf("[GET /taxrates/observable][%d] getTaxRateObservableUnauthorized %+v", 401, o.Payload) +} + +func (o *GetTaxRateObservableUnauthorized) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetTaxRateObservableUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxRateObservableForbidden creates a GetTaxRateObservableForbidden with default headers values +func NewGetTaxRateObservableForbidden() *GetTaxRateObservableForbidden { + return &GetTaxRateObservableForbidden{} +} + +/*GetTaxRateObservableForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetTaxRateObservableForbidden struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetTaxRateObservableForbidden) Error() string { + return fmt.Sprintf("[GET /taxrates/observable][%d] getTaxRateObservableForbidden %+v", 403, o.Payload) +} + +func (o *GetTaxRateObservableForbidden) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetTaxRateObservableForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxRateObservableNotFound creates a GetTaxRateObservableNotFound with default headers values +func NewGetTaxRateObservableNotFound() *GetTaxRateObservableNotFound { + return &GetTaxRateObservableNotFound{} +} + +/*GetTaxRateObservableNotFound handles this case with default header values. + +Resource was not found +*/ +type GetTaxRateObservableNotFound struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetTaxRateObservableNotFound) Error() string { + return fmt.Sprintf("[GET /taxrates/observable][%d] getTaxRateObservableNotFound %+v", 404, o.Payload) +} + +func (o *GetTaxRateObservableNotFound) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetTaxRateObservableNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxRateObservableUnprocessableEntity creates a GetTaxRateObservableUnprocessableEntity with default headers values +func NewGetTaxRateObservableUnprocessableEntity() *GetTaxRateObservableUnprocessableEntity { + return &GetTaxRateObservableUnprocessableEntity{} +} + +/*GetTaxRateObservableUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetTaxRateObservableUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetTaxRateObservableUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /taxrates/observable][%d] getTaxRateObservableUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetTaxRateObservableUnprocessableEntity) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetTaxRateObservableUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxRateObservableInternalServerError creates a GetTaxRateObservableInternalServerError with default headers values +func NewGetTaxRateObservableInternalServerError() *GetTaxRateObservableInternalServerError { + return &GetTaxRateObservableInternalServerError{} +} + +/*GetTaxRateObservableInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetTaxRateObservableInternalServerError struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetTaxRateObservableInternalServerError) Error() string { + return fmt.Sprintf("[GET /taxrates/observable][%d] getTaxRateObservableInternalServerError %+v", 500, o.Payload) +} + +func (o *GetTaxRateObservableInternalServerError) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetTaxRateObservableInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/tax_rate/get_tax_rates_parameters.go b/api/geo/v0.0.1/geo_client/tax_rate/get_tax_rates_parameters.go new file mode 100644 index 0000000..1e2b496 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/tax_rate/get_tax_rates_parameters.go @@ -0,0 +1,207 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tax_rate + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetTaxRatesParams creates a new GetTaxRatesParams object +// with the default values initialized. +func NewGetTaxRatesParams() *GetTaxRatesParams { + var () + return &GetTaxRatesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetTaxRatesParamsWithTimeout creates a new GetTaxRatesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetTaxRatesParamsWithTimeout(timeout time.Duration) *GetTaxRatesParams { + var () + return &GetTaxRatesParams{ + + timeout: timeout, + } +} + +// NewGetTaxRatesParamsWithContext creates a new GetTaxRatesParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetTaxRatesParamsWithContext(ctx context.Context) *GetTaxRatesParams { + var () + return &GetTaxRatesParams{ + + Context: ctx, + } +} + +// NewGetTaxRatesParamsWithHTTPClient creates a new GetTaxRatesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetTaxRatesParamsWithHTTPClient(client *http.Client) *GetTaxRatesParams { + var () + return &GetTaxRatesParams{ + HTTPClient: client, + } +} + +/*GetTaxRatesParams contains all the parameters to send to the API endpoint +for the get tax rates operation typically these are written to a http.Request +*/ +type GetTaxRatesParams struct { + + /*CountyID + The ID of this Object + + */ + CountyID *string + /*JournalDate + Journal Entry Date (transaction date), required + + */ + JournalDate string + /*PlaceID + The ID of a Place record + + */ + PlaceID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get tax rates params +func (o *GetTaxRatesParams) WithTimeout(timeout time.Duration) *GetTaxRatesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get tax rates params +func (o *GetTaxRatesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get tax rates params +func (o *GetTaxRatesParams) WithContext(ctx context.Context) *GetTaxRatesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get tax rates params +func (o *GetTaxRatesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get tax rates params +func (o *GetTaxRatesParams) WithHTTPClient(client *http.Client) *GetTaxRatesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get tax rates params +func (o *GetTaxRatesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCountyID adds the countyID to the get tax rates params +func (o *GetTaxRatesParams) WithCountyID(countyID *string) *GetTaxRatesParams { + o.SetCountyID(countyID) + return o +} + +// SetCountyID adds the countyId to the get tax rates params +func (o *GetTaxRatesParams) SetCountyID(countyID *string) { + o.CountyID = countyID +} + +// WithJournalDate adds the journalDate to the get tax rates params +func (o *GetTaxRatesParams) WithJournalDate(journalDate string) *GetTaxRatesParams { + o.SetJournalDate(journalDate) + return o +} + +// SetJournalDate adds the journalDate to the get tax rates params +func (o *GetTaxRatesParams) SetJournalDate(journalDate string) { + o.JournalDate = journalDate +} + +// WithPlaceID adds the placeID to the get tax rates params +func (o *GetTaxRatesParams) WithPlaceID(placeID *string) *GetTaxRatesParams { + o.SetPlaceID(placeID) + return o +} + +// SetPlaceID adds the placeId to the get tax rates params +func (o *GetTaxRatesParams) SetPlaceID(placeID *string) { + o.PlaceID = placeID +} + +// WriteToRequest writes these params to a swagger request +func (o *GetTaxRatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CountyID != nil { + + // query param countyId + var qrCountyID string + if o.CountyID != nil { + qrCountyID = *o.CountyID + } + qCountyID := qrCountyID + if qCountyID != "" { + if err := r.SetQueryParam("countyId", qCountyID); err != nil { + return err + } + } + + } + + // query param journalDate + qrJournalDate := o.JournalDate + qJournalDate := qrJournalDate + if qJournalDate != "" { + if err := r.SetQueryParam("journalDate", qJournalDate); err != nil { + return err + } + } + + if o.PlaceID != nil { + + // query param placeId + var qrPlaceID string + if o.PlaceID != nil { + qrPlaceID = *o.PlaceID + } + qPlaceID := qrPlaceID + if qPlaceID != "" { + if err := r.SetQueryParam("placeId", qPlaceID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/tax_rate/get_tax_rates_responses.go b/api/geo/v0.0.1/geo_client/tax_rate/get_tax_rates_responses.go new file mode 100644 index 0000000..044e217 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/tax_rate/get_tax_rates_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tax_rate + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// GetTaxRatesReader is a Reader for the GetTaxRates structure. +type GetTaxRatesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetTaxRatesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetTaxRatesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetTaxRatesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetTaxRatesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetTaxRatesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetTaxRatesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetTaxRatesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetTaxRatesOK creates a GetTaxRatesOK with default headers values +func NewGetTaxRatesOK() *GetTaxRatesOK { + return &GetTaxRatesOK{} +} + +/*GetTaxRatesOK handles this case with default header values. + +Taxnexus Response with an array of Tax Rate records +*/ +type GetTaxRatesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *geo_models.TaxRateResponse +} + +func (o *GetTaxRatesOK) Error() string { + return fmt.Sprintf("[GET /taxrates][%d] getTaxRatesOK %+v", 200, o.Payload) +} + +func (o *GetTaxRatesOK) GetPayload() *geo_models.TaxRateResponse { + return o.Payload +} + +func (o *GetTaxRatesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(geo_models.TaxRateResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxRatesUnauthorized creates a GetTaxRatesUnauthorized with default headers values +func NewGetTaxRatesUnauthorized() *GetTaxRatesUnauthorized { + return &GetTaxRatesUnauthorized{} +} + +/*GetTaxRatesUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetTaxRatesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetTaxRatesUnauthorized) Error() string { + return fmt.Sprintf("[GET /taxrates][%d] getTaxRatesUnauthorized %+v", 401, o.Payload) +} + +func (o *GetTaxRatesUnauthorized) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetTaxRatesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxRatesForbidden creates a GetTaxRatesForbidden with default headers values +func NewGetTaxRatesForbidden() *GetTaxRatesForbidden { + return &GetTaxRatesForbidden{} +} + +/*GetTaxRatesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetTaxRatesForbidden struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetTaxRatesForbidden) Error() string { + return fmt.Sprintf("[GET /taxrates][%d] getTaxRatesForbidden %+v", 403, o.Payload) +} + +func (o *GetTaxRatesForbidden) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetTaxRatesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxRatesNotFound creates a GetTaxRatesNotFound with default headers values +func NewGetTaxRatesNotFound() *GetTaxRatesNotFound { + return &GetTaxRatesNotFound{} +} + +/*GetTaxRatesNotFound handles this case with default header values. + +Resource was not found +*/ +type GetTaxRatesNotFound struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetTaxRatesNotFound) Error() string { + return fmt.Sprintf("[GET /taxrates][%d] getTaxRatesNotFound %+v", 404, o.Payload) +} + +func (o *GetTaxRatesNotFound) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetTaxRatesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxRatesUnprocessableEntity creates a GetTaxRatesUnprocessableEntity with default headers values +func NewGetTaxRatesUnprocessableEntity() *GetTaxRatesUnprocessableEntity { + return &GetTaxRatesUnprocessableEntity{} +} + +/*GetTaxRatesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetTaxRatesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetTaxRatesUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /taxrates][%d] getTaxRatesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetTaxRatesUnprocessableEntity) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetTaxRatesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxRatesInternalServerError creates a GetTaxRatesInternalServerError with default headers values +func NewGetTaxRatesInternalServerError() *GetTaxRatesInternalServerError { + return &GetTaxRatesInternalServerError{} +} + +/*GetTaxRatesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetTaxRatesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetTaxRatesInternalServerError) Error() string { + return fmt.Sprintf("[GET /taxrates][%d] getTaxRatesInternalServerError %+v", 500, o.Payload) +} + +func (o *GetTaxRatesInternalServerError) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetTaxRatesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/tax_rate/tax_rate_client.go b/api/geo/v0.0.1/geo_client/tax_rate/tax_rate_client.go new file mode 100644 index 0000000..19616c4 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/tax_rate/tax_rate_client.go @@ -0,0 +1,118 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tax_rate + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new tax rate API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for tax rate API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetTaxRateObservable(params *GetTaxRateObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetTaxRateObservableOK, error) + + GetTaxRates(params *GetTaxRatesParams, authInfo runtime.ClientAuthInfoWriter) (*GetTaxRatesOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetTaxRateObservable gets taxrates in an observable array + + Returns a taxrate retrieval in a observable array +*/ +func (a *Client) GetTaxRateObservable(params *GetTaxRateObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetTaxRateObservableOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetTaxRateObservableParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getTaxRateObservable", + Method: "GET", + PathPattern: "/taxrates/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetTaxRateObservableReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetTaxRateObservableOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getTaxRateObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetTaxRates combineds tax rates + + Returns SALES TAX rates based on County or Place ID +*/ +func (a *Client) GetTaxRates(params *GetTaxRatesParams, authInfo runtime.ClientAuthInfoWriter) (*GetTaxRatesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetTaxRatesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getTaxRates", + Method: "GET", + PathPattern: "/taxrates", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetTaxRatesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetTaxRatesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getTaxRates: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/geo/v0.0.1/geo_client/tax_type/get_tax_types_observable_parameters.go b/api/geo/v0.0.1/geo_client/tax_type/get_tax_types_observable_parameters.go new file mode 100644 index 0000000..3ed9a78 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/tax_type/get_tax_types_observable_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tax_type + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetTaxTypesObservableParams creates a new GetTaxTypesObservableParams object +// with the default values initialized. +func NewGetTaxTypesObservableParams() *GetTaxTypesObservableParams { + + return &GetTaxTypesObservableParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetTaxTypesObservableParamsWithTimeout creates a new GetTaxTypesObservableParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetTaxTypesObservableParamsWithTimeout(timeout time.Duration) *GetTaxTypesObservableParams { + + return &GetTaxTypesObservableParams{ + + timeout: timeout, + } +} + +// NewGetTaxTypesObservableParamsWithContext creates a new GetTaxTypesObservableParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetTaxTypesObservableParamsWithContext(ctx context.Context) *GetTaxTypesObservableParams { + + return &GetTaxTypesObservableParams{ + + Context: ctx, + } +} + +// NewGetTaxTypesObservableParamsWithHTTPClient creates a new GetTaxTypesObservableParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetTaxTypesObservableParamsWithHTTPClient(client *http.Client) *GetTaxTypesObservableParams { + + return &GetTaxTypesObservableParams{ + HTTPClient: client, + } +} + +/*GetTaxTypesObservableParams contains all the parameters to send to the API endpoint +for the get tax types observable operation typically these are written to a http.Request +*/ +type GetTaxTypesObservableParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get tax types observable params +func (o *GetTaxTypesObservableParams) WithTimeout(timeout time.Duration) *GetTaxTypesObservableParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get tax types observable params +func (o *GetTaxTypesObservableParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get tax types observable params +func (o *GetTaxTypesObservableParams) WithContext(ctx context.Context) *GetTaxTypesObservableParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get tax types observable params +func (o *GetTaxTypesObservableParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get tax types observable params +func (o *GetTaxTypesObservableParams) WithHTTPClient(client *http.Client) *GetTaxTypesObservableParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get tax types observable params +func (o *GetTaxTypesObservableParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *GetTaxTypesObservableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/tax_type/get_tax_types_observable_responses.go b/api/geo/v0.0.1/geo_client/tax_type/get_tax_types_observable_responses.go new file mode 100644 index 0000000..8617639 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/tax_type/get_tax_types_observable_responses.go @@ -0,0 +1,301 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tax_type + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// GetTaxTypesObservableReader is a Reader for the GetTaxTypesObservable structure. +type GetTaxTypesObservableReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetTaxTypesObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetTaxTypesObservableOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetTaxTypesObservableUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetTaxTypesObservableForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetTaxTypesObservableNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetTaxTypesObservableUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetTaxTypesObservableInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetTaxTypesObservableOK creates a GetTaxTypesObservableOK with default headers values +func NewGetTaxTypesObservableOK() *GetTaxTypesObservableOK { + return &GetTaxTypesObservableOK{} +} + +/*GetTaxTypesObservableOK handles this case with default header values. + +Observable array response to a taxtype retrieval +*/ +type GetTaxTypesObservableOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload []*geo_models.TaxType +} + +func (o *GetTaxTypesObservableOK) Error() string { + return fmt.Sprintf("[GET /taxtypes/observable][%d] getTaxTypesObservableOK %+v", 200, o.Payload) +} + +func (o *GetTaxTypesObservableOK) GetPayload() []*geo_models.TaxType { + return o.Payload +} + +func (o *GetTaxTypesObservableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxTypesObservableUnauthorized creates a GetTaxTypesObservableUnauthorized with default headers values +func NewGetTaxTypesObservableUnauthorized() *GetTaxTypesObservableUnauthorized { + return &GetTaxTypesObservableUnauthorized{} +} + +/*GetTaxTypesObservableUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetTaxTypesObservableUnauthorized struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetTaxTypesObservableUnauthorized) Error() string { + return fmt.Sprintf("[GET /taxtypes/observable][%d] getTaxTypesObservableUnauthorized %+v", 401, o.Payload) +} + +func (o *GetTaxTypesObservableUnauthorized) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetTaxTypesObservableUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxTypesObservableForbidden creates a GetTaxTypesObservableForbidden with default headers values +func NewGetTaxTypesObservableForbidden() *GetTaxTypesObservableForbidden { + return &GetTaxTypesObservableForbidden{} +} + +/*GetTaxTypesObservableForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetTaxTypesObservableForbidden struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetTaxTypesObservableForbidden) Error() string { + return fmt.Sprintf("[GET /taxtypes/observable][%d] getTaxTypesObservableForbidden %+v", 403, o.Payload) +} + +func (o *GetTaxTypesObservableForbidden) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetTaxTypesObservableForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxTypesObservableNotFound creates a GetTaxTypesObservableNotFound with default headers values +func NewGetTaxTypesObservableNotFound() *GetTaxTypesObservableNotFound { + return &GetTaxTypesObservableNotFound{} +} + +/*GetTaxTypesObservableNotFound handles this case with default header values. + +Resource was not found +*/ +type GetTaxTypesObservableNotFound struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetTaxTypesObservableNotFound) Error() string { + return fmt.Sprintf("[GET /taxtypes/observable][%d] getTaxTypesObservableNotFound %+v", 404, o.Payload) +} + +func (o *GetTaxTypesObservableNotFound) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetTaxTypesObservableNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxTypesObservableUnprocessableEntity creates a GetTaxTypesObservableUnprocessableEntity with default headers values +func NewGetTaxTypesObservableUnprocessableEntity() *GetTaxTypesObservableUnprocessableEntity { + return &GetTaxTypesObservableUnprocessableEntity{} +} + +/*GetTaxTypesObservableUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetTaxTypesObservableUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetTaxTypesObservableUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /taxtypes/observable][%d] getTaxTypesObservableUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetTaxTypesObservableUnprocessableEntity) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetTaxTypesObservableUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxTypesObservableInternalServerError creates a GetTaxTypesObservableInternalServerError with default headers values +func NewGetTaxTypesObservableInternalServerError() *GetTaxTypesObservableInternalServerError { + return &GetTaxTypesObservableInternalServerError{} +} + +/*GetTaxTypesObservableInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetTaxTypesObservableInternalServerError struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetTaxTypesObservableInternalServerError) Error() string { + return fmt.Sprintf("[GET /taxtypes/observable][%d] getTaxTypesObservableInternalServerError %+v", 500, o.Payload) +} + +func (o *GetTaxTypesObservableInternalServerError) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetTaxTypesObservableInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/tax_type/get_tax_types_parameters.go b/api/geo/v0.0.1/geo_client/tax_type/get_tax_types_parameters.go new file mode 100644 index 0000000..4eebf40 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/tax_type/get_tax_types_parameters.go @@ -0,0 +1,471 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tax_type + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetTaxTypesParams creates a new GetTaxTypesParams object +// with the default values initialized. +func NewGetTaxTypesParams() *GetTaxTypesParams { + var () + return &GetTaxTypesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetTaxTypesParamsWithTimeout creates a new GetTaxTypesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetTaxTypesParamsWithTimeout(timeout time.Duration) *GetTaxTypesParams { + var () + return &GetTaxTypesParams{ + + timeout: timeout, + } +} + +// NewGetTaxTypesParamsWithContext creates a new GetTaxTypesParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetTaxTypesParamsWithContext(ctx context.Context) *GetTaxTypesParams { + var () + return &GetTaxTypesParams{ + + Context: ctx, + } +} + +// NewGetTaxTypesParamsWithHTTPClient creates a new GetTaxTypesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetTaxTypesParamsWithHTTPClient(client *http.Client) *GetTaxTypesParams { + var () + return &GetTaxTypesParams{ + HTTPClient: client, + } +} + +/*GetTaxTypesParams contains all the parameters to send to the API endpoint +for the get tax types operation typically these are written to a http.Request +*/ +type GetTaxTypesParams struct { + + /*Active + Retrieve only active records? + + */ + Active *bool + /*Address + Postal Address URL encoded; partial addresses allowed + + */ + Address *string + /*CountryCode + The Country abbreviation (2 char) + + */ + CountryCode *string + /*County + The County Name + + */ + County *string + /*Date + Transaction date (defaults to current) + + */ + Date *string + /*Ids + Taxnexus Record Ids of the Tax Types in a JSON array url encoded + + */ + Ids *string + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + /*Place + The City name (must be accompanied by State) + + */ + Place *string + /*State + The State or Province abbreviation (2 char) + + */ + State *string + /*TaxTypeID + Taxnexus Record Id of the Tax Type + + */ + TaxTypeID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get tax types params +func (o *GetTaxTypesParams) WithTimeout(timeout time.Duration) *GetTaxTypesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get tax types params +func (o *GetTaxTypesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get tax types params +func (o *GetTaxTypesParams) WithContext(ctx context.Context) *GetTaxTypesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get tax types params +func (o *GetTaxTypesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get tax types params +func (o *GetTaxTypesParams) WithHTTPClient(client *http.Client) *GetTaxTypesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get tax types params +func (o *GetTaxTypesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithActive adds the active to the get tax types params +func (o *GetTaxTypesParams) WithActive(active *bool) *GetTaxTypesParams { + o.SetActive(active) + return o +} + +// SetActive adds the active to the get tax types params +func (o *GetTaxTypesParams) SetActive(active *bool) { + o.Active = active +} + +// WithAddress adds the address to the get tax types params +func (o *GetTaxTypesParams) WithAddress(address *string) *GetTaxTypesParams { + o.SetAddress(address) + return o +} + +// SetAddress adds the address to the get tax types params +func (o *GetTaxTypesParams) SetAddress(address *string) { + o.Address = address +} + +// WithCountryCode adds the countryCode to the get tax types params +func (o *GetTaxTypesParams) WithCountryCode(countryCode *string) *GetTaxTypesParams { + o.SetCountryCode(countryCode) + return o +} + +// SetCountryCode adds the countryCode to the get tax types params +func (o *GetTaxTypesParams) SetCountryCode(countryCode *string) { + o.CountryCode = countryCode +} + +// WithCounty adds the county to the get tax types params +func (o *GetTaxTypesParams) WithCounty(county *string) *GetTaxTypesParams { + o.SetCounty(county) + return o +} + +// SetCounty adds the county to the get tax types params +func (o *GetTaxTypesParams) SetCounty(county *string) { + o.County = county +} + +// WithDate adds the date to the get tax types params +func (o *GetTaxTypesParams) WithDate(date *string) *GetTaxTypesParams { + o.SetDate(date) + return o +} + +// SetDate adds the date to the get tax types params +func (o *GetTaxTypesParams) SetDate(date *string) { + o.Date = date +} + +// WithIds adds the ids to the get tax types params +func (o *GetTaxTypesParams) WithIds(ids *string) *GetTaxTypesParams { + o.SetIds(ids) + return o +} + +// SetIds adds the ids to the get tax types params +func (o *GetTaxTypesParams) SetIds(ids *string) { + o.Ids = ids +} + +// WithLimit adds the limit to the get tax types params +func (o *GetTaxTypesParams) WithLimit(limit *int64) *GetTaxTypesParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get tax types params +func (o *GetTaxTypesParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get tax types params +func (o *GetTaxTypesParams) WithOffset(offset *int64) *GetTaxTypesParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get tax types params +func (o *GetTaxTypesParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithPlace adds the place to the get tax types params +func (o *GetTaxTypesParams) WithPlace(place *string) *GetTaxTypesParams { + o.SetPlace(place) + return o +} + +// SetPlace adds the place to the get tax types params +func (o *GetTaxTypesParams) SetPlace(place *string) { + o.Place = place +} + +// WithState adds the state to the get tax types params +func (o *GetTaxTypesParams) WithState(state *string) *GetTaxTypesParams { + o.SetState(state) + return o +} + +// SetState adds the state to the get tax types params +func (o *GetTaxTypesParams) SetState(state *string) { + o.State = state +} + +// WithTaxTypeID adds the taxTypeID to the get tax types params +func (o *GetTaxTypesParams) WithTaxTypeID(taxTypeID *string) *GetTaxTypesParams { + o.SetTaxTypeID(taxTypeID) + return o +} + +// SetTaxTypeID adds the taxTypeId to the get tax types params +func (o *GetTaxTypesParams) SetTaxTypeID(taxTypeID *string) { + o.TaxTypeID = taxTypeID +} + +// WriteToRequest writes these params to a swagger request +func (o *GetTaxTypesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Active != nil { + + // query param active + var qrActive bool + if o.Active != nil { + qrActive = *o.Active + } + qActive := swag.FormatBool(qrActive) + if qActive != "" { + if err := r.SetQueryParam("active", qActive); err != nil { + return err + } + } + + } + + if o.Address != nil { + + // query param address + var qrAddress string + if o.Address != nil { + qrAddress = *o.Address + } + qAddress := qrAddress + if qAddress != "" { + if err := r.SetQueryParam("address", qAddress); err != nil { + return err + } + } + + } + + if o.CountryCode != nil { + + // query param countryCode + var qrCountryCode string + if o.CountryCode != nil { + qrCountryCode = *o.CountryCode + } + qCountryCode := qrCountryCode + if qCountryCode != "" { + if err := r.SetQueryParam("countryCode", qCountryCode); err != nil { + return err + } + } + + } + + if o.County != nil { + + // query param county + var qrCounty string + if o.County != nil { + qrCounty = *o.County + } + qCounty := qrCounty + if qCounty != "" { + if err := r.SetQueryParam("county", qCounty); err != nil { + return err + } + } + + } + + if o.Date != nil { + + // query param date + var qrDate string + if o.Date != nil { + qrDate = *o.Date + } + qDate := qrDate + if qDate != "" { + if err := r.SetQueryParam("date", qDate); err != nil { + return err + } + } + + } + + if o.Ids != nil { + + // query param ids + var qrIds string + if o.Ids != nil { + qrIds = *o.Ids + } + qIds := qrIds + if qIds != "" { + if err := r.SetQueryParam("ids", qIds); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.Place != nil { + + // query param place + var qrPlace string + if o.Place != nil { + qrPlace = *o.Place + } + qPlace := qrPlace + if qPlace != "" { + if err := r.SetQueryParam("place", qPlace); err != nil { + return err + } + } + + } + + if o.State != nil { + + // query param state + var qrState string + if o.State != nil { + qrState = *o.State + } + qState := qrState + if qState != "" { + if err := r.SetQueryParam("state", qState); err != nil { + return err + } + } + + } + + if o.TaxTypeID != nil { + + // query param taxTypeId + var qrTaxTypeID string + if o.TaxTypeID != nil { + qrTaxTypeID = *o.TaxTypeID + } + qTaxTypeID := qrTaxTypeID + if qTaxTypeID != "" { + if err := r.SetQueryParam("taxTypeId", qTaxTypeID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/tax_type/get_tax_types_responses.go b/api/geo/v0.0.1/geo_client/tax_type/get_tax_types_responses.go new file mode 100644 index 0000000..957a773 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/tax_type/get_tax_types_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tax_type + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// GetTaxTypesReader is a Reader for the GetTaxTypes structure. +type GetTaxTypesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetTaxTypesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetTaxTypesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetTaxTypesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetTaxTypesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetTaxTypesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetTaxTypesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetTaxTypesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetTaxTypesOK creates a GetTaxTypesOK with default headers values +func NewGetTaxTypesOK() *GetTaxTypesOK { + return &GetTaxTypesOK{} +} + +/*GetTaxTypesOK handles this case with default header values. + +Taxnexus Response with an array of Tax Type objects +*/ +type GetTaxTypesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *geo_models.TaxTypeResponse +} + +func (o *GetTaxTypesOK) Error() string { + return fmt.Sprintf("[GET /taxtypes][%d] getTaxTypesOK %+v", 200, o.Payload) +} + +func (o *GetTaxTypesOK) GetPayload() *geo_models.TaxTypeResponse { + return o.Payload +} + +func (o *GetTaxTypesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(geo_models.TaxTypeResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxTypesUnauthorized creates a GetTaxTypesUnauthorized with default headers values +func NewGetTaxTypesUnauthorized() *GetTaxTypesUnauthorized { + return &GetTaxTypesUnauthorized{} +} + +/*GetTaxTypesUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetTaxTypesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetTaxTypesUnauthorized) Error() string { + return fmt.Sprintf("[GET /taxtypes][%d] getTaxTypesUnauthorized %+v", 401, o.Payload) +} + +func (o *GetTaxTypesUnauthorized) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetTaxTypesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxTypesForbidden creates a GetTaxTypesForbidden with default headers values +func NewGetTaxTypesForbidden() *GetTaxTypesForbidden { + return &GetTaxTypesForbidden{} +} + +/*GetTaxTypesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetTaxTypesForbidden struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetTaxTypesForbidden) Error() string { + return fmt.Sprintf("[GET /taxtypes][%d] getTaxTypesForbidden %+v", 403, o.Payload) +} + +func (o *GetTaxTypesForbidden) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetTaxTypesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxTypesNotFound creates a GetTaxTypesNotFound with default headers values +func NewGetTaxTypesNotFound() *GetTaxTypesNotFound { + return &GetTaxTypesNotFound{} +} + +/*GetTaxTypesNotFound handles this case with default header values. + +Resource was not found +*/ +type GetTaxTypesNotFound struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetTaxTypesNotFound) Error() string { + return fmt.Sprintf("[GET /taxtypes][%d] getTaxTypesNotFound %+v", 404, o.Payload) +} + +func (o *GetTaxTypesNotFound) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetTaxTypesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxTypesUnprocessableEntity creates a GetTaxTypesUnprocessableEntity with default headers values +func NewGetTaxTypesUnprocessableEntity() *GetTaxTypesUnprocessableEntity { + return &GetTaxTypesUnprocessableEntity{} +} + +/*GetTaxTypesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetTaxTypesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetTaxTypesUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /taxtypes][%d] getTaxTypesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetTaxTypesUnprocessableEntity) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetTaxTypesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxTypesInternalServerError creates a GetTaxTypesInternalServerError with default headers values +func NewGetTaxTypesInternalServerError() *GetTaxTypesInternalServerError { + return &GetTaxTypesInternalServerError{} +} + +/*GetTaxTypesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetTaxTypesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetTaxTypesInternalServerError) Error() string { + return fmt.Sprintf("[GET /taxtypes][%d] getTaxTypesInternalServerError %+v", 500, o.Payload) +} + +func (o *GetTaxTypesInternalServerError) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetTaxTypesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/tax_type/post_tax_types_parameters.go b/api/geo/v0.0.1/geo_client/tax_type/post_tax_types_parameters.go new file mode 100644 index 0000000..7b94561 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/tax_type/post_tax_types_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tax_type + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// NewPostTaxTypesParams creates a new PostTaxTypesParams object +// with the default values initialized. +func NewPostTaxTypesParams() *PostTaxTypesParams { + var () + return &PostTaxTypesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostTaxTypesParamsWithTimeout creates a new PostTaxTypesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostTaxTypesParamsWithTimeout(timeout time.Duration) *PostTaxTypesParams { + var () + return &PostTaxTypesParams{ + + timeout: timeout, + } +} + +// NewPostTaxTypesParamsWithContext creates a new PostTaxTypesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostTaxTypesParamsWithContext(ctx context.Context) *PostTaxTypesParams { + var () + return &PostTaxTypesParams{ + + Context: ctx, + } +} + +// NewPostTaxTypesParamsWithHTTPClient creates a new PostTaxTypesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostTaxTypesParamsWithHTTPClient(client *http.Client) *PostTaxTypesParams { + var () + return &PostTaxTypesParams{ + HTTPClient: client, + } +} + +/*PostTaxTypesParams contains all the parameters to send to the API endpoint +for the post tax types operation typically these are written to a http.Request +*/ +type PostTaxTypesParams struct { + + /*TaxTypeRequest + The new Places request package + + */ + TaxTypeRequest *geo_models.TaxTypeRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post tax types params +func (o *PostTaxTypesParams) WithTimeout(timeout time.Duration) *PostTaxTypesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post tax types params +func (o *PostTaxTypesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post tax types params +func (o *PostTaxTypesParams) WithContext(ctx context.Context) *PostTaxTypesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post tax types params +func (o *PostTaxTypesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post tax types params +func (o *PostTaxTypesParams) WithHTTPClient(client *http.Client) *PostTaxTypesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post tax types params +func (o *PostTaxTypesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTaxTypeRequest adds the taxTypeRequest to the post tax types params +func (o *PostTaxTypesParams) WithTaxTypeRequest(taxTypeRequest *geo_models.TaxTypeRequest) *PostTaxTypesParams { + o.SetTaxTypeRequest(taxTypeRequest) + return o +} + +// SetTaxTypeRequest adds the taxTypeRequest to the post tax types params +func (o *PostTaxTypesParams) SetTaxTypeRequest(taxTypeRequest *geo_models.TaxTypeRequest) { + o.TaxTypeRequest = taxTypeRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostTaxTypesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.TaxTypeRequest != nil { + if err := r.SetBodyParam(o.TaxTypeRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/tax_type/post_tax_types_responses.go b/api/geo/v0.0.1/geo_client/tax_type/post_tax_types_responses.go new file mode 100644 index 0000000..3031240 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/tax_type/post_tax_types_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tax_type + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// PostTaxTypesReader is a Reader for the PostTaxTypes structure. +type PostTaxTypesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostTaxTypesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostTaxTypesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostTaxTypesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostTaxTypesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostTaxTypesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostTaxTypesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostTaxTypesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostTaxTypesOK creates a PostTaxTypesOK with default headers values +func NewPostTaxTypesOK() *PostTaxTypesOK { + return &PostTaxTypesOK{} +} + +/*PostTaxTypesOK handles this case with default header values. + +Taxnexus Response with an array of Tax Type objects +*/ +type PostTaxTypesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *geo_models.TaxTypeResponse +} + +func (o *PostTaxTypesOK) Error() string { + return fmt.Sprintf("[POST /taxtypes][%d] postTaxTypesOK %+v", 200, o.Payload) +} + +func (o *PostTaxTypesOK) GetPayload() *geo_models.TaxTypeResponse { + return o.Payload +} + +func (o *PostTaxTypesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(geo_models.TaxTypeResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxTypesUnauthorized creates a PostTaxTypesUnauthorized with default headers values +func NewPostTaxTypesUnauthorized() *PostTaxTypesUnauthorized { + return &PostTaxTypesUnauthorized{} +} + +/*PostTaxTypesUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PostTaxTypesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostTaxTypesUnauthorized) Error() string { + return fmt.Sprintf("[POST /taxtypes][%d] postTaxTypesUnauthorized %+v", 401, o.Payload) +} + +func (o *PostTaxTypesUnauthorized) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostTaxTypesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxTypesForbidden creates a PostTaxTypesForbidden with default headers values +func NewPostTaxTypesForbidden() *PostTaxTypesForbidden { + return &PostTaxTypesForbidden{} +} + +/*PostTaxTypesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostTaxTypesForbidden struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostTaxTypesForbidden) Error() string { + return fmt.Sprintf("[POST /taxtypes][%d] postTaxTypesForbidden %+v", 403, o.Payload) +} + +func (o *PostTaxTypesForbidden) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostTaxTypesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxTypesNotFound creates a PostTaxTypesNotFound with default headers values +func NewPostTaxTypesNotFound() *PostTaxTypesNotFound { + return &PostTaxTypesNotFound{} +} + +/*PostTaxTypesNotFound handles this case with default header values. + +Resource was not found +*/ +type PostTaxTypesNotFound struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostTaxTypesNotFound) Error() string { + return fmt.Sprintf("[POST /taxtypes][%d] postTaxTypesNotFound %+v", 404, o.Payload) +} + +func (o *PostTaxTypesNotFound) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostTaxTypesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxTypesUnprocessableEntity creates a PostTaxTypesUnprocessableEntity with default headers values +func NewPostTaxTypesUnprocessableEntity() *PostTaxTypesUnprocessableEntity { + return &PostTaxTypesUnprocessableEntity{} +} + +/*PostTaxTypesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostTaxTypesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostTaxTypesUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /taxtypes][%d] postTaxTypesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostTaxTypesUnprocessableEntity) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostTaxTypesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxTypesInternalServerError creates a PostTaxTypesInternalServerError with default headers values +func NewPostTaxTypesInternalServerError() *PostTaxTypesInternalServerError { + return &PostTaxTypesInternalServerError{} +} + +/*PostTaxTypesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostTaxTypesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostTaxTypesInternalServerError) Error() string { + return fmt.Sprintf("[POST /taxtypes][%d] postTaxTypesInternalServerError %+v", 500, o.Payload) +} + +func (o *PostTaxTypesInternalServerError) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostTaxTypesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/tax_type/tax_type_client.go b/api/geo/v0.0.1/geo_client/tax_type/tax_type_client.go new file mode 100644 index 0000000..a39b49c --- /dev/null +++ b/api/geo/v0.0.1/geo_client/tax_type/tax_type_client.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tax_type + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new tax type API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for tax type API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetTaxTypes(params *GetTaxTypesParams, authInfo runtime.ClientAuthInfoWriter) (*GetTaxTypesOK, error) + + GetTaxTypesObservable(params *GetTaxTypesObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetTaxTypesObservableOK, error) + + PostTaxTypes(params *PostTaxTypesParams, authInfo runtime.ClientAuthInfoWriter) (*PostTaxTypesOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetTaxTypes gets a list of tax types + + Return a list of tax types +*/ +func (a *Client) GetTaxTypes(params *GetTaxTypesParams, authInfo runtime.ClientAuthInfoWriter) (*GetTaxTypesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetTaxTypesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getTaxTypes", + Method: "GET", + PathPattern: "/taxtypes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetTaxTypesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetTaxTypesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getTaxTypes: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetTaxTypesObservable gets taxtypes in an observable array + + Returns a taxtype retrieval in a observable array +*/ +func (a *Client) GetTaxTypesObservable(params *GetTaxTypesObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetTaxTypesObservableOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetTaxTypesObservableParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getTaxTypesObservable", + Method: "GET", + PathPattern: "/taxtypes/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetTaxTypesObservableReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetTaxTypesObservableOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getTaxTypesObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostTaxTypes stores new tax type records + + Store a batch of new TaxType records +*/ +func (a *Client) PostTaxTypes(params *PostTaxTypesParams, authInfo runtime.ClientAuthInfoWriter) (*PostTaxTypesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostTaxTypesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postTaxTypes", + Method: "POST", + PathPattern: "/taxtypes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostTaxTypesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostTaxTypesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postTaxTypes: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/geo/v0.0.1/geo_client/taxnexus_code/get_taxnexus_code_observable_parameters.go b/api/geo/v0.0.1/geo_client/taxnexus_code/get_taxnexus_code_observable_parameters.go new file mode 100644 index 0000000..af36d7d --- /dev/null +++ b/api/geo/v0.0.1/geo_client/taxnexus_code/get_taxnexus_code_observable_parameters.go @@ -0,0 +1,214 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package taxnexus_code + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetTaxnexusCodeObservableParams creates a new GetTaxnexusCodeObservableParams object +// with the default values initialized. +func NewGetTaxnexusCodeObservableParams() *GetTaxnexusCodeObservableParams { + var () + return &GetTaxnexusCodeObservableParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetTaxnexusCodeObservableParamsWithTimeout creates a new GetTaxnexusCodeObservableParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetTaxnexusCodeObservableParamsWithTimeout(timeout time.Duration) *GetTaxnexusCodeObservableParams { + var () + return &GetTaxnexusCodeObservableParams{ + + timeout: timeout, + } +} + +// NewGetTaxnexusCodeObservableParamsWithContext creates a new GetTaxnexusCodeObservableParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetTaxnexusCodeObservableParamsWithContext(ctx context.Context) *GetTaxnexusCodeObservableParams { + var () + return &GetTaxnexusCodeObservableParams{ + + Context: ctx, + } +} + +// NewGetTaxnexusCodeObservableParamsWithHTTPClient creates a new GetTaxnexusCodeObservableParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetTaxnexusCodeObservableParamsWithHTTPClient(client *http.Client) *GetTaxnexusCodeObservableParams { + var () + return &GetTaxnexusCodeObservableParams{ + HTTPClient: client, + } +} + +/*GetTaxnexusCodeObservableParams contains all the parameters to send to the API endpoint +for the get taxnexus code observable operation typically these are written to a http.Request +*/ +type GetTaxnexusCodeObservableParams struct { + + /*StateID + The ID of this Object + + */ + StateID *string + /*CountryCode + The Country abbreviation (2 char) + + */ + CountryCode *string + /*Geocode + The Geocode of this Place record + + */ + Geocode *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get taxnexus code observable params +func (o *GetTaxnexusCodeObservableParams) WithTimeout(timeout time.Duration) *GetTaxnexusCodeObservableParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get taxnexus code observable params +func (o *GetTaxnexusCodeObservableParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get taxnexus code observable params +func (o *GetTaxnexusCodeObservableParams) WithContext(ctx context.Context) *GetTaxnexusCodeObservableParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get taxnexus code observable params +func (o *GetTaxnexusCodeObservableParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get taxnexus code observable params +func (o *GetTaxnexusCodeObservableParams) WithHTTPClient(client *http.Client) *GetTaxnexusCodeObservableParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get taxnexus code observable params +func (o *GetTaxnexusCodeObservableParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithStateID adds the stateID to the get taxnexus code observable params +func (o *GetTaxnexusCodeObservableParams) WithStateID(stateID *string) *GetTaxnexusCodeObservableParams { + o.SetStateID(stateID) + return o +} + +// SetStateID adds the stateId to the get taxnexus code observable params +func (o *GetTaxnexusCodeObservableParams) SetStateID(stateID *string) { + o.StateID = stateID +} + +// WithCountryCode adds the countryCode to the get taxnexus code observable params +func (o *GetTaxnexusCodeObservableParams) WithCountryCode(countryCode *string) *GetTaxnexusCodeObservableParams { + o.SetCountryCode(countryCode) + return o +} + +// SetCountryCode adds the countryCode to the get taxnexus code observable params +func (o *GetTaxnexusCodeObservableParams) SetCountryCode(countryCode *string) { + o.CountryCode = countryCode +} + +// WithGeocode adds the geocode to the get taxnexus code observable params +func (o *GetTaxnexusCodeObservableParams) WithGeocode(geocode *string) *GetTaxnexusCodeObservableParams { + o.SetGeocode(geocode) + return o +} + +// SetGeocode adds the geocode to the get taxnexus code observable params +func (o *GetTaxnexusCodeObservableParams) SetGeocode(geocode *string) { + o.Geocode = geocode +} + +// WriteToRequest writes these params to a swagger request +func (o *GetTaxnexusCodeObservableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.StateID != nil { + + // query param StateID + var qrStateID string + if o.StateID != nil { + qrStateID = *o.StateID + } + qStateID := qrStateID + if qStateID != "" { + if err := r.SetQueryParam("StateID", qStateID); err != nil { + return err + } + } + + } + + if o.CountryCode != nil { + + // query param countryCode + var qrCountryCode string + if o.CountryCode != nil { + qrCountryCode = *o.CountryCode + } + qCountryCode := qrCountryCode + if qCountryCode != "" { + if err := r.SetQueryParam("countryCode", qCountryCode); err != nil { + return err + } + } + + } + + if o.Geocode != nil { + + // query param geocode + var qrGeocode string + if o.Geocode != nil { + qrGeocode = *o.Geocode + } + qGeocode := qrGeocode + if qGeocode != "" { + if err := r.SetQueryParam("geocode", qGeocode); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/taxnexus_code/get_taxnexus_code_observable_responses.go b/api/geo/v0.0.1/geo_client/taxnexus_code/get_taxnexus_code_observable_responses.go new file mode 100644 index 0000000..d1e6fc8 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/taxnexus_code/get_taxnexus_code_observable_responses.go @@ -0,0 +1,301 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package taxnexus_code + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// GetTaxnexusCodeObservableReader is a Reader for the GetTaxnexusCodeObservable structure. +type GetTaxnexusCodeObservableReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetTaxnexusCodeObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetTaxnexusCodeObservableOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetTaxnexusCodeObservableUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetTaxnexusCodeObservableForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetTaxnexusCodeObservableNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetTaxnexusCodeObservableUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetTaxnexusCodeObservableInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetTaxnexusCodeObservableOK creates a GetTaxnexusCodeObservableOK with default headers values +func NewGetTaxnexusCodeObservableOK() *GetTaxnexusCodeObservableOK { + return &GetTaxnexusCodeObservableOK{} +} + +/*GetTaxnexusCodeObservableOK handles this case with default header values. + +Observable array response to a Taxnexus Code retrieval +*/ +type GetTaxnexusCodeObservableOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload []*geo_models.TaxnexusCode +} + +func (o *GetTaxnexusCodeObservableOK) Error() string { + return fmt.Sprintf("[GET /taxnexuscodes/observable][%d] getTaxnexusCodeObservableOK %+v", 200, o.Payload) +} + +func (o *GetTaxnexusCodeObservableOK) GetPayload() []*geo_models.TaxnexusCode { + return o.Payload +} + +func (o *GetTaxnexusCodeObservableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxnexusCodeObservableUnauthorized creates a GetTaxnexusCodeObservableUnauthorized with default headers values +func NewGetTaxnexusCodeObservableUnauthorized() *GetTaxnexusCodeObservableUnauthorized { + return &GetTaxnexusCodeObservableUnauthorized{} +} + +/*GetTaxnexusCodeObservableUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetTaxnexusCodeObservableUnauthorized struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetTaxnexusCodeObservableUnauthorized) Error() string { + return fmt.Sprintf("[GET /taxnexuscodes/observable][%d] getTaxnexusCodeObservableUnauthorized %+v", 401, o.Payload) +} + +func (o *GetTaxnexusCodeObservableUnauthorized) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetTaxnexusCodeObservableUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxnexusCodeObservableForbidden creates a GetTaxnexusCodeObservableForbidden with default headers values +func NewGetTaxnexusCodeObservableForbidden() *GetTaxnexusCodeObservableForbidden { + return &GetTaxnexusCodeObservableForbidden{} +} + +/*GetTaxnexusCodeObservableForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetTaxnexusCodeObservableForbidden struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetTaxnexusCodeObservableForbidden) Error() string { + return fmt.Sprintf("[GET /taxnexuscodes/observable][%d] getTaxnexusCodeObservableForbidden %+v", 403, o.Payload) +} + +func (o *GetTaxnexusCodeObservableForbidden) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetTaxnexusCodeObservableForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxnexusCodeObservableNotFound creates a GetTaxnexusCodeObservableNotFound with default headers values +func NewGetTaxnexusCodeObservableNotFound() *GetTaxnexusCodeObservableNotFound { + return &GetTaxnexusCodeObservableNotFound{} +} + +/*GetTaxnexusCodeObservableNotFound handles this case with default header values. + +Resource was not found +*/ +type GetTaxnexusCodeObservableNotFound struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetTaxnexusCodeObservableNotFound) Error() string { + return fmt.Sprintf("[GET /taxnexuscodes/observable][%d] getTaxnexusCodeObservableNotFound %+v", 404, o.Payload) +} + +func (o *GetTaxnexusCodeObservableNotFound) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetTaxnexusCodeObservableNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxnexusCodeObservableUnprocessableEntity creates a GetTaxnexusCodeObservableUnprocessableEntity with default headers values +func NewGetTaxnexusCodeObservableUnprocessableEntity() *GetTaxnexusCodeObservableUnprocessableEntity { + return &GetTaxnexusCodeObservableUnprocessableEntity{} +} + +/*GetTaxnexusCodeObservableUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetTaxnexusCodeObservableUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetTaxnexusCodeObservableUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /taxnexuscodes/observable][%d] getTaxnexusCodeObservableUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetTaxnexusCodeObservableUnprocessableEntity) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetTaxnexusCodeObservableUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxnexusCodeObservableInternalServerError creates a GetTaxnexusCodeObservableInternalServerError with default headers values +func NewGetTaxnexusCodeObservableInternalServerError() *GetTaxnexusCodeObservableInternalServerError { + return &GetTaxnexusCodeObservableInternalServerError{} +} + +/*GetTaxnexusCodeObservableInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetTaxnexusCodeObservableInternalServerError struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetTaxnexusCodeObservableInternalServerError) Error() string { + return fmt.Sprintf("[GET /taxnexuscodes/observable][%d] getTaxnexusCodeObservableInternalServerError %+v", 500, o.Payload) +} + +func (o *GetTaxnexusCodeObservableInternalServerError) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetTaxnexusCodeObservableInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/taxnexus_code/get_taxnexus_codes_parameters.go b/api/geo/v0.0.1/geo_client/taxnexus_code/get_taxnexus_codes_parameters.go new file mode 100644 index 0000000..eb852a7 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/taxnexus_code/get_taxnexus_codes_parameters.go @@ -0,0 +1,215 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package taxnexus_code + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetTaxnexusCodesParams creates a new GetTaxnexusCodesParams object +// with the default values initialized. +func NewGetTaxnexusCodesParams() *GetTaxnexusCodesParams { + var () + return &GetTaxnexusCodesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetTaxnexusCodesParamsWithTimeout creates a new GetTaxnexusCodesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetTaxnexusCodesParamsWithTimeout(timeout time.Duration) *GetTaxnexusCodesParams { + var () + return &GetTaxnexusCodesParams{ + + timeout: timeout, + } +} + +// NewGetTaxnexusCodesParamsWithContext creates a new GetTaxnexusCodesParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetTaxnexusCodesParamsWithContext(ctx context.Context) *GetTaxnexusCodesParams { + var () + return &GetTaxnexusCodesParams{ + + Context: ctx, + } +} + +// NewGetTaxnexusCodesParamsWithHTTPClient creates a new GetTaxnexusCodesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetTaxnexusCodesParamsWithHTTPClient(client *http.Client) *GetTaxnexusCodesParams { + var () + return &GetTaxnexusCodesParams{ + HTTPClient: client, + } +} + +/*GetTaxnexusCodesParams contains all the parameters to send to the API endpoint +for the get taxnexus codes operation typically these are written to a http.Request +*/ +type GetTaxnexusCodesParams struct { + + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + /*TaxnexusCodeID + Taxnexus Code ID + + */ + TaxnexusCodeID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get taxnexus codes params +func (o *GetTaxnexusCodesParams) WithTimeout(timeout time.Duration) *GetTaxnexusCodesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get taxnexus codes params +func (o *GetTaxnexusCodesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get taxnexus codes params +func (o *GetTaxnexusCodesParams) WithContext(ctx context.Context) *GetTaxnexusCodesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get taxnexus codes params +func (o *GetTaxnexusCodesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get taxnexus codes params +func (o *GetTaxnexusCodesParams) WithHTTPClient(client *http.Client) *GetTaxnexusCodesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get taxnexus codes params +func (o *GetTaxnexusCodesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithLimit adds the limit to the get taxnexus codes params +func (o *GetTaxnexusCodesParams) WithLimit(limit *int64) *GetTaxnexusCodesParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get taxnexus codes params +func (o *GetTaxnexusCodesParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get taxnexus codes params +func (o *GetTaxnexusCodesParams) WithOffset(offset *int64) *GetTaxnexusCodesParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get taxnexus codes params +func (o *GetTaxnexusCodesParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithTaxnexusCodeID adds the taxnexusCodeID to the get taxnexus codes params +func (o *GetTaxnexusCodesParams) WithTaxnexusCodeID(taxnexusCodeID *string) *GetTaxnexusCodesParams { + o.SetTaxnexusCodeID(taxnexusCodeID) + return o +} + +// SetTaxnexusCodeID adds the taxnexusCodeId to the get taxnexus codes params +func (o *GetTaxnexusCodesParams) SetTaxnexusCodeID(taxnexusCodeID *string) { + o.TaxnexusCodeID = taxnexusCodeID +} + +// WriteToRequest writes these params to a swagger request +func (o *GetTaxnexusCodesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.TaxnexusCodeID != nil { + + // query param taxnexusCodeId + var qrTaxnexusCodeID string + if o.TaxnexusCodeID != nil { + qrTaxnexusCodeID = *o.TaxnexusCodeID + } + qTaxnexusCodeID := qrTaxnexusCodeID + if qTaxnexusCodeID != "" { + if err := r.SetQueryParam("taxnexusCodeId", qTaxnexusCodeID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/taxnexus_code/get_taxnexus_codes_responses.go b/api/geo/v0.0.1/geo_client/taxnexus_code/get_taxnexus_codes_responses.go new file mode 100644 index 0000000..54af9f9 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/taxnexus_code/get_taxnexus_codes_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package taxnexus_code + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// GetTaxnexusCodesReader is a Reader for the GetTaxnexusCodes structure. +type GetTaxnexusCodesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetTaxnexusCodesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetTaxnexusCodesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetTaxnexusCodesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetTaxnexusCodesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetTaxnexusCodesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetTaxnexusCodesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetTaxnexusCodesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetTaxnexusCodesOK creates a GetTaxnexusCodesOK with default headers values +func NewGetTaxnexusCodesOK() *GetTaxnexusCodesOK { + return &GetTaxnexusCodesOK{} +} + +/*GetTaxnexusCodesOK handles this case with default header values. + +Taxnexus Response with an array of Taxnexus Codes +*/ +type GetTaxnexusCodesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *geo_models.TaxnexusCodeResponse +} + +func (o *GetTaxnexusCodesOK) Error() string { + return fmt.Sprintf("[GET /taxnexuscodes][%d] getTaxnexusCodesOK %+v", 200, o.Payload) +} + +func (o *GetTaxnexusCodesOK) GetPayload() *geo_models.TaxnexusCodeResponse { + return o.Payload +} + +func (o *GetTaxnexusCodesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(geo_models.TaxnexusCodeResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxnexusCodesUnauthorized creates a GetTaxnexusCodesUnauthorized with default headers values +func NewGetTaxnexusCodesUnauthorized() *GetTaxnexusCodesUnauthorized { + return &GetTaxnexusCodesUnauthorized{} +} + +/*GetTaxnexusCodesUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetTaxnexusCodesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetTaxnexusCodesUnauthorized) Error() string { + return fmt.Sprintf("[GET /taxnexuscodes][%d] getTaxnexusCodesUnauthorized %+v", 401, o.Payload) +} + +func (o *GetTaxnexusCodesUnauthorized) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetTaxnexusCodesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxnexusCodesForbidden creates a GetTaxnexusCodesForbidden with default headers values +func NewGetTaxnexusCodesForbidden() *GetTaxnexusCodesForbidden { + return &GetTaxnexusCodesForbidden{} +} + +/*GetTaxnexusCodesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetTaxnexusCodesForbidden struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetTaxnexusCodesForbidden) Error() string { + return fmt.Sprintf("[GET /taxnexuscodes][%d] getTaxnexusCodesForbidden %+v", 403, o.Payload) +} + +func (o *GetTaxnexusCodesForbidden) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetTaxnexusCodesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxnexusCodesNotFound creates a GetTaxnexusCodesNotFound with default headers values +func NewGetTaxnexusCodesNotFound() *GetTaxnexusCodesNotFound { + return &GetTaxnexusCodesNotFound{} +} + +/*GetTaxnexusCodesNotFound handles this case with default header values. + +Resource was not found +*/ +type GetTaxnexusCodesNotFound struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetTaxnexusCodesNotFound) Error() string { + return fmt.Sprintf("[GET /taxnexuscodes][%d] getTaxnexusCodesNotFound %+v", 404, o.Payload) +} + +func (o *GetTaxnexusCodesNotFound) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetTaxnexusCodesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxnexusCodesUnprocessableEntity creates a GetTaxnexusCodesUnprocessableEntity with default headers values +func NewGetTaxnexusCodesUnprocessableEntity() *GetTaxnexusCodesUnprocessableEntity { + return &GetTaxnexusCodesUnprocessableEntity{} +} + +/*GetTaxnexusCodesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetTaxnexusCodesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetTaxnexusCodesUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /taxnexuscodes][%d] getTaxnexusCodesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetTaxnexusCodesUnprocessableEntity) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetTaxnexusCodesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetTaxnexusCodesInternalServerError creates a GetTaxnexusCodesInternalServerError with default headers values +func NewGetTaxnexusCodesInternalServerError() *GetTaxnexusCodesInternalServerError { + return &GetTaxnexusCodesInternalServerError{} +} + +/*GetTaxnexusCodesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetTaxnexusCodesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *GetTaxnexusCodesInternalServerError) Error() string { + return fmt.Sprintf("[GET /taxnexuscodes][%d] getTaxnexusCodesInternalServerError %+v", 500, o.Payload) +} + +func (o *GetTaxnexusCodesInternalServerError) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *GetTaxnexusCodesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/taxnexus_code/post_taxnexus_codes_parameters.go b/api/geo/v0.0.1/geo_client/taxnexus_code/post_taxnexus_codes_parameters.go new file mode 100644 index 0000000..1285dd8 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/taxnexus_code/post_taxnexus_codes_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package taxnexus_code + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// NewPostTaxnexusCodesParams creates a new PostTaxnexusCodesParams object +// with the default values initialized. +func NewPostTaxnexusCodesParams() *PostTaxnexusCodesParams { + var () + return &PostTaxnexusCodesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostTaxnexusCodesParamsWithTimeout creates a new PostTaxnexusCodesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostTaxnexusCodesParamsWithTimeout(timeout time.Duration) *PostTaxnexusCodesParams { + var () + return &PostTaxnexusCodesParams{ + + timeout: timeout, + } +} + +// NewPostTaxnexusCodesParamsWithContext creates a new PostTaxnexusCodesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostTaxnexusCodesParamsWithContext(ctx context.Context) *PostTaxnexusCodesParams { + var () + return &PostTaxnexusCodesParams{ + + Context: ctx, + } +} + +// NewPostTaxnexusCodesParamsWithHTTPClient creates a new PostTaxnexusCodesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostTaxnexusCodesParamsWithHTTPClient(client *http.Client) *PostTaxnexusCodesParams { + var () + return &PostTaxnexusCodesParams{ + HTTPClient: client, + } +} + +/*PostTaxnexusCodesParams contains all the parameters to send to the API endpoint +for the post taxnexus codes operation typically these are written to a http.Request +*/ +type PostTaxnexusCodesParams struct { + + /*TaxnexusCodeRequest + The new Places request package + + */ + TaxnexusCodeRequest *geo_models.TaxnexusCodeRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post taxnexus codes params +func (o *PostTaxnexusCodesParams) WithTimeout(timeout time.Duration) *PostTaxnexusCodesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post taxnexus codes params +func (o *PostTaxnexusCodesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post taxnexus codes params +func (o *PostTaxnexusCodesParams) WithContext(ctx context.Context) *PostTaxnexusCodesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post taxnexus codes params +func (o *PostTaxnexusCodesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post taxnexus codes params +func (o *PostTaxnexusCodesParams) WithHTTPClient(client *http.Client) *PostTaxnexusCodesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post taxnexus codes params +func (o *PostTaxnexusCodesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTaxnexusCodeRequest adds the taxnexusCodeRequest to the post taxnexus codes params +func (o *PostTaxnexusCodesParams) WithTaxnexusCodeRequest(taxnexusCodeRequest *geo_models.TaxnexusCodeRequest) *PostTaxnexusCodesParams { + o.SetTaxnexusCodeRequest(taxnexusCodeRequest) + return o +} + +// SetTaxnexusCodeRequest adds the taxnexusCodeRequest to the post taxnexus codes params +func (o *PostTaxnexusCodesParams) SetTaxnexusCodeRequest(taxnexusCodeRequest *geo_models.TaxnexusCodeRequest) { + o.TaxnexusCodeRequest = taxnexusCodeRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostTaxnexusCodesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.TaxnexusCodeRequest != nil { + if err := r.SetBodyParam(o.TaxnexusCodeRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/geo/v0.0.1/geo_client/taxnexus_code/post_taxnexus_codes_responses.go b/api/geo/v0.0.1/geo_client/taxnexus_code/post_taxnexus_codes_responses.go new file mode 100644 index 0000000..c46593c --- /dev/null +++ b/api/geo/v0.0.1/geo_client/taxnexus_code/post_taxnexus_codes_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package taxnexus_code + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/geo/geo_models" +) + +// PostTaxnexusCodesReader is a Reader for the PostTaxnexusCodes structure. +type PostTaxnexusCodesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostTaxnexusCodesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostTaxnexusCodesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostTaxnexusCodesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostTaxnexusCodesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostTaxnexusCodesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostTaxnexusCodesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostTaxnexusCodesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostTaxnexusCodesOK creates a PostTaxnexusCodesOK with default headers values +func NewPostTaxnexusCodesOK() *PostTaxnexusCodesOK { + return &PostTaxnexusCodesOK{} +} + +/*PostTaxnexusCodesOK handles this case with default header values. + +Taxnexus Response with an array of Taxnexus Codes +*/ +type PostTaxnexusCodesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *geo_models.TaxnexusCodeResponse +} + +func (o *PostTaxnexusCodesOK) Error() string { + return fmt.Sprintf("[POST /taxnexuscodes][%d] postTaxnexusCodesOK %+v", 200, o.Payload) +} + +func (o *PostTaxnexusCodesOK) GetPayload() *geo_models.TaxnexusCodeResponse { + return o.Payload +} + +func (o *PostTaxnexusCodesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(geo_models.TaxnexusCodeResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxnexusCodesUnauthorized creates a PostTaxnexusCodesUnauthorized with default headers values +func NewPostTaxnexusCodesUnauthorized() *PostTaxnexusCodesUnauthorized { + return &PostTaxnexusCodesUnauthorized{} +} + +/*PostTaxnexusCodesUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PostTaxnexusCodesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostTaxnexusCodesUnauthorized) Error() string { + return fmt.Sprintf("[POST /taxnexuscodes][%d] postTaxnexusCodesUnauthorized %+v", 401, o.Payload) +} + +func (o *PostTaxnexusCodesUnauthorized) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostTaxnexusCodesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxnexusCodesForbidden creates a PostTaxnexusCodesForbidden with default headers values +func NewPostTaxnexusCodesForbidden() *PostTaxnexusCodesForbidden { + return &PostTaxnexusCodesForbidden{} +} + +/*PostTaxnexusCodesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostTaxnexusCodesForbidden struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostTaxnexusCodesForbidden) Error() string { + return fmt.Sprintf("[POST /taxnexuscodes][%d] postTaxnexusCodesForbidden %+v", 403, o.Payload) +} + +func (o *PostTaxnexusCodesForbidden) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostTaxnexusCodesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxnexusCodesNotFound creates a PostTaxnexusCodesNotFound with default headers values +func NewPostTaxnexusCodesNotFound() *PostTaxnexusCodesNotFound { + return &PostTaxnexusCodesNotFound{} +} + +/*PostTaxnexusCodesNotFound handles this case with default header values. + +Resource was not found +*/ +type PostTaxnexusCodesNotFound struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostTaxnexusCodesNotFound) Error() string { + return fmt.Sprintf("[POST /taxnexuscodes][%d] postTaxnexusCodesNotFound %+v", 404, o.Payload) +} + +func (o *PostTaxnexusCodesNotFound) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostTaxnexusCodesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxnexusCodesUnprocessableEntity creates a PostTaxnexusCodesUnprocessableEntity with default headers values +func NewPostTaxnexusCodesUnprocessableEntity() *PostTaxnexusCodesUnprocessableEntity { + return &PostTaxnexusCodesUnprocessableEntity{} +} + +/*PostTaxnexusCodesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostTaxnexusCodesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostTaxnexusCodesUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /taxnexuscodes][%d] postTaxnexusCodesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostTaxnexusCodesUnprocessableEntity) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostTaxnexusCodesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxnexusCodesInternalServerError creates a PostTaxnexusCodesInternalServerError with default headers values +func NewPostTaxnexusCodesInternalServerError() *PostTaxnexusCodesInternalServerError { + return &PostTaxnexusCodesInternalServerError{} +} + +/*PostTaxnexusCodesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostTaxnexusCodesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *geo_models.Error +} + +func (o *PostTaxnexusCodesInternalServerError) Error() string { + return fmt.Sprintf("[POST /taxnexuscodes][%d] postTaxnexusCodesInternalServerError %+v", 500, o.Payload) +} + +func (o *PostTaxnexusCodesInternalServerError) GetPayload() *geo_models.Error { + return o.Payload +} + +func (o *PostTaxnexusCodesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(geo_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/geo/v0.0.1/geo_client/taxnexus_code/taxnexus_code_client.go b/api/geo/v0.0.1/geo_client/taxnexus_code/taxnexus_code_client.go new file mode 100644 index 0000000..f8b5df5 --- /dev/null +++ b/api/geo/v0.0.1/geo_client/taxnexus_code/taxnexus_code_client.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package taxnexus_code + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new taxnexus code API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for taxnexus code API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetTaxnexusCodeObservable(params *GetTaxnexusCodeObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetTaxnexusCodeObservableOK, error) + + GetTaxnexusCodes(params *GetTaxnexusCodesParams, authInfo runtime.ClientAuthInfoWriter) (*GetTaxnexusCodesOK, error) + + PostTaxnexusCodes(params *PostTaxnexusCodesParams, authInfo runtime.ClientAuthInfoWriter) (*PostTaxnexusCodesOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetTaxnexusCodeObservable gets taxnexuscodes in an observable array + + Returns a taxnexuscode retrieval in a observable array +*/ +func (a *Client) GetTaxnexusCodeObservable(params *GetTaxnexusCodeObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetTaxnexusCodeObservableOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetTaxnexusCodeObservableParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getTaxnexusCodeObservable", + Method: "GET", + PathPattern: "/taxnexuscodes/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetTaxnexusCodeObservableReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetTaxnexusCodeObservableOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getTaxnexusCodeObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetTaxnexusCodes gets a list of taxnexus codes + + Return a list of TaxnexusCodes +*/ +func (a *Client) GetTaxnexusCodes(params *GetTaxnexusCodesParams, authInfo runtime.ClientAuthInfoWriter) (*GetTaxnexusCodesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetTaxnexusCodesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getTaxnexusCodes", + Method: "GET", + PathPattern: "/taxnexuscodes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetTaxnexusCodesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetTaxnexusCodesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getTaxnexusCodes: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostTaxnexusCodes stores new taxnexus code records + + Store a batch of new TaxnexusCode records +*/ +func (a *Client) PostTaxnexusCodes(params *PostTaxnexusCodesParams, authInfo runtime.ClientAuthInfoWriter) (*PostTaxnexusCodesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostTaxnexusCodesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postTaxnexusCodes", + Method: "POST", + PathPattern: "/taxnexuscodes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostTaxnexusCodesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostTaxnexusCodesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postTaxnexusCodes: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/geo/v0.0.1/geo_models/address.go b/api/geo/v0.0.1/geo_models/address.go new file mode 100644 index 0000000..e94f1ee --- /dev/null +++ b/api/geo/v0.0.1/geo_models/address.go @@ -0,0 +1,65 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Address address +// +// swagger:model Address +type Address struct { + + // City + City string `json:"City,omitempty"` + + // Country full name + Country string `json:"Country,omitempty"` + + // Country Code + CountryCode string `json:"CountryCode,omitempty"` + + // Postal Code + PostalCode string `json:"PostalCode,omitempty"` + + // State full name + State string `json:"State,omitempty"` + + // State Code + StateCode string `json:"StateCode,omitempty"` + + // Street number and name + Street string `json:"Street,omitempty"` +} + +// Validate validates this address +func (m *Address) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Address) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Address) UnmarshalBinary(b []byte) error { + var res Address + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/coordinate.go b/api/geo/v0.0.1/geo_models/coordinate.go new file mode 100644 index 0000000..e773d3a --- /dev/null +++ b/api/geo/v0.0.1/geo_models/coordinate.go @@ -0,0 +1,183 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Coordinate coordinate +// +// swagger:model Coordinate +type Coordinate struct { + + // Geocoder Country + Country string `json:"Country,omitempty"` + + // Taxnexus Country ID + CountryID string `json:"CountryID,omitempty"` + + // Geocoder County + County string `json:"County,omitempty"` + + // Taxnexus County ID + CountyID string `json:"CountyID,omitempty"` + + // Situs Focus for tax determination + Focus string `json:"Focus,omitempty"` + + // Formatted Address from Geocoder + FormattedAddress string `json:"FormattedAddress,omitempty"` + + // Taxnexus Coordinate Record Id + ID string `json:"ID,omitempty"` + + // Situs Incorporated District? + IsDistrict bool `json:"IsDistrict,omitempty"` + + // Latitude of coordinate + Latitude float64 `json:"Latitude,omitempty"` + + // Longitude of coordinate + Longitude float64 `json:"Longitude,omitempty"` + + // Google map image + // Format: byte + Map strfmt.Base64 `json:"Map,omitempty"` + + // Coordinate Name from Search Text + Name string `json:"Name,omitempty"` + + // Geocoder Neighborhood + Neighborhood string `json:"Neighborhood,omitempty"` + + // Geocoder Place + Place string `json:"Place,omitempty"` + + // The Taxnexus Geocode for this rated location (place or county) + PlaceGeocode string `json:"PlaceGeocode,omitempty"` + + // Taxnexus Place ID + PlaceID string `json:"PlaceID,omitempty"` + + // Geocoder Postal Code + PostalCode string `json:"PostalCode,omitempty"` + + // External System reference ID + Ref string `json:"Ref,omitempty"` + + // Geocoder State/Province name + State string `json:"State,omitempty"` + + // Taxnexus State ID + StateID string `json:"StateID,omitempty"` + + // The Status of the coordinate in Taxnexus + Status string `json:"Status,omitempty"` + + // Geocoder Street Name (only) + Street string `json:"Street,omitempty"` + + // Geocoder Streen number + StreetNumber string `json:"StreetNumber,omitempty"` + + // Google street view image + // Format: byte + StreetView strfmt.Base64 `json:"StreetView,omitempty"` + + // tax rate + TaxRate *TaxRate `json:"TaxRate,omitempty"` + + // tax types + TaxTypes []*TaxType `json:"TaxTypes"` +} + +// Validate validates this coordinate +func (m *Coordinate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTaxRate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTaxTypes(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Coordinate) validateTaxRate(formats strfmt.Registry) error { + + if swag.IsZero(m.TaxRate) { // not required + return nil + } + + if m.TaxRate != nil { + if err := m.TaxRate.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("TaxRate") + } + return err + } + } + + return nil +} + +func (m *Coordinate) validateTaxTypes(formats strfmt.Registry) error { + + if swag.IsZero(m.TaxTypes) { // not required + return nil + } + + for i := 0; i < len(m.TaxTypes); i++ { + if swag.IsZero(m.TaxTypes[i]) { // not required + continue + } + + if m.TaxTypes[i] != nil { + if err := m.TaxTypes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("TaxTypes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Coordinate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Coordinate) UnmarshalBinary(b []byte) error { + var res Coordinate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/coordinate_basic.go b/api/geo/v0.0.1/geo_models/coordinate_basic.go new file mode 100644 index 0000000..b8cec3b --- /dev/null +++ b/api/geo/v0.0.1/geo_models/coordinate_basic.go @@ -0,0 +1,114 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// CoordinateBasic Minimized version of full Coordinate record; should contain just enough data for tax rating purposes +// +// swagger:model CoordinateBasic +type CoordinateBasic struct { + + // Taxnexus Country ID + CountryID string `json:"CountryID,omitempty"` + + // Taxnexus County ID + CountyID string `json:"CountyID,omitempty"` + + // Situs Focus for tax determination + Focus string `json:"Focus,omitempty"` + + // Taxnexus Coordinate Record Id + ID string `json:"ID,omitempty"` + + // Situs Incorporated District? + IsDistrict bool `json:"IsDistrict,omitempty"` + + // Coordinate Name from Search Text + Name string `json:"Name,omitempty"` + + // The Taxnexus Geocode for this rated location (place or county) + PlaceGeocode string `json:"PlaceGeocode,omitempty"` + + // Taxnexus Place ID + PlaceID string `json:"PlaceID,omitempty"` + + // External System reference ID + Ref string `json:"Ref,omitempty"` + + // Taxnexus State ID + StateID string `json:"StateID,omitempty"` + + // tax types + TaxTypes []*TaxTypeID `json:"TaxTypes"` +} + +// Validate validates this coordinate basic +func (m *CoordinateBasic) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTaxTypes(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *CoordinateBasic) validateTaxTypes(formats strfmt.Registry) error { + + if swag.IsZero(m.TaxTypes) { // not required + return nil + } + + for i := 0; i < len(m.TaxTypes); i++ { + if swag.IsZero(m.TaxTypes[i]) { // not required + continue + } + + if m.TaxTypes[i] != nil { + if err := m.TaxTypes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("TaxTypes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *CoordinateBasic) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CoordinateBasic) UnmarshalBinary(b []byte) error { + var res CoordinateBasic + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/coordinate_basic_response.go b/api/geo/v0.0.1/geo_models/coordinate_basic_response.go new file mode 100644 index 0000000..70f559b --- /dev/null +++ b/api/geo/v0.0.1/geo_models/coordinate_basic_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// CoordinateBasicResponse An array of Coordinate objects +// +// swagger:model CoordinateBasicResponse +type CoordinateBasicResponse struct { + + // data + Data []*CoordinateBasic `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this coordinate basic response +func (m *CoordinateBasicResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *CoordinateBasicResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *CoordinateBasicResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *CoordinateBasicResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CoordinateBasicResponse) UnmarshalBinary(b []byte) error { + var res CoordinateBasicResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/coordinate_request.go b/api/geo/v0.0.1/geo_models/coordinate_request.go new file mode 100644 index 0000000..5e1e2b5 --- /dev/null +++ b/api/geo/v0.0.1/geo_models/coordinate_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// CoordinateRequest An array of Coordinate Request Items +// +// swagger:model CoordinateRequest +type CoordinateRequest struct { + + // data + Data []*CoordinateRequestItem `json:"Data"` +} + +// Validate validates this coordinate request +func (m *CoordinateRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *CoordinateRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *CoordinateRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CoordinateRequest) UnmarshalBinary(b []byte) error { + var res CoordinateRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/coordinate_request_item.go b/api/geo/v0.0.1/geo_models/coordinate_request_item.go new file mode 100644 index 0000000..b8403ef --- /dev/null +++ b/api/geo/v0.0.1/geo_models/coordinate_request_item.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// CoordinateRequestItem A single Coordinate Request item +// +// swagger:model CoordinateRequestItem +type CoordinateRequestItem struct { + + // The address to be translated + Address string `json:"Address,omitempty"` + + // Source record reference + Ref string `json:"Ref,omitempty"` +} + +// Validate validates this coordinate request item +func (m *CoordinateRequestItem) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *CoordinateRequestItem) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CoordinateRequestItem) UnmarshalBinary(b []byte) error { + var res CoordinateRequestItem + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/coordinate_response.go b/api/geo/v0.0.1/geo_models/coordinate_response.go new file mode 100644 index 0000000..7ac8881 --- /dev/null +++ b/api/geo/v0.0.1/geo_models/coordinate_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// CoordinateResponse An array of Coordinate objects +// +// swagger:model CoordinateResponse +type CoordinateResponse struct { + + // data + Data []*Coordinate `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this coordinate response +func (m *CoordinateResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *CoordinateResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *CoordinateResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *CoordinateResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CoordinateResponse) UnmarshalBinary(b []byte) error { + var res CoordinateResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/country.go b/api/geo/v0.0.1/geo_models/country.go new file mode 100644 index 0000000..89551b1 --- /dev/null +++ b/api/geo/v0.0.1/geo_models/country.go @@ -0,0 +1,159 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Country country +// +// swagger:model Country +type Country struct { + + // Account + AccountID string `json:"AccountID,omitempty"` + + // Rollup Amount + Amount float64 `json:"Amount,omitempty"` + + // Code + Code string `json:"Code,omitempty"` + + // Contact + ContactID string `json:"ContactID,omitempty"` + + // Enrollment Status + EnrollmentStatus string `json:"EnrollmentStatus,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // Interest + Interest float64 `json:"Interest,omitempty"` + + // Latitude of the center of this geographic entity + Latitude float64 `json:"Latitude,omitempty"` + + // Longitude of the center of this geographic entity + Longitude float64 `json:"Longitude,omitempty"` + + // Country Name + Name string `json:"Name,omitempty"` + + // Penalty + Penalty float64 `json:"Penalty,omitempty"` + + // Source System identifier for this record, if any + Ref string `json:"Ref,omitempty"` + + // Reported Adjustments + ReportedAdjustments float64 `json:"ReportedAdjustments,omitempty"` + + // Reported Deductions + ReportedDeductions float64 `json:"ReportedDeductions,omitempty"` + + // Reported Net Revenue + ReportedNetRevenue float64 `json:"ReportedNetRevenue,omitempty"` + + // Reported Rate + ReportedRate float64 `json:"ReportedRate,omitempty"` + + // Reported Revenue + ReportedRevenue float64 `json:"ReportedRevenue,omitempty"` + + // Rollup Revenue Base + RevenueBase float64 `json:"RevenueBase,omitempty"` + + // Rollup Revenue Net + RevenueNet float64 `json:"RevenueNet,omitempty"` + + // Rollup Revenue Not Taxable + RevenueNotTaxable float64 `json:"RevenueNotTaxable,omitempty"` + + // Document Status + Status string `json:"Status,omitempty"` + + // Reported Tax + Subtotal float64 `json:"Subtotal,omitempty"` + + // tax instances + TaxInstances []*TaxInstance `json:"TaxInstances"` + + // Template + TemplateID string `json:"TemplateID,omitempty"` + + // Total Amount + TotalAmount float64 `json:"TotalAmount,omitempty"` + + // Unit Base + UnitBase float64 `json:"UnitBase,omitempty"` +} + +// Validate validates this country +func (m *Country) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTaxInstances(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Country) validateTaxInstances(formats strfmt.Registry) error { + + if swag.IsZero(m.TaxInstances) { // not required + return nil + } + + for i := 0; i < len(m.TaxInstances); i++ { + if swag.IsZero(m.TaxInstances[i]) { // not required + continue + } + + if m.TaxInstances[i] != nil { + if err := m.TaxInstances[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("TaxInstances" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Country) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Country) UnmarshalBinary(b []byte) error { + var res Country + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/country_request.go b/api/geo/v0.0.1/geo_models/country_request.go new file mode 100644 index 0000000..6d3e8ee --- /dev/null +++ b/api/geo/v0.0.1/geo_models/country_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// CountryRequest An array of Country objects +// +// swagger:model CountryRequest +type CountryRequest struct { + + // data + Data []*Country `json:"Data"` +} + +// Validate validates this country request +func (m *CountryRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *CountryRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *CountryRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CountryRequest) UnmarshalBinary(b []byte) error { + var res CountryRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/country_response.go b/api/geo/v0.0.1/geo_models/country_response.go new file mode 100644 index 0000000..dc305ce --- /dev/null +++ b/api/geo/v0.0.1/geo_models/country_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// CountryResponse An array of Country objects +// +// swagger:model CountryResponse +type CountryResponse struct { + + // data + Data []*Country `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this country response +func (m *CountryResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *CountryResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *CountryResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *CountryResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CountryResponse) UnmarshalBinary(b []byte) error { + var res CountryResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/county.go b/api/geo/v0.0.1/geo_models/county.go new file mode 100644 index 0000000..50ae8b3 --- /dev/null +++ b/api/geo/v0.0.1/geo_models/county.go @@ -0,0 +1,220 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// County county +// +// swagger:model County +type County struct { + + // Account + AccountID string `json:"AccountID,omitempty"` + + // Rollup Amount + Amount float64 `json:"Amount,omitempty"` + + // AreaDescription + AreaDescription string `json:"AreaDescription,omitempty"` + + // Contact + ContactID string `json:"ContactID,omitempty"` + + // Country Taxnexus ID + CountryID string `json:"CountryID,omitempty"` + + // Enrollment Status + EnrollmentStatus string `json:"EnrollmentStatus,omitempty"` + + // FIPS + FIPS string `json:"FIPS,omitempty"` + + // FIPS Class + FIPSclass string `json:"FIPSclass,omitempty"` + + // Functional Status + FunctionalStatus string `json:"FunctionalStatus,omitempty"` + + // GNIS Code + GNIS int64 `json:"GNIS,omitempty"` + + // Geocode + Geocode string `json:"Geocode,omitempty"` + + // True if this County has it's own District Sales Taxes + HasDistrictTaxes bool `json:"HasDistrictTaxes,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // Interest + Interest float64 `json:"Interest,omitempty"` + + // Land Area + LandArea int64 `json:"LandArea,omitempty"` + + // Latitude of the center of this geographic entity + Latitude float64 `json:"Latitude,omitempty"` + + // Legal Name + LegalName string `json:"LegalName,omitempty"` + + // Longitude of the center of this geographic entity + Longitude float64 `json:"Longitude,omitempty"` + + // County Name + Name string `json:"Name,omitempty"` + + // Penalty + Penalty float64 `json:"Penalty,omitempty"` + + // Source System identifier for this record, if any + Ref string `json:"Ref,omitempty"` + + // Reported Adjustments + ReportedAdjustments float64 `json:"ReportedAdjustments,omitempty"` + + // Reported Deductions + ReportedDeductions float64 `json:"ReportedDeductions,omitempty"` + + // Reported Net Revenue + ReportedNetRevenue float64 `json:"ReportedNetRevenue,omitempty"` + + // Reported Rate + ReportedRate float64 `json:"ReportedRate,omitempty"` + + // Reported Revenue + ReportedRevenue float64 `json:"ReportedRevenue,omitempty"` + + // Rollup Revenue Base + RevenueBase float64 `json:"RevenueBase,omitempty"` + + // Rollup Revenue Net + RevenueNet float64 `json:"RevenueNet,omitempty"` + + // Rollup Revenue Not Taxable + RevenueNotTaxable float64 `json:"RevenueNotTaxable,omitempty"` + + // sales tax rate + SalesTaxRate *TaxRate `json:"SalesTaxRate,omitempty"` + + // State + StateID string `json:"StateID,omitempty"` + + // Document Status + Status string `json:"Status,omitempty"` + + // Reported Tax + Subtotal float64 `json:"Subtotal,omitempty"` + + // tax instances + TaxInstances []*TaxInstance `json:"TaxInstances"` + + // Print Template ID + TemplateID string `json:"TemplateID,omitempty"` + + // Total Amount + TotalAmount float64 `json:"TotalAmount,omitempty"` + + // Total Area + TotalArea int64 `json:"TotalArea,omitempty"` + + // Unit Base + UnitBase float64 `json:"UnitBase,omitempty"` + + // Water Area + WaterArea int64 `json:"WaterArea,omitempty"` +} + +// Validate validates this county +func (m *County) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSalesTaxRate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTaxInstances(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *County) validateSalesTaxRate(formats strfmt.Registry) error { + + if swag.IsZero(m.SalesTaxRate) { // not required + return nil + } + + if m.SalesTaxRate != nil { + if err := m.SalesTaxRate.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("SalesTaxRate") + } + return err + } + } + + return nil +} + +func (m *County) validateTaxInstances(formats strfmt.Registry) error { + + if swag.IsZero(m.TaxInstances) { // not required + return nil + } + + for i := 0; i < len(m.TaxInstances); i++ { + if swag.IsZero(m.TaxInstances[i]) { // not required + continue + } + + if m.TaxInstances[i] != nil { + if err := m.TaxInstances[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("TaxInstances" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *County) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *County) UnmarshalBinary(b []byte) error { + var res County + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/county_request.go b/api/geo/v0.0.1/geo_models/county_request.go new file mode 100644 index 0000000..f2e14af --- /dev/null +++ b/api/geo/v0.0.1/geo_models/county_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// CountyRequest An array of County objects +// +// swagger:model CountyRequest +type CountyRequest struct { + + // data + Data []*County `json:"Data"` +} + +// Validate validates this county request +func (m *CountyRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *CountyRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *CountyRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CountyRequest) UnmarshalBinary(b []byte) error { + var res CountyRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/county_response.go b/api/geo/v0.0.1/geo_models/county_response.go new file mode 100644 index 0000000..b704c69 --- /dev/null +++ b/api/geo/v0.0.1/geo_models/county_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// CountyResponse An array of County objects +// +// swagger:model CountyResponse +type CountyResponse struct { + + // data + Data []*County `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this county response +func (m *CountyResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *CountyResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *CountyResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *CountyResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CountyResponse) UnmarshalBinary(b []byte) error { + var res CountyResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/delete_response.go b/api/geo/v0.0.1/geo_models/delete_response.go new file mode 100644 index 0000000..77545ca --- /dev/null +++ b/api/geo/v0.0.1/geo_models/delete_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// DeleteResponse delete response +// +// swagger:model DeleteResponse +type DeleteResponse struct { + + // data + Data []*Message `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this delete response +func (m *DeleteResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DeleteResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *DeleteResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *DeleteResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DeleteResponse) UnmarshalBinary(b []byte) error { + var res DeleteResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/domain.go b/api/geo/v0.0.1/geo_models/domain.go new file mode 100644 index 0000000..b39a92d --- /dev/null +++ b/api/geo/v0.0.1/geo_models/domain.go @@ -0,0 +1,56 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Domain domain +// +// swagger:model Domain +type Domain struct { + + // Active + Active bool `json:"Active,omitempty"` + + // Description + Description string `json:"Description,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // Domain Name + Name string `json:"Name,omitempty"` +} + +// Validate validates this domain +func (m *Domain) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Domain) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Domain) UnmarshalBinary(b []byte) error { + var res Domain + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/domain_request.go b/api/geo/v0.0.1/geo_models/domain_request.go new file mode 100644 index 0000000..cdf637c --- /dev/null +++ b/api/geo/v0.0.1/geo_models/domain_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// DomainRequest An array of Domain objects +// +// swagger:model DomainRequest +type DomainRequest struct { + + // data + Data []*Domain `json:"Data"` +} + +// Validate validates this domain request +func (m *DomainRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DomainRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *DomainRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DomainRequest) UnmarshalBinary(b []byte) error { + var res DomainRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/domain_response.go b/api/geo/v0.0.1/geo_models/domain_response.go new file mode 100644 index 0000000..45ed167 --- /dev/null +++ b/api/geo/v0.0.1/geo_models/domain_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// DomainResponse An array of Domain objects +// +// swagger:model DomainResponse +type DomainResponse struct { + + // data + Data []*Domain `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this domain response +func (m *DomainResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DomainResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *DomainResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *DomainResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DomainResponse) UnmarshalBinary(b []byte) error { + var res DomainResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/error.go b/api/geo/v0.0.1/geo_models/error.go new file mode 100644 index 0000000..cd032f9 --- /dev/null +++ b/api/geo/v0.0.1/geo_models/error.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Error error +// +// swagger:model Error +type Error struct { + + // code + Code int64 `json:"Code,omitempty"` + + // fields + Fields string `json:"Fields,omitempty"` + + // message + Message string `json:"Message,omitempty"` +} + +// Validate validates this error +func (m *Error) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Error) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Error) UnmarshalBinary(b []byte) error { + var res Error + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/invalid_error.go b/api/geo/v0.0.1/geo_models/invalid_error.go new file mode 100644 index 0000000..6e07eaa --- /dev/null +++ b/api/geo/v0.0.1/geo_models/invalid_error.go @@ -0,0 +1,104 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// InvalidError invalid error +// +// swagger:model InvalidError +type InvalidError struct { + Error + + // details + Details []string `json:"details"` +} + +// UnmarshalJSON unmarshals this object from a JSON structure +func (m *InvalidError) UnmarshalJSON(raw []byte) error { + // AO0 + var aO0 Error + if err := swag.ReadJSON(raw, &aO0); err != nil { + return err + } + m.Error = aO0 + + // AO1 + var dataAO1 struct { + Details []string `json:"details"` + } + if err := swag.ReadJSON(raw, &dataAO1); err != nil { + return err + } + + m.Details = dataAO1.Details + + return nil +} + +// MarshalJSON marshals this object to a JSON structure +func (m InvalidError) MarshalJSON() ([]byte, error) { + _parts := make([][]byte, 0, 2) + + aO0, err := swag.WriteJSON(m.Error) + if err != nil { + return nil, err + } + _parts = append(_parts, aO0) + var dataAO1 struct { + Details []string `json:"details"` + } + + dataAO1.Details = m.Details + + jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) + if errAO1 != nil { + return nil, errAO1 + } + _parts = append(_parts, jsonDataAO1) + return swag.ConcatJSON(_parts...), nil +} + +// Validate validates this invalid error +func (m *InvalidError) Validate(formats strfmt.Registry) error { + var res []error + + // validation for a type composition with Error + if err := m.Error.Validate(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// MarshalBinary interface implementation +func (m *InvalidError) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *InvalidError) UnmarshalBinary(b []byte) error { + var res InvalidError + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/message.go b/api/geo/v0.0.1/geo_models/message.go new file mode 100644 index 0000000..f9bb1a0 --- /dev/null +++ b/api/geo/v0.0.1/geo_models/message.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Message message +// +// swagger:model Message +type Message struct { + + // message + Message string `json:"Message,omitempty"` + + // ref + Ref string `json:"Ref,omitempty"` + + // status + Status int64 `json:"Status,omitempty"` +} + +// Validate validates this message +func (m *Message) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Message) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Message) UnmarshalBinary(b []byte) error { + var res Message + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/pagination.go b/api/geo/v0.0.1/geo_models/pagination.go new file mode 100644 index 0000000..70bbe4d --- /dev/null +++ b/api/geo/v0.0.1/geo_models/pagination.go @@ -0,0 +1,56 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Pagination pagination +// +// swagger:model Pagination +type Pagination struct { + + // limit + Limit int64 `json:"Limit,omitempty"` + + // p offset + POffset int64 `json:"POffset,omitempty"` + + // page size + PageSize int64 `json:"PageSize,omitempty"` + + // set size + SetSize int64 `json:"SetSize,omitempty"` +} + +// Validate validates this pagination +func (m *Pagination) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Pagination) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Pagination) UnmarshalBinary(b []byte) error { + var res Pagination + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/place.go b/api/geo/v0.0.1/geo_models/place.go new file mode 100644 index 0000000..b8738d2 --- /dev/null +++ b/api/geo/v0.0.1/geo_models/place.go @@ -0,0 +1,226 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Place place +// +// swagger:model Place +type Place struct { + + // Account + AccountID string `json:"AccountID,omitempty"` + + // Account Validation + AccountValidation string `json:"AccountValidation,omitempty"` + + // Rollup Amount + Amount float64 `json:"Amount,omitempty"` + + // AreaDescription + AreaDescription string `json:"AreaDescription,omitempty"` + + // Contact + ContactID string `json:"ContactID,omitempty"` + + // country ID + CountryID string `json:"CountryID,omitempty"` + + // County + CountyID string `json:"CountyID,omitempty"` + + // Enrollment Status + EnrollmentStatus string `json:"EnrollmentStatus,omitempty"` + + // FIPS + FIPS string `json:"FIPS,omitempty"` + + // FIPS Class + FIPSclass string `json:"FIPSclass,omitempty"` + + // Functional Status + FunctionalStatus string `json:"FunctionalStatus,omitempty"` + + // GNIS + GNIS int64 `json:"GNIS,omitempty"` + + // Geocode + Geocode string `json:"Geocode,omitempty"` + + // True if this Place has it's own District Sales HasDistrictTaxes + HasDistrictTaxes bool `json:"HasDistrictTaxes,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // Interest + Interest float64 `json:"Interest,omitempty"` + + // Land Area + LandArea int64 `json:"LandArea,omitempty"` + + // Latitude of the center of this geographic entity + Latitude float64 `json:"Latitude,omitempty"` + + // Legal Name + LegalName string `json:"LegalName,omitempty"` + + // Longitude of the center of this geographic entity + Longitude float64 `json:"Longitude,omitempty"` + + // Place Name + Name string `json:"Name,omitempty"` + + // Penalty + Penalty float64 `json:"Penalty,omitempty"` + + // Source System identifier for this record, if any + Ref string `json:"Ref,omitempty"` + + // Reported Adjustments + ReportedAdjustments float64 `json:"ReportedAdjustments,omitempty"` + + // Reported Deductions + ReportedDeductions float64 `json:"ReportedDeductions,omitempty"` + + // Reported Net Revenue + ReportedNetRevenue float64 `json:"ReportedNetRevenue,omitempty"` + + // Reported Rate + ReportedRate float64 `json:"ReportedRate,omitempty"` + + // Reported Revenue + ReportedRevenue float64 `json:"ReportedRevenue,omitempty"` + + // Rollup Revenue Base + RevenueBase float64 `json:"RevenueBase,omitempty"` + + // Rollup Revenue Net + RevenueNet float64 `json:"RevenueNet,omitempty"` + + // Rollup Revenue Not Taxable + RevenueNotTaxable float64 `json:"RevenueNotTaxable,omitempty"` + + // sales tax rate + SalesTaxRate *TaxRate `json:"SalesTaxRate,omitempty"` + + // State + StateID string `json:"StateID,omitempty"` + + // Document Status + Status string `json:"Status,omitempty"` + + // Reported Tax + Subtotal float64 `json:"Subtotal,omitempty"` + + // tax instances + TaxInstances []*TaxInstance `json:"TaxInstances"` + + // Template + TemplateID string `json:"TemplateID,omitempty"` + + // Total Amount + TotalAmount float64 `json:"TotalAmount,omitempty"` + + // Total Area + TotalArea int64 `json:"TotalArea,omitempty"` + + // Unit Base + UnitBase float64 `json:"UnitBase,omitempty"` + + // Water Area + WaterArea int64 `json:"WaterArea,omitempty"` +} + +// Validate validates this place +func (m *Place) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSalesTaxRate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTaxInstances(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Place) validateSalesTaxRate(formats strfmt.Registry) error { + + if swag.IsZero(m.SalesTaxRate) { // not required + return nil + } + + if m.SalesTaxRate != nil { + if err := m.SalesTaxRate.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("SalesTaxRate") + } + return err + } + } + + return nil +} + +func (m *Place) validateTaxInstances(formats strfmt.Registry) error { + + if swag.IsZero(m.TaxInstances) { // not required + return nil + } + + for i := 0; i < len(m.TaxInstances); i++ { + if swag.IsZero(m.TaxInstances[i]) { // not required + continue + } + + if m.TaxInstances[i] != nil { + if err := m.TaxInstances[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("TaxInstances" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Place) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Place) UnmarshalBinary(b []byte) error { + var res Place + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/place_request.go b/api/geo/v0.0.1/geo_models/place_request.go new file mode 100644 index 0000000..91e5f38 --- /dev/null +++ b/api/geo/v0.0.1/geo_models/place_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// PlaceRequest An array of Place objects +// +// swagger:model PlaceRequest +type PlaceRequest struct { + + // data + Data []*Place `json:"Data"` +} + +// Validate validates this place request +func (m *PlaceRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PlaceRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PlaceRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PlaceRequest) UnmarshalBinary(b []byte) error { + var res PlaceRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/place_response.go b/api/geo/v0.0.1/geo_models/place_response.go new file mode 100644 index 0000000..7a0d762 --- /dev/null +++ b/api/geo/v0.0.1/geo_models/place_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// PlaceResponse An array of Place objects +// +// swagger:model PlaceResponse +type PlaceResponse struct { + + // data + Data []*Place `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this place response +func (m *PlaceResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PlaceResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PlaceResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PlaceResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PlaceResponse) UnmarshalBinary(b []byte) error { + var res PlaceResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/request_meta.go b/api/geo/v0.0.1/geo_models/request_meta.go new file mode 100644 index 0000000..aec5265 --- /dev/null +++ b/api/geo/v0.0.1/geo_models/request_meta.go @@ -0,0 +1,68 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// RequestMeta request meta +// +// swagger:model RequestMeta +type RequestMeta struct { + + // Taxnexus Account Number of the Reseller or OEM + // Required: true + TaxnexusAccount *string `json:"TaxnexusAccount"` +} + +// Validate validates this request meta +func (m *RequestMeta) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTaxnexusAccount(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RequestMeta) validateTaxnexusAccount(formats strfmt.Registry) error { + + if err := validate.Required("TaxnexusAccount", "body", m.TaxnexusAccount); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *RequestMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RequestMeta) UnmarshalBinary(b []byte) error { + var res RequestMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/response_meta.go b/api/geo/v0.0.1/geo_models/response_meta.go new file mode 100644 index 0000000..96a40d6 --- /dev/null +++ b/api/geo/v0.0.1/geo_models/response_meta.go @@ -0,0 +1,108 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ResponseMeta response meta +// +// swagger:model ResponseMeta +type ResponseMeta struct { + + // Microservice Contact Info + Contact string `json:"Contact,omitempty"` + + // Copyright Info + Copyright string `json:"Copyright,omitempty"` + + // License Information and Restrictions + License string `json:"License,omitempty"` + + // Operation ID + OperationID string `json:"OperationID,omitempty"` + + // pagination + Pagination *Pagination `json:"Pagination,omitempty"` + + // Request IP Address + RequestIP string `json:"RequestIP,omitempty"` + + // Request Type + RequestType string `json:"RequestType,omitempty"` + + // Request URL + RequestURL string `json:"RequestURL,omitempty"` + + // Data Server Info + ServerInfo string `json:"ServerInfo,omitempty"` + + // Data Server Response Time (ms) + ServerResponseTime string `json:"ServerResponseTime,omitempty"` + + // Backend Server Timestamp + ServerTimestamp string `json:"ServerTimestamp,omitempty"` + + // Taxnexus Account Number used for recording transactions + TaxnexusAccount string `json:"TaxnexusAccount,omitempty"` +} + +// Validate validates this response meta +func (m *ResponseMeta) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePagination(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ResponseMeta) validatePagination(formats strfmt.Registry) error { + + if swag.IsZero(m.Pagination) { // not required + return nil + } + + if m.Pagination != nil { + if err := m.Pagination.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Pagination") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ResponseMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ResponseMeta) UnmarshalBinary(b []byte) error { + var res ResponseMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/state.go b/api/geo/v0.0.1/geo_models/state.go new file mode 100644 index 0000000..bedcf06 --- /dev/null +++ b/api/geo/v0.0.1/geo_models/state.go @@ -0,0 +1,189 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// State state +// +// swagger:model State +type State struct { + + // Account + AccountID string `json:"AccountID,omitempty"` + + // Rollup Amount + Amount float64 `json:"Amount,omitempty"` + + // State Code + Code string `json:"Code,omitempty"` + + // Contact + ContactID string `json:"ContactID,omitempty"` + + // Country + CountryID string `json:"CountryID,omitempty"` + + // Division + Division string `json:"Division,omitempty"` + + // Enrollment Status + EnrollmentStatus string `json:"EnrollmentStatus,omitempty"` + + // FIPS + FIPS string `json:"FIPS,omitempty"` + + // GNIS + GNIS int64 `json:"GNIS,omitempty"` + + // State Geocode + Geocode string `json:"Geocode,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // Interest + Interest float64 `json:"Interest,omitempty"` + + // Land Area + LandArea int64 `json:"LandArea,omitempty"` + + // Latitude of the center of this geographic entity + Latitude float64 `json:"Latitude,omitempty"` + + // Longitude of the center of this geographic entity + Longitude float64 `json:"Longitude,omitempty"` + + // State Name + Name string `json:"Name,omitempty"` + + // Penalty + Penalty float64 `json:"Penalty,omitempty"` + + // Source System identifier for this record, if any + Ref string `json:"Ref,omitempty"` + + // Region + Region string `json:"Region,omitempty"` + + // Reported Adjustments + ReportedAdjustments float64 `json:"ReportedAdjustments,omitempty"` + + // Reported Deductions + ReportedDeductions float64 `json:"ReportedDeductions,omitempty"` + + // Reported Net Revenue + ReportedNetRevenue float64 `json:"ReportedNetRevenue,omitempty"` + + // Reported Rate + ReportedRate float64 `json:"ReportedRate,omitempty"` + + // Reported Revenue + ReportedRevenue float64 `json:"ReportedRevenue,omitempty"` + + // Rollup Revenue Base + RevenueBase float64 `json:"RevenueBase,omitempty"` + + // Rollup Revenue Net + RevenueNet float64 `json:"RevenueNet,omitempty"` + + // Rollup Revenue Not Taxable + RevenueNotTaxable float64 `json:"RevenueNotTaxable,omitempty"` + + // SGC + SGC string `json:"SGC,omitempty"` + + // Document Status + Status string `json:"Status,omitempty"` + + // Reported Tax + Subtotal float64 `json:"Subtotal,omitempty"` + + // tax instances + TaxInstances []*TaxInstance `json:"TaxInstances"` + + // Template + TemplateID string `json:"TemplateID,omitempty"` + + // Total Amount + TotalAmount float64 `json:"TotalAmount,omitempty"` + + // Total Area + TotalArea int64 `json:"TotalArea,omitempty"` + + // Unit Base + UnitBase float64 `json:"UnitBase,omitempty"` + + // Water Area + WaterArea int64 `json:"WaterArea,omitempty"` +} + +// Validate validates this state +func (m *State) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTaxInstances(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *State) validateTaxInstances(formats strfmt.Registry) error { + + if swag.IsZero(m.TaxInstances) { // not required + return nil + } + + for i := 0; i < len(m.TaxInstances); i++ { + if swag.IsZero(m.TaxInstances[i]) { // not required + continue + } + + if m.TaxInstances[i] != nil { + if err := m.TaxInstances[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("TaxInstances" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *State) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *State) UnmarshalBinary(b []byte) error { + var res State + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/state_request.go b/api/geo/v0.0.1/geo_models/state_request.go new file mode 100644 index 0000000..af5dd4c --- /dev/null +++ b/api/geo/v0.0.1/geo_models/state_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// StateRequest An array of State objects +// +// swagger:model StateRequest +type StateRequest struct { + + // data + Data []*State `json:"Data"` +} + +// Validate validates this state request +func (m *StateRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *StateRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *StateRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *StateRequest) UnmarshalBinary(b []byte) error { + var res StateRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/state_response.go b/api/geo/v0.0.1/geo_models/state_response.go new file mode 100644 index 0000000..ae6e1a2 --- /dev/null +++ b/api/geo/v0.0.1/geo_models/state_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// StateResponse An array of State objects +// +// swagger:model StateResponse +type StateResponse struct { + + // data + Data []*State `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this state response +func (m *StateResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *StateResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *StateResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *StateResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *StateResponse) UnmarshalBinary(b []byte) error { + var res StateResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/tax_instance.go b/api/geo/v0.0.1/geo_models/tax_instance.go new file mode 100644 index 0000000..ba11bb4 --- /dev/null +++ b/api/geo/v0.0.1/geo_models/tax_instance.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// TaxInstance tax instance +// +// swagger:model TaxInstance +type TaxInstance struct { + + // The Taxnexus ID of the Country that owns this instance + CountryID string `json:"CountryID,omitempty"` + + // The Taxnexus ID of the County that owns this instance + CountyID string `json:"CountyID,omitempty"` + + // The Taxnexus ID of the user who created this record + CreatedByID string `json:"CreatedByID,omitempty"` + + // The creation date of this database record + CreatedDate string `json:"CreatedDate,omitempty"` + + // last modified by ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // last modified date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // The Taxnexus ID of the Place that owns this instance + PlaceID string `json:"PlaceID,omitempty"` + + // The Taxnexus ID of the State that owns this instance + StateID string `json:"StateID,omitempty"` + + // The Taxnexus Tax Type ID of this instance + TaxTypeID string `json:"TaxTypeID,omitempty"` + + // The Type of instance refers to the linking object (place, county, state, country) + Type string `json:"Type,omitempty"` +} + +// Validate validates this tax instance +func (m *TaxInstance) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *TaxInstance) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TaxInstance) UnmarshalBinary(b []byte) error { + var res TaxInstance + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/tax_rate.go b/api/geo/v0.0.1/geo_models/tax_rate.go new file mode 100644 index 0000000..212171b --- /dev/null +++ b/api/geo/v0.0.1/geo_models/tax_rate.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// TaxRate tax rate +// +// swagger:model TaxRate +type TaxRate struct { + + // Total Sales Tax Rate (use this one!) + CombinedRate float64 `json:"CombinedRate,omitempty"` + + // County full name + County string `json:"County,omitempty"` + + // County Taxnexus ID + CountyID string `json:"CountyID,omitempty"` + + // County Sales Tax Rate + CountyRate float64 `json:"CountyRate,omitempty"` + + // Date of tax situs determination + Date string `json:"Date,omitempty"` + + // Where the tax rate is focused (place or county) + Focus string `json:"Focus,omitempty"` + + // Taxnexus Geocode for this location + Geocode string `json:"Geocode,omitempty"` + + // Journal Entry Date (transaction date) + JournalDate string `json:"JournalDate,omitempty"` + + // City/Town/Village full name + Place string `json:"Place,omitempty"` + + // City/Town/Village Taxnexus ID + PlaceID string `json:"PlaceID,omitempty"` + + // City/Town/Village Tax Rate + PlaceRate float64 `json:"PlaceRate,omitempty"` + + // State full name + State string `json:"State,omitempty"` + + // State Taxnexus ID + StateID string `json:"StateID,omitempty"` + + // State Sales Tax Rate + StateRate float64 `json:"StateRate,omitempty"` +} + +// Validate validates this tax rate +func (m *TaxRate) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *TaxRate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TaxRate) UnmarshalBinary(b []byte) error { + var res TaxRate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/tax_rate_response.go b/api/geo/v0.0.1/geo_models/tax_rate_response.go new file mode 100644 index 0000000..0ca34e4 --- /dev/null +++ b/api/geo/v0.0.1/geo_models/tax_rate_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// TaxRateResponse An array of Tax Rate objects +// +// swagger:model TaxRateResponse +type TaxRateResponse struct { + + // data + Data []*TaxRate `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this tax rate response +func (m *TaxRateResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *TaxRateResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *TaxRateResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *TaxRateResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TaxRateResponse) UnmarshalBinary(b []byte) error { + var res TaxRateResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/tax_type.go b/api/geo/v0.0.1/geo_models/tax_type.go new file mode 100644 index 0000000..60b593a --- /dev/null +++ b/api/geo/v0.0.1/geo_models/tax_type.go @@ -0,0 +1,173 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// TaxType tax type +// +// swagger:model TaxType +type TaxType struct { + + // Taxing Authority Account Id + AccountID string `json:"AccountID,omitempty"` + + // The Accounting Rule Code for this Tax Type + AccountingRuleCode string `json:"AccountingRuleCode,omitempty"` + + // Agency Type + AgencyType string `json:"AgencyType,omitempty"` + + // Collection Agent Id + AgentID string `json:"AgentID,omitempty"` + + // Category + Category string `json:"Category,omitempty"` + + // Collector Domain Id + CollectorDomainID string `json:"CollectorDomainID,omitempty"` + + // Company ID + CompanyID string `json:"CompanyID,omitempty"` + + // Authority Contact Id + ContactID string `json:"ContactID,omitempty"` + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Description + Description string `json:"Description,omitempty"` + + // Effective Date + EffectiveDate string `json:"EffectiveDate,omitempty"` + + // End Date + EndDate string `json:"EndDate,omitempty"` + + // Enrollment Status + EnrollmentStatus string `json:"EnrollmentStatus,omitempty"` + + // Filing City + FilingCity string `json:"FilingCity,omitempty"` + + // Filing Country + FilingCountry string `json:"FilingCountry,omitempty"` + + // Filing Email + FilingEmail string `json:"FilingEmail,omitempty"` + + // Filing Method + FilingMethod string `json:"FilingMethod,omitempty"` + + // Filing Postal Code + FilingPostalCode string `json:"FilingPostalCode,omitempty"` + + // Filing State + FilingState string `json:"FilingState,omitempty"` + + // Filing Street + FilingStreet string `json:"FilingStreet,omitempty"` + + // Does this Tax Type use a Fractional Basis for calculation? + Fractional bool `json:"Fractional,omitempty"` + + // Frequency + Frequency string `json:"Frequency,omitempty"` + + // Geocode String + GeocodeString string `json:"GeocodeString,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // Interest Rate + InterestRate float64 `json:"InterestRate,omitempty"` + + // Medicinal-use cannabis consumption exemption doesn't apply + IsMedicinal bool `json:"IsMedicinal,omitempty"` + + // For Adult-use cannabis consumption only + IsRecreational bool `json:"IsRecreational,omitempty"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Wholesale markup rate used in Excise Tax (CA cannabis) + MarkupRate float64 `json:"MarkupRate,omitempty"` + + // Tax Type Name (unique) + Name string `json:"Name,omitempty"` + + // Is this tax allowed to be passed-through to retail customers? + PassThrough bool `json:"PassThrough,omitempty"` + + // Number of days until Penalty is assessed + PenaltyDays int64 `json:"PenaltyDays,omitempty"` + + // The percentage rate of a Penalty (per month) + PenaltyRate float64 `json:"PenaltyRate,omitempty"` + + // Tax Rate + Rate float64 `json:"Rate,omitempty"` + + // Tax Authority Website Reference + Reference string `json:"Reference,omitempty"` + + // Salesregulation Code for this TaxType + SalesRegulation string `json:"SalesRegulation,omitempty"` + + // TaxType Document Status + Status string `json:"Status,omitempty"` + + // Taxnexus Code Id + TaxnexusCodeID string `json:"TaxnexusCodeID,omitempty"` + + // The Tax Type number assigned by Taxnexus + TaxnexusNumber string `json:"TaxnexusNumber,omitempty"` + + // Rendering Template Id + TemplateID string `json:"TemplateID,omitempty"` + + // Units + Units string `json:"Units,omitempty"` +} + +// Validate validates this tax type +func (m *TaxType) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *TaxType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TaxType) UnmarshalBinary(b []byte) error { + var res TaxType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/tax_type_id.go b/api/geo/v0.0.1/geo_models/tax_type_id.go new file mode 100644 index 0000000..c773ce3 --- /dev/null +++ b/api/geo/v0.0.1/geo_models/tax_type_id.go @@ -0,0 +1,47 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// TaxTypeID tax type ID +// +// swagger:model TaxTypeID +type TaxTypeID struct { + + // tax type ID + TaxTypeID string `json:"TaxTypeID,omitempty"` +} + +// Validate validates this tax type ID +func (m *TaxTypeID) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *TaxTypeID) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TaxTypeID) UnmarshalBinary(b []byte) error { + var res TaxTypeID + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/tax_type_request.go b/api/geo/v0.0.1/geo_models/tax_type_request.go new file mode 100644 index 0000000..73656e9 --- /dev/null +++ b/api/geo/v0.0.1/geo_models/tax_type_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// TaxTypeRequest An array of Tax Type objects +// +// swagger:model TaxTypeRequest +type TaxTypeRequest struct { + + // data + Data []*TaxType `json:"Data"` +} + +// Validate validates this tax type request +func (m *TaxTypeRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *TaxTypeRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *TaxTypeRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TaxTypeRequest) UnmarshalBinary(b []byte) error { + var res TaxTypeRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/tax_type_response.go b/api/geo/v0.0.1/geo_models/tax_type_response.go new file mode 100644 index 0000000..8d4d3b2 --- /dev/null +++ b/api/geo/v0.0.1/geo_models/tax_type_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// TaxTypeResponse An array of Tax Type objects +// +// swagger:model TaxTypeResponse +type TaxTypeResponse struct { + + // data + Data []*TaxType `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this tax type response +func (m *TaxTypeResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *TaxTypeResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *TaxTypeResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *TaxTypeResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TaxTypeResponse) UnmarshalBinary(b []byte) error { + var res TaxTypeResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/taxnexus_code.go b/api/geo/v0.0.1/geo_models/taxnexus_code.go new file mode 100644 index 0000000..b517a17 --- /dev/null +++ b/api/geo/v0.0.1/geo_models/taxnexus_code.go @@ -0,0 +1,110 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// TaxnexusCode taxnexus code +// +// swagger:model TaxnexusCode +type TaxnexusCode struct { + + // Is this an active Taxnexus Code? + Active bool `json:"Active,omitempty"` + + // Taxnexus Code + Code string `json:"Code,omitempty"` + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Taxnexus Code Description + Description string `json:"Description,omitempty"` + + // Domain ID + DomainID string `json:"DomainID,omitempty"` + + // Domain Name + DomainName string `json:"DomainName,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Taxnexus Code Level + Level string `json:"Level,omitempty"` + + // The Taxnexus User Id that owns this Taxnexus Code + OwnerID string `json:"OwnerID,omitempty"` + + // Taxnexus Code Part 1 + Part1 string `json:"Part1,omitempty"` + + // Taxnexus Code Part 2 + Part2 string `json:"Part2,omitempty"` + + // Taxnexus Code Part 3 + Part3 string `json:"Part3,omitempty"` + + // Taxnexus Code Part 4 + Part4 string `json:"Part4,omitempty"` + + // Taxnexus Code Part 4 + Part5 string `json:"Part5,omitempty"` + + // Purchasing Ruleset AccountingRuleset Code + PurchasingRulesetCode string `json:"PurchasingRulesetCode,omitempty"` + + // Purchasing Ruleset AccountingRuleset ID + PurchasingRulesetID string `json:"PurchasingRulesetID,omitempty"` + + // Source System identifier for this record, if any + Ref string `json:"Ref,omitempty"` + + // Revenue Ruleset AccountingRuleset Code + RevenueRulesetCode string `json:"RevenueRulesetCode,omitempty"` + + // Revenue Ruleset AccountingRuleset ID + RevenueRulesetID string `json:"RevenueRulesetID,omitempty"` +} + +// Validate validates this taxnexus code +func (m *TaxnexusCode) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *TaxnexusCode) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TaxnexusCode) UnmarshalBinary(b []byte) error { + var res TaxnexusCode + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/taxnexus_code_request.go b/api/geo/v0.0.1/geo_models/taxnexus_code_request.go new file mode 100644 index 0000000..da98841 --- /dev/null +++ b/api/geo/v0.0.1/geo_models/taxnexus_code_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// TaxnexusCodeRequest An array of Taxnexus Codes +// +// swagger:model TaxnexusCodeRequest +type TaxnexusCodeRequest struct { + + // data + Data []*TaxnexusCode `json:"Data"` +} + +// Validate validates this taxnexus code request +func (m *TaxnexusCodeRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *TaxnexusCodeRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *TaxnexusCodeRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TaxnexusCodeRequest) UnmarshalBinary(b []byte) error { + var res TaxnexusCodeRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/geo/v0.0.1/geo_models/taxnexus_code_response.go b/api/geo/v0.0.1/geo_models/taxnexus_code_response.go new file mode 100644 index 0000000..9bc3ffc --- /dev/null +++ b/api/geo/v0.0.1/geo_models/taxnexus_code_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package geo_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// TaxnexusCodeResponse An array of Taxnexus Codes +// +// swagger:model TaxnexusCodeResponse +type TaxnexusCodeResponse struct { + + // data + Data []*TaxnexusCode `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this taxnexus code response +func (m *TaxnexusCodeResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *TaxnexusCodeResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *TaxnexusCodeResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *TaxnexusCodeResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TaxnexusCodeResponse) UnmarshalBinary(b []byte) error { + var res TaxnexusCodeResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_client/accounting_rule/accounting_rule_client.go b/api/ledger/v0.0.1/ledger_client/accounting_rule/accounting_rule_client.go new file mode 100644 index 0000000..0c13314 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/accounting_rule/accounting_rule_client.go @@ -0,0 +1,118 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package accounting_rule + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new accounting rule API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for accounting rule API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetAccountingRules(params *GetAccountingRulesParams, authInfo runtime.ClientAuthInfoWriter) (*GetAccountingRulesOK, error) + + PostAccountingRules(params *PostAccountingRulesParams, authInfo runtime.ClientAuthInfoWriter) (*PostAccountingRulesOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetAccountingRules gets a list of accounting rules + + Return a list of Accounting Rules +*/ +func (a *Client) GetAccountingRules(params *GetAccountingRulesParams, authInfo runtime.ClientAuthInfoWriter) (*GetAccountingRulesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetAccountingRulesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getAccountingRules", + Method: "GET", + PathPattern: "/accountingrules", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetAccountingRulesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetAccountingRulesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getAccountingRules: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostAccountingRules creates new accounting rules + + Create new Accounting Rules +*/ +func (a *Client) PostAccountingRules(params *PostAccountingRulesParams, authInfo runtime.ClientAuthInfoWriter) (*PostAccountingRulesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostAccountingRulesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postAccountingRules", + Method: "POST", + PathPattern: "/accountingrules", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostAccountingRulesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostAccountingRulesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postAccountingRules: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/ledger/v0.0.1/ledger_client/accounting_rule/get_accounting_rules_parameters.go b/api/ledger/v0.0.1/ledger_client/accounting_rule/get_accounting_rules_parameters.go new file mode 100644 index 0000000..b7dd49d --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/accounting_rule/get_accounting_rules_parameters.go @@ -0,0 +1,240 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package accounting_rule + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetAccountingRulesParams creates a new GetAccountingRulesParams object +// with the default values initialized. +func NewGetAccountingRulesParams() *GetAccountingRulesParams { + var () + return &GetAccountingRulesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetAccountingRulesParamsWithTimeout creates a new GetAccountingRulesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetAccountingRulesParamsWithTimeout(timeout time.Duration) *GetAccountingRulesParams { + var () + return &GetAccountingRulesParams{ + + timeout: timeout, + } +} + +// NewGetAccountingRulesParamsWithContext creates a new GetAccountingRulesParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetAccountingRulesParamsWithContext(ctx context.Context) *GetAccountingRulesParams { + var () + return &GetAccountingRulesParams{ + + Context: ctx, + } +} + +// NewGetAccountingRulesParamsWithHTTPClient creates a new GetAccountingRulesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetAccountingRulesParamsWithHTTPClient(client *http.Client) *GetAccountingRulesParams { + var () + return &GetAccountingRulesParams{ + HTTPClient: client, + } +} + +/*GetAccountingRulesParams contains all the parameters to send to the API endpoint +for the get accounting rules operation typically these are written to a http.Request +*/ +type GetAccountingRulesParams struct { + + /*AccountID + Taxnexus Record Id of an Account + + */ + AccountID string + /*ID + Taxnexus Record Id + + */ + ID *string + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get accounting rules params +func (o *GetAccountingRulesParams) WithTimeout(timeout time.Duration) *GetAccountingRulesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get accounting rules params +func (o *GetAccountingRulesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get accounting rules params +func (o *GetAccountingRulesParams) WithContext(ctx context.Context) *GetAccountingRulesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get accounting rules params +func (o *GetAccountingRulesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get accounting rules params +func (o *GetAccountingRulesParams) WithHTTPClient(client *http.Client) *GetAccountingRulesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get accounting rules params +func (o *GetAccountingRulesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAccountID adds the accountID to the get accounting rules params +func (o *GetAccountingRulesParams) WithAccountID(accountID string) *GetAccountingRulesParams { + o.SetAccountID(accountID) + return o +} + +// SetAccountID adds the accountId to the get accounting rules params +func (o *GetAccountingRulesParams) SetAccountID(accountID string) { + o.AccountID = accountID +} + +// WithID adds the id to the get accounting rules params +func (o *GetAccountingRulesParams) WithID(id *string) *GetAccountingRulesParams { + o.SetID(id) + return o +} + +// SetID adds the id to the get accounting rules params +func (o *GetAccountingRulesParams) SetID(id *string) { + o.ID = id +} + +// WithLimit adds the limit to the get accounting rules params +func (o *GetAccountingRulesParams) WithLimit(limit *int64) *GetAccountingRulesParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get accounting rules params +func (o *GetAccountingRulesParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get accounting rules params +func (o *GetAccountingRulesParams) WithOffset(offset *int64) *GetAccountingRulesParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get accounting rules params +func (o *GetAccountingRulesParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *GetAccountingRulesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param accountId + qrAccountID := o.AccountID + qAccountID := qrAccountID + if qAccountID != "" { + if err := r.SetQueryParam("accountId", qAccountID); err != nil { + return err + } + } + + if o.ID != nil { + + // query param id + var qrID string + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ledger/v0.0.1/ledger_client/accounting_rule/get_accounting_rules_responses.go b/api/ledger/v0.0.1/ledger_client/accounting_rule/get_accounting_rules_responses.go new file mode 100644 index 0000000..1bee9f1 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/accounting_rule/get_accounting_rules_responses.go @@ -0,0 +1,268 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package accounting_rule + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ledger/ledger_models" +) + +// GetAccountingRulesReader is a Reader for the GetAccountingRules structure. +type GetAccountingRulesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetAccountingRulesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetAccountingRulesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetAccountingRulesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetAccountingRulesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetAccountingRulesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetAccountingRulesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetAccountingRulesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetAccountingRulesOK creates a GetAccountingRulesOK with default headers values +func NewGetAccountingRulesOK() *GetAccountingRulesOK { + return &GetAccountingRulesOK{} +} + +/*GetAccountingRulesOK handles this case with default header values. + +Taxnexus Response with Accounting Rule objects +*/ +type GetAccountingRulesOK struct { + Payload *ledger_models.AccountingRuleResponse +} + +func (o *GetAccountingRulesOK) Error() string { + return fmt.Sprintf("[GET /accountingrules][%d] getAccountingRulesOK %+v", 200, o.Payload) +} + +func (o *GetAccountingRulesOK) GetPayload() *ledger_models.AccountingRuleResponse { + return o.Payload +} + +func (o *GetAccountingRulesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.AccountingRuleResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAccountingRulesUnauthorized creates a GetAccountingRulesUnauthorized with default headers values +func NewGetAccountingRulesUnauthorized() *GetAccountingRulesUnauthorized { + return &GetAccountingRulesUnauthorized{} +} + +/*GetAccountingRulesUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetAccountingRulesUnauthorized struct { + Payload *ledger_models.Error +} + +func (o *GetAccountingRulesUnauthorized) Error() string { + return fmt.Sprintf("[GET /accountingrules][%d] getAccountingRulesUnauthorized %+v", 401, o.Payload) +} + +func (o *GetAccountingRulesUnauthorized) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetAccountingRulesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAccountingRulesForbidden creates a GetAccountingRulesForbidden with default headers values +func NewGetAccountingRulesForbidden() *GetAccountingRulesForbidden { + return &GetAccountingRulesForbidden{} +} + +/*GetAccountingRulesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetAccountingRulesForbidden struct { + Payload *ledger_models.Error +} + +func (o *GetAccountingRulesForbidden) Error() string { + return fmt.Sprintf("[GET /accountingrules][%d] getAccountingRulesForbidden %+v", 403, o.Payload) +} + +func (o *GetAccountingRulesForbidden) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetAccountingRulesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAccountingRulesNotFound creates a GetAccountingRulesNotFound with default headers values +func NewGetAccountingRulesNotFound() *GetAccountingRulesNotFound { + return &GetAccountingRulesNotFound{} +} + +/*GetAccountingRulesNotFound handles this case with default header values. + +Resource was not found +*/ +type GetAccountingRulesNotFound struct { + Payload *ledger_models.Error +} + +func (o *GetAccountingRulesNotFound) Error() string { + return fmt.Sprintf("[GET /accountingrules][%d] getAccountingRulesNotFound %+v", 404, o.Payload) +} + +func (o *GetAccountingRulesNotFound) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetAccountingRulesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAccountingRulesUnprocessableEntity creates a GetAccountingRulesUnprocessableEntity with default headers values +func NewGetAccountingRulesUnprocessableEntity() *GetAccountingRulesUnprocessableEntity { + return &GetAccountingRulesUnprocessableEntity{} +} + +/*GetAccountingRulesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetAccountingRulesUnprocessableEntity struct { + Payload *ledger_models.Error +} + +func (o *GetAccountingRulesUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /accountingrules][%d] getAccountingRulesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetAccountingRulesUnprocessableEntity) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetAccountingRulesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAccountingRulesInternalServerError creates a GetAccountingRulesInternalServerError with default headers values +func NewGetAccountingRulesInternalServerError() *GetAccountingRulesInternalServerError { + return &GetAccountingRulesInternalServerError{} +} + +/*GetAccountingRulesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetAccountingRulesInternalServerError struct { + Payload *ledger_models.Error +} + +func (o *GetAccountingRulesInternalServerError) Error() string { + return fmt.Sprintf("[GET /accountingrules][%d] getAccountingRulesInternalServerError %+v", 500, o.Payload) +} + +func (o *GetAccountingRulesInternalServerError) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetAccountingRulesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ledger/v0.0.1/ledger_client/accounting_rule/post_accounting_rules_parameters.go b/api/ledger/v0.0.1/ledger_client/accounting_rule/post_accounting_rules_parameters.go new file mode 100644 index 0000000..7b1609c --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/accounting_rule/post_accounting_rules_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package accounting_rule + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ledger/ledger_models" +) + +// NewPostAccountingRulesParams creates a new PostAccountingRulesParams object +// with the default values initialized. +func NewPostAccountingRulesParams() *PostAccountingRulesParams { + var () + return &PostAccountingRulesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostAccountingRulesParamsWithTimeout creates a new PostAccountingRulesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostAccountingRulesParamsWithTimeout(timeout time.Duration) *PostAccountingRulesParams { + var () + return &PostAccountingRulesParams{ + + timeout: timeout, + } +} + +// NewPostAccountingRulesParamsWithContext creates a new PostAccountingRulesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostAccountingRulesParamsWithContext(ctx context.Context) *PostAccountingRulesParams { + var () + return &PostAccountingRulesParams{ + + Context: ctx, + } +} + +// NewPostAccountingRulesParamsWithHTTPClient creates a new PostAccountingRulesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostAccountingRulesParamsWithHTTPClient(client *http.Client) *PostAccountingRulesParams { + var () + return &PostAccountingRulesParams{ + HTTPClient: client, + } +} + +/*PostAccountingRulesParams contains all the parameters to send to the API endpoint +for the post accounting rules operation typically these are written to a http.Request +*/ +type PostAccountingRulesParams struct { + + /*AccountingRuleRequest + An array of Accounting Rule records + + */ + AccountingRuleRequest *ledger_models.AccountingRuleRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post accounting rules params +func (o *PostAccountingRulesParams) WithTimeout(timeout time.Duration) *PostAccountingRulesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post accounting rules params +func (o *PostAccountingRulesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post accounting rules params +func (o *PostAccountingRulesParams) WithContext(ctx context.Context) *PostAccountingRulesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post accounting rules params +func (o *PostAccountingRulesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post accounting rules params +func (o *PostAccountingRulesParams) WithHTTPClient(client *http.Client) *PostAccountingRulesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post accounting rules params +func (o *PostAccountingRulesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAccountingRuleRequest adds the accountingRuleRequest to the post accounting rules params +func (o *PostAccountingRulesParams) WithAccountingRuleRequest(accountingRuleRequest *ledger_models.AccountingRuleRequest) *PostAccountingRulesParams { + o.SetAccountingRuleRequest(accountingRuleRequest) + return o +} + +// SetAccountingRuleRequest adds the accountingRuleRequest to the post accounting rules params +func (o *PostAccountingRulesParams) SetAccountingRuleRequest(accountingRuleRequest *ledger_models.AccountingRuleRequest) { + o.AccountingRuleRequest = accountingRuleRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostAccountingRulesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AccountingRuleRequest != nil { + if err := r.SetBodyParam(o.AccountingRuleRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ledger/v0.0.1/ledger_client/accounting_rule/post_accounting_rules_responses.go b/api/ledger/v0.0.1/ledger_client/accounting_rule/post_accounting_rules_responses.go new file mode 100644 index 0000000..13acfb7 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/accounting_rule/post_accounting_rules_responses.go @@ -0,0 +1,268 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package accounting_rule + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ledger/ledger_models" +) + +// PostAccountingRulesReader is a Reader for the PostAccountingRules structure. +type PostAccountingRulesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostAccountingRulesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostAccountingRulesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostAccountingRulesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostAccountingRulesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostAccountingRulesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostAccountingRulesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostAccountingRulesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostAccountingRulesOK creates a PostAccountingRulesOK with default headers values +func NewPostAccountingRulesOK() *PostAccountingRulesOK { + return &PostAccountingRulesOK{} +} + +/*PostAccountingRulesOK handles this case with default header values. + +Taxnexus Response with Accounting Rule objects +*/ +type PostAccountingRulesOK struct { + Payload *ledger_models.AccountingRuleResponse +} + +func (o *PostAccountingRulesOK) Error() string { + return fmt.Sprintf("[POST /accountingrules][%d] postAccountingRulesOK %+v", 200, o.Payload) +} + +func (o *PostAccountingRulesOK) GetPayload() *ledger_models.AccountingRuleResponse { + return o.Payload +} + +func (o *PostAccountingRulesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.AccountingRuleResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostAccountingRulesUnauthorized creates a PostAccountingRulesUnauthorized with default headers values +func NewPostAccountingRulesUnauthorized() *PostAccountingRulesUnauthorized { + return &PostAccountingRulesUnauthorized{} +} + +/*PostAccountingRulesUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostAccountingRulesUnauthorized struct { + Payload *ledger_models.Error +} + +func (o *PostAccountingRulesUnauthorized) Error() string { + return fmt.Sprintf("[POST /accountingrules][%d] postAccountingRulesUnauthorized %+v", 401, o.Payload) +} + +func (o *PostAccountingRulesUnauthorized) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostAccountingRulesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostAccountingRulesForbidden creates a PostAccountingRulesForbidden with default headers values +func NewPostAccountingRulesForbidden() *PostAccountingRulesForbidden { + return &PostAccountingRulesForbidden{} +} + +/*PostAccountingRulesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostAccountingRulesForbidden struct { + Payload *ledger_models.Error +} + +func (o *PostAccountingRulesForbidden) Error() string { + return fmt.Sprintf("[POST /accountingrules][%d] postAccountingRulesForbidden %+v", 403, o.Payload) +} + +func (o *PostAccountingRulesForbidden) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostAccountingRulesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostAccountingRulesNotFound creates a PostAccountingRulesNotFound with default headers values +func NewPostAccountingRulesNotFound() *PostAccountingRulesNotFound { + return &PostAccountingRulesNotFound{} +} + +/*PostAccountingRulesNotFound handles this case with default header values. + +Resource was not found +*/ +type PostAccountingRulesNotFound struct { + Payload *ledger_models.Error +} + +func (o *PostAccountingRulesNotFound) Error() string { + return fmt.Sprintf("[POST /accountingrules][%d] postAccountingRulesNotFound %+v", 404, o.Payload) +} + +func (o *PostAccountingRulesNotFound) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostAccountingRulesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostAccountingRulesUnprocessableEntity creates a PostAccountingRulesUnprocessableEntity with default headers values +func NewPostAccountingRulesUnprocessableEntity() *PostAccountingRulesUnprocessableEntity { + return &PostAccountingRulesUnprocessableEntity{} +} + +/*PostAccountingRulesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostAccountingRulesUnprocessableEntity struct { + Payload *ledger_models.Error +} + +func (o *PostAccountingRulesUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /accountingrules][%d] postAccountingRulesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostAccountingRulesUnprocessableEntity) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostAccountingRulesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostAccountingRulesInternalServerError creates a PostAccountingRulesInternalServerError with default headers values +func NewPostAccountingRulesInternalServerError() *PostAccountingRulesInternalServerError { + return &PostAccountingRulesInternalServerError{} +} + +/*PostAccountingRulesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostAccountingRulesInternalServerError struct { + Payload *ledger_models.Error +} + +func (o *PostAccountingRulesInternalServerError) Error() string { + return fmt.Sprintf("[POST /accountingrules][%d] postAccountingRulesInternalServerError %+v", 500, o.Payload) +} + +func (o *PostAccountingRulesInternalServerError) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostAccountingRulesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ledger/v0.0.1/ledger_client/accounting_ruleset/accounting_ruleset_client.go b/api/ledger/v0.0.1/ledger_client/accounting_ruleset/accounting_ruleset_client.go new file mode 100644 index 0000000..d384eb3 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/accounting_ruleset/accounting_ruleset_client.go @@ -0,0 +1,118 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package accounting_ruleset + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new accounting ruleset API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for accounting ruleset API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetAccountingRulesets(params *GetAccountingRulesetsParams, authInfo runtime.ClientAuthInfoWriter) (*GetAccountingRulesetsOK, error) + + PostAccountingRulesets(params *PostAccountingRulesetsParams, authInfo runtime.ClientAuthInfoWriter) (*PostAccountingRulesetsOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetAccountingRulesets gets a list of accounting rulessets + + Return a list of available Accounting Rulessets +*/ +func (a *Client) GetAccountingRulesets(params *GetAccountingRulesetsParams, authInfo runtime.ClientAuthInfoWriter) (*GetAccountingRulesetsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetAccountingRulesetsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getAccountingRulesets", + Method: "GET", + PathPattern: "/accountingrulesets", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetAccountingRulesetsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetAccountingRulesetsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getAccountingRulesets: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostAccountingRulesets creates new accounting rulessets + + Create new Accounting Rulessets +*/ +func (a *Client) PostAccountingRulesets(params *PostAccountingRulesetsParams, authInfo runtime.ClientAuthInfoWriter) (*PostAccountingRulesetsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostAccountingRulesetsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postAccountingRulesets", + Method: "POST", + PathPattern: "/accountingrulesets", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostAccountingRulesetsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostAccountingRulesetsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postAccountingRulesets: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/ledger/v0.0.1/ledger_client/accounting_ruleset/get_accounting_rulesets_parameters.go b/api/ledger/v0.0.1/ledger_client/accounting_ruleset/get_accounting_rulesets_parameters.go new file mode 100644 index 0000000..02c347e --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/accounting_ruleset/get_accounting_rulesets_parameters.go @@ -0,0 +1,208 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package accounting_ruleset + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetAccountingRulesetsParams creates a new GetAccountingRulesetsParams object +// with the default values initialized. +func NewGetAccountingRulesetsParams() *GetAccountingRulesetsParams { + var () + return &GetAccountingRulesetsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetAccountingRulesetsParamsWithTimeout creates a new GetAccountingRulesetsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetAccountingRulesetsParamsWithTimeout(timeout time.Duration) *GetAccountingRulesetsParams { + var () + return &GetAccountingRulesetsParams{ + + timeout: timeout, + } +} + +// NewGetAccountingRulesetsParamsWithContext creates a new GetAccountingRulesetsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetAccountingRulesetsParamsWithContext(ctx context.Context) *GetAccountingRulesetsParams { + var () + return &GetAccountingRulesetsParams{ + + Context: ctx, + } +} + +// NewGetAccountingRulesetsParamsWithHTTPClient creates a new GetAccountingRulesetsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetAccountingRulesetsParamsWithHTTPClient(client *http.Client) *GetAccountingRulesetsParams { + var () + return &GetAccountingRulesetsParams{ + HTTPClient: client, + } +} + +/*GetAccountingRulesetsParams contains all the parameters to send to the API endpoint +for the get accounting rulesets operation typically these are written to a http.Request +*/ +type GetAccountingRulesetsParams struct { + + /*AccountID + Taxnexus Record Id of an Account + + */ + AccountID string + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get accounting rulesets params +func (o *GetAccountingRulesetsParams) WithTimeout(timeout time.Duration) *GetAccountingRulesetsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get accounting rulesets params +func (o *GetAccountingRulesetsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get accounting rulesets params +func (o *GetAccountingRulesetsParams) WithContext(ctx context.Context) *GetAccountingRulesetsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get accounting rulesets params +func (o *GetAccountingRulesetsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get accounting rulesets params +func (o *GetAccountingRulesetsParams) WithHTTPClient(client *http.Client) *GetAccountingRulesetsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get accounting rulesets params +func (o *GetAccountingRulesetsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAccountID adds the accountID to the get accounting rulesets params +func (o *GetAccountingRulesetsParams) WithAccountID(accountID string) *GetAccountingRulesetsParams { + o.SetAccountID(accountID) + return o +} + +// SetAccountID adds the accountId to the get accounting rulesets params +func (o *GetAccountingRulesetsParams) SetAccountID(accountID string) { + o.AccountID = accountID +} + +// WithLimit adds the limit to the get accounting rulesets params +func (o *GetAccountingRulesetsParams) WithLimit(limit *int64) *GetAccountingRulesetsParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get accounting rulesets params +func (o *GetAccountingRulesetsParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get accounting rulesets params +func (o *GetAccountingRulesetsParams) WithOffset(offset *int64) *GetAccountingRulesetsParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get accounting rulesets params +func (o *GetAccountingRulesetsParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *GetAccountingRulesetsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param accountId + qrAccountID := o.AccountID + qAccountID := qrAccountID + if qAccountID != "" { + if err := r.SetQueryParam("accountId", qAccountID); err != nil { + return err + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ledger/v0.0.1/ledger_client/accounting_ruleset/get_accounting_rulesets_responses.go b/api/ledger/v0.0.1/ledger_client/accounting_ruleset/get_accounting_rulesets_responses.go new file mode 100644 index 0000000..80939ed --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/accounting_ruleset/get_accounting_rulesets_responses.go @@ -0,0 +1,268 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package accounting_ruleset + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ledger/ledger_models" +) + +// GetAccountingRulesetsReader is a Reader for the GetAccountingRulesets structure. +type GetAccountingRulesetsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetAccountingRulesetsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetAccountingRulesetsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetAccountingRulesetsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetAccountingRulesetsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetAccountingRulesetsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetAccountingRulesetsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetAccountingRulesetsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetAccountingRulesetsOK creates a GetAccountingRulesetsOK with default headers values +func NewGetAccountingRulesetsOK() *GetAccountingRulesetsOK { + return &GetAccountingRulesetsOK{} +} + +/*GetAccountingRulesetsOK handles this case with default header values. + +Taxnexus Response with Accounting Ruleset objects +*/ +type GetAccountingRulesetsOK struct { + Payload *ledger_models.AccountingRulesetResponse +} + +func (o *GetAccountingRulesetsOK) Error() string { + return fmt.Sprintf("[GET /accountingrulesets][%d] getAccountingRulesetsOK %+v", 200, o.Payload) +} + +func (o *GetAccountingRulesetsOK) GetPayload() *ledger_models.AccountingRulesetResponse { + return o.Payload +} + +func (o *GetAccountingRulesetsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.AccountingRulesetResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAccountingRulesetsUnauthorized creates a GetAccountingRulesetsUnauthorized with default headers values +func NewGetAccountingRulesetsUnauthorized() *GetAccountingRulesetsUnauthorized { + return &GetAccountingRulesetsUnauthorized{} +} + +/*GetAccountingRulesetsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetAccountingRulesetsUnauthorized struct { + Payload *ledger_models.Error +} + +func (o *GetAccountingRulesetsUnauthorized) Error() string { + return fmt.Sprintf("[GET /accountingrulesets][%d] getAccountingRulesetsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetAccountingRulesetsUnauthorized) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetAccountingRulesetsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAccountingRulesetsForbidden creates a GetAccountingRulesetsForbidden with default headers values +func NewGetAccountingRulesetsForbidden() *GetAccountingRulesetsForbidden { + return &GetAccountingRulesetsForbidden{} +} + +/*GetAccountingRulesetsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetAccountingRulesetsForbidden struct { + Payload *ledger_models.Error +} + +func (o *GetAccountingRulesetsForbidden) Error() string { + return fmt.Sprintf("[GET /accountingrulesets][%d] getAccountingRulesetsForbidden %+v", 403, o.Payload) +} + +func (o *GetAccountingRulesetsForbidden) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetAccountingRulesetsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAccountingRulesetsNotFound creates a GetAccountingRulesetsNotFound with default headers values +func NewGetAccountingRulesetsNotFound() *GetAccountingRulesetsNotFound { + return &GetAccountingRulesetsNotFound{} +} + +/*GetAccountingRulesetsNotFound handles this case with default header values. + +Resource was not found +*/ +type GetAccountingRulesetsNotFound struct { + Payload *ledger_models.Error +} + +func (o *GetAccountingRulesetsNotFound) Error() string { + return fmt.Sprintf("[GET /accountingrulesets][%d] getAccountingRulesetsNotFound %+v", 404, o.Payload) +} + +func (o *GetAccountingRulesetsNotFound) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetAccountingRulesetsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAccountingRulesetsUnprocessableEntity creates a GetAccountingRulesetsUnprocessableEntity with default headers values +func NewGetAccountingRulesetsUnprocessableEntity() *GetAccountingRulesetsUnprocessableEntity { + return &GetAccountingRulesetsUnprocessableEntity{} +} + +/*GetAccountingRulesetsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetAccountingRulesetsUnprocessableEntity struct { + Payload *ledger_models.Error +} + +func (o *GetAccountingRulesetsUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /accountingrulesets][%d] getAccountingRulesetsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetAccountingRulesetsUnprocessableEntity) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetAccountingRulesetsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetAccountingRulesetsInternalServerError creates a GetAccountingRulesetsInternalServerError with default headers values +func NewGetAccountingRulesetsInternalServerError() *GetAccountingRulesetsInternalServerError { + return &GetAccountingRulesetsInternalServerError{} +} + +/*GetAccountingRulesetsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetAccountingRulesetsInternalServerError struct { + Payload *ledger_models.Error +} + +func (o *GetAccountingRulesetsInternalServerError) Error() string { + return fmt.Sprintf("[GET /accountingrulesets][%d] getAccountingRulesetsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetAccountingRulesetsInternalServerError) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetAccountingRulesetsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ledger/v0.0.1/ledger_client/accounting_ruleset/post_accounting_rulesets_parameters.go b/api/ledger/v0.0.1/ledger_client/accounting_ruleset/post_accounting_rulesets_parameters.go new file mode 100644 index 0000000..b373e25 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/accounting_ruleset/post_accounting_rulesets_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package accounting_ruleset + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ledger/ledger_models" +) + +// NewPostAccountingRulesetsParams creates a new PostAccountingRulesetsParams object +// with the default values initialized. +func NewPostAccountingRulesetsParams() *PostAccountingRulesetsParams { + var () + return &PostAccountingRulesetsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostAccountingRulesetsParamsWithTimeout creates a new PostAccountingRulesetsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostAccountingRulesetsParamsWithTimeout(timeout time.Duration) *PostAccountingRulesetsParams { + var () + return &PostAccountingRulesetsParams{ + + timeout: timeout, + } +} + +// NewPostAccountingRulesetsParamsWithContext creates a new PostAccountingRulesetsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostAccountingRulesetsParamsWithContext(ctx context.Context) *PostAccountingRulesetsParams { + var () + return &PostAccountingRulesetsParams{ + + Context: ctx, + } +} + +// NewPostAccountingRulesetsParamsWithHTTPClient creates a new PostAccountingRulesetsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostAccountingRulesetsParamsWithHTTPClient(client *http.Client) *PostAccountingRulesetsParams { + var () + return &PostAccountingRulesetsParams{ + HTTPClient: client, + } +} + +/*PostAccountingRulesetsParams contains all the parameters to send to the API endpoint +for the post accounting rulesets operation typically these are written to a http.Request +*/ +type PostAccountingRulesetsParams struct { + + /*AccountingRulesetRequest + An array of Accounting Ruleset records + + */ + AccountingRulesetRequest *ledger_models.AccountingRulesetRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post accounting rulesets params +func (o *PostAccountingRulesetsParams) WithTimeout(timeout time.Duration) *PostAccountingRulesetsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post accounting rulesets params +func (o *PostAccountingRulesetsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post accounting rulesets params +func (o *PostAccountingRulesetsParams) WithContext(ctx context.Context) *PostAccountingRulesetsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post accounting rulesets params +func (o *PostAccountingRulesetsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post accounting rulesets params +func (o *PostAccountingRulesetsParams) WithHTTPClient(client *http.Client) *PostAccountingRulesetsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post accounting rulesets params +func (o *PostAccountingRulesetsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAccountingRulesetRequest adds the accountingRulesetRequest to the post accounting rulesets params +func (o *PostAccountingRulesetsParams) WithAccountingRulesetRequest(accountingRulesetRequest *ledger_models.AccountingRulesetRequest) *PostAccountingRulesetsParams { + o.SetAccountingRulesetRequest(accountingRulesetRequest) + return o +} + +// SetAccountingRulesetRequest adds the accountingRulesetRequest to the post accounting rulesets params +func (o *PostAccountingRulesetsParams) SetAccountingRulesetRequest(accountingRulesetRequest *ledger_models.AccountingRulesetRequest) { + o.AccountingRulesetRequest = accountingRulesetRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostAccountingRulesetsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AccountingRulesetRequest != nil { + if err := r.SetBodyParam(o.AccountingRulesetRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ledger/v0.0.1/ledger_client/accounting_ruleset/post_accounting_rulesets_responses.go b/api/ledger/v0.0.1/ledger_client/accounting_ruleset/post_accounting_rulesets_responses.go new file mode 100644 index 0000000..fe97a50 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/accounting_ruleset/post_accounting_rulesets_responses.go @@ -0,0 +1,268 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package accounting_ruleset + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ledger/ledger_models" +) + +// PostAccountingRulesetsReader is a Reader for the PostAccountingRulesets structure. +type PostAccountingRulesetsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostAccountingRulesetsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostAccountingRulesetsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostAccountingRulesetsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostAccountingRulesetsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostAccountingRulesetsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostAccountingRulesetsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostAccountingRulesetsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostAccountingRulesetsOK creates a PostAccountingRulesetsOK with default headers values +func NewPostAccountingRulesetsOK() *PostAccountingRulesetsOK { + return &PostAccountingRulesetsOK{} +} + +/*PostAccountingRulesetsOK handles this case with default header values. + +Taxnexus Response with Accounting Ruleset objects +*/ +type PostAccountingRulesetsOK struct { + Payload *ledger_models.AccountingRulesetResponse +} + +func (o *PostAccountingRulesetsOK) Error() string { + return fmt.Sprintf("[POST /accountingrulesets][%d] postAccountingRulesetsOK %+v", 200, o.Payload) +} + +func (o *PostAccountingRulesetsOK) GetPayload() *ledger_models.AccountingRulesetResponse { + return o.Payload +} + +func (o *PostAccountingRulesetsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.AccountingRulesetResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostAccountingRulesetsUnauthorized creates a PostAccountingRulesetsUnauthorized with default headers values +func NewPostAccountingRulesetsUnauthorized() *PostAccountingRulesetsUnauthorized { + return &PostAccountingRulesetsUnauthorized{} +} + +/*PostAccountingRulesetsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostAccountingRulesetsUnauthorized struct { + Payload *ledger_models.Error +} + +func (o *PostAccountingRulesetsUnauthorized) Error() string { + return fmt.Sprintf("[POST /accountingrulesets][%d] postAccountingRulesetsUnauthorized %+v", 401, o.Payload) +} + +func (o *PostAccountingRulesetsUnauthorized) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostAccountingRulesetsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostAccountingRulesetsForbidden creates a PostAccountingRulesetsForbidden with default headers values +func NewPostAccountingRulesetsForbidden() *PostAccountingRulesetsForbidden { + return &PostAccountingRulesetsForbidden{} +} + +/*PostAccountingRulesetsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostAccountingRulesetsForbidden struct { + Payload *ledger_models.Error +} + +func (o *PostAccountingRulesetsForbidden) Error() string { + return fmt.Sprintf("[POST /accountingrulesets][%d] postAccountingRulesetsForbidden %+v", 403, o.Payload) +} + +func (o *PostAccountingRulesetsForbidden) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostAccountingRulesetsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostAccountingRulesetsNotFound creates a PostAccountingRulesetsNotFound with default headers values +func NewPostAccountingRulesetsNotFound() *PostAccountingRulesetsNotFound { + return &PostAccountingRulesetsNotFound{} +} + +/*PostAccountingRulesetsNotFound handles this case with default header values. + +Resource was not found +*/ +type PostAccountingRulesetsNotFound struct { + Payload *ledger_models.Error +} + +func (o *PostAccountingRulesetsNotFound) Error() string { + return fmt.Sprintf("[POST /accountingrulesets][%d] postAccountingRulesetsNotFound %+v", 404, o.Payload) +} + +func (o *PostAccountingRulesetsNotFound) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostAccountingRulesetsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostAccountingRulesetsUnprocessableEntity creates a PostAccountingRulesetsUnprocessableEntity with default headers values +func NewPostAccountingRulesetsUnprocessableEntity() *PostAccountingRulesetsUnprocessableEntity { + return &PostAccountingRulesetsUnprocessableEntity{} +} + +/*PostAccountingRulesetsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostAccountingRulesetsUnprocessableEntity struct { + Payload *ledger_models.Error +} + +func (o *PostAccountingRulesetsUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /accountingrulesets][%d] postAccountingRulesetsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostAccountingRulesetsUnprocessableEntity) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostAccountingRulesetsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostAccountingRulesetsInternalServerError creates a PostAccountingRulesetsInternalServerError with default headers values +func NewPostAccountingRulesetsInternalServerError() *PostAccountingRulesetsInternalServerError { + return &PostAccountingRulesetsInternalServerError{} +} + +/*PostAccountingRulesetsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostAccountingRulesetsInternalServerError struct { + Payload *ledger_models.Error +} + +func (o *PostAccountingRulesetsInternalServerError) Error() string { + return fmt.Sprintf("[POST /accountingrulesets][%d] postAccountingRulesetsInternalServerError %+v", 500, o.Payload) +} + +func (o *PostAccountingRulesetsInternalServerError) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostAccountingRulesetsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ledger/v0.0.1/ledger_client/coa/coa_client.go b/api/ledger/v0.0.1/ledger_client/coa/coa_client.go new file mode 100644 index 0000000..c49fe81 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/coa/coa_client.go @@ -0,0 +1,114 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package coa + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new coa API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for coa API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetCoas(params *GetCoasParams, authInfo runtime.ClientAuthInfoWriter) (*GetCoasOK, error) + + PostCoas(params *PostCoasParams, authInfo runtime.ClientAuthInfoWriter) (*PostCoasOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetCoas gets chart of accounts reports +*/ +func (a *Client) GetCoas(params *GetCoasParams, authInfo runtime.ClientAuthInfoWriter) (*GetCoasOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetCoasParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getCoas", + Method: "GET", + PathPattern: "/coas", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetCoasReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetCoasOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getCoas: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostCoas creates new accounting report +*/ +func (a *Client) PostCoas(params *PostCoasParams, authInfo runtime.ClientAuthInfoWriter) (*PostCoasOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostCoasParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postCoas", + Method: "POST", + PathPattern: "/coas", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostCoasReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostCoasOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postCoas: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/ledger/v0.0.1/ledger_client/coa/get_coas_parameters.go b/api/ledger/v0.0.1/ledger_client/coa/get_coas_parameters.go new file mode 100644 index 0000000..3cd6305 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/coa/get_coas_parameters.go @@ -0,0 +1,246 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package coa + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetCoasParams creates a new GetCoasParams object +// with the default values initialized. +func NewGetCoasParams() *GetCoasParams { + var () + return &GetCoasParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetCoasParamsWithTimeout creates a new GetCoasParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetCoasParamsWithTimeout(timeout time.Duration) *GetCoasParams { + var () + return &GetCoasParams{ + + timeout: timeout, + } +} + +// NewGetCoasParamsWithContext creates a new GetCoasParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetCoasParamsWithContext(ctx context.Context) *GetCoasParams { + var () + return &GetCoasParams{ + + Context: ctx, + } +} + +// NewGetCoasParamsWithHTTPClient creates a new GetCoasParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetCoasParamsWithHTTPClient(client *http.Client) *GetCoasParams { + var () + return &GetCoasParams{ + HTTPClient: client, + } +} + +/*GetCoasParams contains all the parameters to send to the API endpoint +for the get coas operation typically these are written to a http.Request +*/ +type GetCoasParams struct { + + /*AccountID + Taxnexus Record Id of an Account + + */ + AccountID *string + /*CoaID + Taxnexus Id of the Chart of Accounts to be retrieved + + */ + CoaID *string + /*DateFrom + The Starting Date for an object retrieval + + */ + DateFrom *string + /*DateTo + The Ending Date for an object retrieval + + */ + DateTo *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get coas params +func (o *GetCoasParams) WithTimeout(timeout time.Duration) *GetCoasParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get coas params +func (o *GetCoasParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get coas params +func (o *GetCoasParams) WithContext(ctx context.Context) *GetCoasParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get coas params +func (o *GetCoasParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get coas params +func (o *GetCoasParams) WithHTTPClient(client *http.Client) *GetCoasParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get coas params +func (o *GetCoasParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAccountID adds the accountID to the get coas params +func (o *GetCoasParams) WithAccountID(accountID *string) *GetCoasParams { + o.SetAccountID(accountID) + return o +} + +// SetAccountID adds the accountId to the get coas params +func (o *GetCoasParams) SetAccountID(accountID *string) { + o.AccountID = accountID +} + +// WithCoaID adds the coaID to the get coas params +func (o *GetCoasParams) WithCoaID(coaID *string) *GetCoasParams { + o.SetCoaID(coaID) + return o +} + +// SetCoaID adds the coaId to the get coas params +func (o *GetCoasParams) SetCoaID(coaID *string) { + o.CoaID = coaID +} + +// WithDateFrom adds the dateFrom to the get coas params +func (o *GetCoasParams) WithDateFrom(dateFrom *string) *GetCoasParams { + o.SetDateFrom(dateFrom) + return o +} + +// SetDateFrom adds the dateFrom to the get coas params +func (o *GetCoasParams) SetDateFrom(dateFrom *string) { + o.DateFrom = dateFrom +} + +// WithDateTo adds the dateTo to the get coas params +func (o *GetCoasParams) WithDateTo(dateTo *string) *GetCoasParams { + o.SetDateTo(dateTo) + return o +} + +// SetDateTo adds the dateTo to the get coas params +func (o *GetCoasParams) SetDateTo(dateTo *string) { + o.DateTo = dateTo +} + +// WriteToRequest writes these params to a swagger request +func (o *GetCoasParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AccountID != nil { + + // query param accountId + var qrAccountID string + if o.AccountID != nil { + qrAccountID = *o.AccountID + } + qAccountID := qrAccountID + if qAccountID != "" { + if err := r.SetQueryParam("accountId", qAccountID); err != nil { + return err + } + } + + } + + if o.CoaID != nil { + + // query param coaId + var qrCoaID string + if o.CoaID != nil { + qrCoaID = *o.CoaID + } + qCoaID := qrCoaID + if qCoaID != "" { + if err := r.SetQueryParam("coaId", qCoaID); err != nil { + return err + } + } + + } + + if o.DateFrom != nil { + + // query param dateFrom + var qrDateFrom string + if o.DateFrom != nil { + qrDateFrom = *o.DateFrom + } + qDateFrom := qrDateFrom + if qDateFrom != "" { + if err := r.SetQueryParam("dateFrom", qDateFrom); err != nil { + return err + } + } + + } + + if o.DateTo != nil { + + // query param dateTo + var qrDateTo string + if o.DateTo != nil { + qrDateTo = *o.DateTo + } + qDateTo := qrDateTo + if qDateTo != "" { + if err := r.SetQueryParam("dateTo", qDateTo); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ledger/v0.0.1/ledger_client/coa/get_coas_responses.go b/api/ledger/v0.0.1/ledger_client/coa/get_coas_responses.go new file mode 100644 index 0000000..de862d6 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/coa/get_coas_responses.go @@ -0,0 +1,268 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package coa + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ledger/ledger_models" +) + +// GetCoasReader is a Reader for the GetCoas structure. +type GetCoasReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetCoasReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetCoasOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetCoasUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetCoasForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetCoasNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetCoasUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetCoasInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetCoasOK creates a GetCoasOK with default headers values +func NewGetCoasOK() *GetCoasOK { + return &GetCoasOK{} +} + +/*GetCoasOK handles this case with default header values. + +Taxnexus Response with Chart of Accounts objects +*/ +type GetCoasOK struct { + Payload *ledger_models.CoaResponse +} + +func (o *GetCoasOK) Error() string { + return fmt.Sprintf("[GET /coas][%d] getCoasOK %+v", 200, o.Payload) +} + +func (o *GetCoasOK) GetPayload() *ledger_models.CoaResponse { + return o.Payload +} + +func (o *GetCoasOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.CoaResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCoasUnauthorized creates a GetCoasUnauthorized with default headers values +func NewGetCoasUnauthorized() *GetCoasUnauthorized { + return &GetCoasUnauthorized{} +} + +/*GetCoasUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetCoasUnauthorized struct { + Payload *ledger_models.Error +} + +func (o *GetCoasUnauthorized) Error() string { + return fmt.Sprintf("[GET /coas][%d] getCoasUnauthorized %+v", 401, o.Payload) +} + +func (o *GetCoasUnauthorized) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetCoasUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCoasForbidden creates a GetCoasForbidden with default headers values +func NewGetCoasForbidden() *GetCoasForbidden { + return &GetCoasForbidden{} +} + +/*GetCoasForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetCoasForbidden struct { + Payload *ledger_models.Error +} + +func (o *GetCoasForbidden) Error() string { + return fmt.Sprintf("[GET /coas][%d] getCoasForbidden %+v", 403, o.Payload) +} + +func (o *GetCoasForbidden) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetCoasForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCoasNotFound creates a GetCoasNotFound with default headers values +func NewGetCoasNotFound() *GetCoasNotFound { + return &GetCoasNotFound{} +} + +/*GetCoasNotFound handles this case with default header values. + +Resource was not found +*/ +type GetCoasNotFound struct { + Payload *ledger_models.Error +} + +func (o *GetCoasNotFound) Error() string { + return fmt.Sprintf("[GET /coas][%d] getCoasNotFound %+v", 404, o.Payload) +} + +func (o *GetCoasNotFound) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetCoasNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCoasUnprocessableEntity creates a GetCoasUnprocessableEntity with default headers values +func NewGetCoasUnprocessableEntity() *GetCoasUnprocessableEntity { + return &GetCoasUnprocessableEntity{} +} + +/*GetCoasUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetCoasUnprocessableEntity struct { + Payload *ledger_models.Error +} + +func (o *GetCoasUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /coas][%d] getCoasUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetCoasUnprocessableEntity) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetCoasUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCoasInternalServerError creates a GetCoasInternalServerError with default headers values +func NewGetCoasInternalServerError() *GetCoasInternalServerError { + return &GetCoasInternalServerError{} +} + +/*GetCoasInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetCoasInternalServerError struct { + Payload *ledger_models.Error +} + +func (o *GetCoasInternalServerError) Error() string { + return fmt.Sprintf("[GET /coas][%d] getCoasInternalServerError %+v", 500, o.Payload) +} + +func (o *GetCoasInternalServerError) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetCoasInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ledger/v0.0.1/ledger_client/coa/post_coas_parameters.go b/api/ledger/v0.0.1/ledger_client/coa/post_coas_parameters.go new file mode 100644 index 0000000..44155ad --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/coa/post_coas_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package coa + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ledger/ledger_models" +) + +// NewPostCoasParams creates a new PostCoasParams object +// with the default values initialized. +func NewPostCoasParams() *PostCoasParams { + var () + return &PostCoasParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostCoasParamsWithTimeout creates a new PostCoasParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostCoasParamsWithTimeout(timeout time.Duration) *PostCoasParams { + var () + return &PostCoasParams{ + + timeout: timeout, + } +} + +// NewPostCoasParamsWithContext creates a new PostCoasParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostCoasParamsWithContext(ctx context.Context) *PostCoasParams { + var () + return &PostCoasParams{ + + Context: ctx, + } +} + +// NewPostCoasParamsWithHTTPClient creates a new PostCoasParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostCoasParamsWithHTTPClient(client *http.Client) *PostCoasParams { + var () + return &PostCoasParams{ + HTTPClient: client, + } +} + +/*PostCoasParams contains all the parameters to send to the API endpoint +for the post coas operation typically these are written to a http.Request +*/ +type PostCoasParams struct { + + /*CoaRequest + An array of Coa records + + */ + CoaRequest *ledger_models.CoaRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post coas params +func (o *PostCoasParams) WithTimeout(timeout time.Duration) *PostCoasParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post coas params +func (o *PostCoasParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post coas params +func (o *PostCoasParams) WithContext(ctx context.Context) *PostCoasParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post coas params +func (o *PostCoasParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post coas params +func (o *PostCoasParams) WithHTTPClient(client *http.Client) *PostCoasParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post coas params +func (o *PostCoasParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCoaRequest adds the coaRequest to the post coas params +func (o *PostCoasParams) WithCoaRequest(coaRequest *ledger_models.CoaRequest) *PostCoasParams { + o.SetCoaRequest(coaRequest) + return o +} + +// SetCoaRequest adds the coaRequest to the post coas params +func (o *PostCoasParams) SetCoaRequest(coaRequest *ledger_models.CoaRequest) { + o.CoaRequest = coaRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostCoasParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CoaRequest != nil { + if err := r.SetBodyParam(o.CoaRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ledger/v0.0.1/ledger_client/coa/post_coas_responses.go b/api/ledger/v0.0.1/ledger_client/coa/post_coas_responses.go new file mode 100644 index 0000000..ac9bd4d --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/coa/post_coas_responses.go @@ -0,0 +1,268 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package coa + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ledger/ledger_models" +) + +// PostCoasReader is a Reader for the PostCoas structure. +type PostCoasReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostCoasReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostCoasOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostCoasUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostCoasForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostCoasNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostCoasUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostCoasInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostCoasOK creates a PostCoasOK with default headers values +func NewPostCoasOK() *PostCoasOK { + return &PostCoasOK{} +} + +/*PostCoasOK handles this case with default header values. + +Taxnexus Response with Chart of Accounts objects +*/ +type PostCoasOK struct { + Payload *ledger_models.CoaResponse +} + +func (o *PostCoasOK) Error() string { + return fmt.Sprintf("[POST /coas][%d] postCoasOK %+v", 200, o.Payload) +} + +func (o *PostCoasOK) GetPayload() *ledger_models.CoaResponse { + return o.Payload +} + +func (o *PostCoasOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.CoaResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCoasUnauthorized creates a PostCoasUnauthorized with default headers values +func NewPostCoasUnauthorized() *PostCoasUnauthorized { + return &PostCoasUnauthorized{} +} + +/*PostCoasUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostCoasUnauthorized struct { + Payload *ledger_models.Error +} + +func (o *PostCoasUnauthorized) Error() string { + return fmt.Sprintf("[POST /coas][%d] postCoasUnauthorized %+v", 401, o.Payload) +} + +func (o *PostCoasUnauthorized) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostCoasUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCoasForbidden creates a PostCoasForbidden with default headers values +func NewPostCoasForbidden() *PostCoasForbidden { + return &PostCoasForbidden{} +} + +/*PostCoasForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostCoasForbidden struct { + Payload *ledger_models.Error +} + +func (o *PostCoasForbidden) Error() string { + return fmt.Sprintf("[POST /coas][%d] postCoasForbidden %+v", 403, o.Payload) +} + +func (o *PostCoasForbidden) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostCoasForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCoasNotFound creates a PostCoasNotFound with default headers values +func NewPostCoasNotFound() *PostCoasNotFound { + return &PostCoasNotFound{} +} + +/*PostCoasNotFound handles this case with default header values. + +Resource was not found +*/ +type PostCoasNotFound struct { + Payload *ledger_models.Error +} + +func (o *PostCoasNotFound) Error() string { + return fmt.Sprintf("[POST /coas][%d] postCoasNotFound %+v", 404, o.Payload) +} + +func (o *PostCoasNotFound) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostCoasNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCoasUnprocessableEntity creates a PostCoasUnprocessableEntity with default headers values +func NewPostCoasUnprocessableEntity() *PostCoasUnprocessableEntity { + return &PostCoasUnprocessableEntity{} +} + +/*PostCoasUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostCoasUnprocessableEntity struct { + Payload *ledger_models.Error +} + +func (o *PostCoasUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /coas][%d] postCoasUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostCoasUnprocessableEntity) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostCoasUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCoasInternalServerError creates a PostCoasInternalServerError with default headers values +func NewPostCoasInternalServerError() *PostCoasInternalServerError { + return &PostCoasInternalServerError{} +} + +/*PostCoasInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostCoasInternalServerError struct { + Payload *ledger_models.Error +} + +func (o *PostCoasInternalServerError) Error() string { + return fmt.Sprintf("[POST /coas][%d] postCoasInternalServerError %+v", 500, o.Payload) +} + +func (o *PostCoasInternalServerError) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostCoasInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ledger/v0.0.1/ledger_client/gl_account/get_gl_accounts_parameters.go b/api/ledger/v0.0.1/ledger_client/gl_account/get_gl_accounts_parameters.go new file mode 100644 index 0000000..17697a1 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/gl_account/get_gl_accounts_parameters.go @@ -0,0 +1,247 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package gl_account + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetGlAccountsParams creates a new GetGlAccountsParams object +// with the default values initialized. +func NewGetGlAccountsParams() *GetGlAccountsParams { + var () + return &GetGlAccountsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetGlAccountsParamsWithTimeout creates a new GetGlAccountsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetGlAccountsParamsWithTimeout(timeout time.Duration) *GetGlAccountsParams { + var () + return &GetGlAccountsParams{ + + timeout: timeout, + } +} + +// NewGetGlAccountsParamsWithContext creates a new GetGlAccountsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetGlAccountsParamsWithContext(ctx context.Context) *GetGlAccountsParams { + var () + return &GetGlAccountsParams{ + + Context: ctx, + } +} + +// NewGetGlAccountsParamsWithHTTPClient creates a new GetGlAccountsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetGlAccountsParamsWithHTTPClient(client *http.Client) *GetGlAccountsParams { + var () + return &GetGlAccountsParams{ + HTTPClient: client, + } +} + +/*GetGlAccountsParams contains all the parameters to send to the API endpoint +for the get gl accounts operation typically these are written to a http.Request +*/ +type GetGlAccountsParams struct { + + /*AccountID + Taxnexus Record Id of an Account + + */ + AccountID *string + /*ID + Taxnexus Record Id + + */ + ID *string + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get gl accounts params +func (o *GetGlAccountsParams) WithTimeout(timeout time.Duration) *GetGlAccountsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get gl accounts params +func (o *GetGlAccountsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get gl accounts params +func (o *GetGlAccountsParams) WithContext(ctx context.Context) *GetGlAccountsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get gl accounts params +func (o *GetGlAccountsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get gl accounts params +func (o *GetGlAccountsParams) WithHTTPClient(client *http.Client) *GetGlAccountsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get gl accounts params +func (o *GetGlAccountsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAccountID adds the accountID to the get gl accounts params +func (o *GetGlAccountsParams) WithAccountID(accountID *string) *GetGlAccountsParams { + o.SetAccountID(accountID) + return o +} + +// SetAccountID adds the accountId to the get gl accounts params +func (o *GetGlAccountsParams) SetAccountID(accountID *string) { + o.AccountID = accountID +} + +// WithID adds the id to the get gl accounts params +func (o *GetGlAccountsParams) WithID(id *string) *GetGlAccountsParams { + o.SetID(id) + return o +} + +// SetID adds the id to the get gl accounts params +func (o *GetGlAccountsParams) SetID(id *string) { + o.ID = id +} + +// WithLimit adds the limit to the get gl accounts params +func (o *GetGlAccountsParams) WithLimit(limit *int64) *GetGlAccountsParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get gl accounts params +func (o *GetGlAccountsParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get gl accounts params +func (o *GetGlAccountsParams) WithOffset(offset *int64) *GetGlAccountsParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get gl accounts params +func (o *GetGlAccountsParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *GetGlAccountsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AccountID != nil { + + // query param accountId + var qrAccountID string + if o.AccountID != nil { + qrAccountID = *o.AccountID + } + qAccountID := qrAccountID + if qAccountID != "" { + if err := r.SetQueryParam("accountId", qAccountID); err != nil { + return err + } + } + + } + + if o.ID != nil { + + // query param id + var qrID string + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ledger/v0.0.1/ledger_client/gl_account/get_gl_accounts_responses.go b/api/ledger/v0.0.1/ledger_client/gl_account/get_gl_accounts_responses.go new file mode 100644 index 0000000..e72c5f0 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/gl_account/get_gl_accounts_responses.go @@ -0,0 +1,268 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package gl_account + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ledger/ledger_models" +) + +// GetGlAccountsReader is a Reader for the GetGlAccounts structure. +type GetGlAccountsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetGlAccountsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetGlAccountsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetGlAccountsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetGlAccountsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetGlAccountsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetGlAccountsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetGlAccountsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetGlAccountsOK creates a GetGlAccountsOK with default headers values +func NewGetGlAccountsOK() *GetGlAccountsOK { + return &GetGlAccountsOK{} +} + +/*GetGlAccountsOK handles this case with default header values. + +Taxnexus Response with GL Account objects with Journal Items +*/ +type GetGlAccountsOK struct { + Payload *ledger_models.GlAccountResponse +} + +func (o *GetGlAccountsOK) Error() string { + return fmt.Sprintf("[GET /glaccounts][%d] getGlAccountsOK %+v", 200, o.Payload) +} + +func (o *GetGlAccountsOK) GetPayload() *ledger_models.GlAccountResponse { + return o.Payload +} + +func (o *GetGlAccountsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.GlAccountResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetGlAccountsUnauthorized creates a GetGlAccountsUnauthorized with default headers values +func NewGetGlAccountsUnauthorized() *GetGlAccountsUnauthorized { + return &GetGlAccountsUnauthorized{} +} + +/*GetGlAccountsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetGlAccountsUnauthorized struct { + Payload *ledger_models.Error +} + +func (o *GetGlAccountsUnauthorized) Error() string { + return fmt.Sprintf("[GET /glaccounts][%d] getGlAccountsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetGlAccountsUnauthorized) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetGlAccountsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetGlAccountsForbidden creates a GetGlAccountsForbidden with default headers values +func NewGetGlAccountsForbidden() *GetGlAccountsForbidden { + return &GetGlAccountsForbidden{} +} + +/*GetGlAccountsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetGlAccountsForbidden struct { + Payload *ledger_models.Error +} + +func (o *GetGlAccountsForbidden) Error() string { + return fmt.Sprintf("[GET /glaccounts][%d] getGlAccountsForbidden %+v", 403, o.Payload) +} + +func (o *GetGlAccountsForbidden) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetGlAccountsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetGlAccountsNotFound creates a GetGlAccountsNotFound with default headers values +func NewGetGlAccountsNotFound() *GetGlAccountsNotFound { + return &GetGlAccountsNotFound{} +} + +/*GetGlAccountsNotFound handles this case with default header values. + +Resource was not found +*/ +type GetGlAccountsNotFound struct { + Payload *ledger_models.Error +} + +func (o *GetGlAccountsNotFound) Error() string { + return fmt.Sprintf("[GET /glaccounts][%d] getGlAccountsNotFound %+v", 404, o.Payload) +} + +func (o *GetGlAccountsNotFound) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetGlAccountsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetGlAccountsUnprocessableEntity creates a GetGlAccountsUnprocessableEntity with default headers values +func NewGetGlAccountsUnprocessableEntity() *GetGlAccountsUnprocessableEntity { + return &GetGlAccountsUnprocessableEntity{} +} + +/*GetGlAccountsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetGlAccountsUnprocessableEntity struct { + Payload *ledger_models.Error +} + +func (o *GetGlAccountsUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /glaccounts][%d] getGlAccountsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetGlAccountsUnprocessableEntity) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetGlAccountsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetGlAccountsInternalServerError creates a GetGlAccountsInternalServerError with default headers values +func NewGetGlAccountsInternalServerError() *GetGlAccountsInternalServerError { + return &GetGlAccountsInternalServerError{} +} + +/*GetGlAccountsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetGlAccountsInternalServerError struct { + Payload *ledger_models.Error +} + +func (o *GetGlAccountsInternalServerError) Error() string { + return fmt.Sprintf("[GET /glaccounts][%d] getGlAccountsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetGlAccountsInternalServerError) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetGlAccountsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ledger/v0.0.1/ledger_client/gl_account/gl_account_client.go b/api/ledger/v0.0.1/ledger_client/gl_account/gl_account_client.go new file mode 100644 index 0000000..f2af2fa --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/gl_account/gl_account_client.go @@ -0,0 +1,118 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package gl_account + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new gl account API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for gl account API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetGlAccounts(params *GetGlAccountsParams, authInfo runtime.ClientAuthInfoWriter) (*GetGlAccountsOK, error) + + PostGlAccounts(params *PostGlAccountsParams, authInfo runtime.ClientAuthInfoWriter) (*PostGlAccountsOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetGlAccounts gets a list of general accounts + + Return a list of available General Accounts +*/ +func (a *Client) GetGlAccounts(params *GetGlAccountsParams, authInfo runtime.ClientAuthInfoWriter) (*GetGlAccountsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetGlAccountsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getGlAccounts", + Method: "GET", + PathPattern: "/glaccounts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetGlAccountsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetGlAccountsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getGlAccounts: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostGlAccounts creates new g l accounts + + Create new GL Accounts +*/ +func (a *Client) PostGlAccounts(params *PostGlAccountsParams, authInfo runtime.ClientAuthInfoWriter) (*PostGlAccountsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostGlAccountsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postGlAccounts", + Method: "POST", + PathPattern: "/glaccounts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostGlAccountsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostGlAccountsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postGlAccounts: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/ledger/v0.0.1/ledger_client/gl_account/post_gl_accounts_parameters.go b/api/ledger/v0.0.1/ledger_client/gl_account/post_gl_accounts_parameters.go new file mode 100644 index 0000000..39598c7 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/gl_account/post_gl_accounts_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package gl_account + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ledger/ledger_models" +) + +// NewPostGlAccountsParams creates a new PostGlAccountsParams object +// with the default values initialized. +func NewPostGlAccountsParams() *PostGlAccountsParams { + var () + return &PostGlAccountsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostGlAccountsParamsWithTimeout creates a new PostGlAccountsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostGlAccountsParamsWithTimeout(timeout time.Duration) *PostGlAccountsParams { + var () + return &PostGlAccountsParams{ + + timeout: timeout, + } +} + +// NewPostGlAccountsParamsWithContext creates a new PostGlAccountsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostGlAccountsParamsWithContext(ctx context.Context) *PostGlAccountsParams { + var () + return &PostGlAccountsParams{ + + Context: ctx, + } +} + +// NewPostGlAccountsParamsWithHTTPClient creates a new PostGlAccountsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostGlAccountsParamsWithHTTPClient(client *http.Client) *PostGlAccountsParams { + var () + return &PostGlAccountsParams{ + HTTPClient: client, + } +} + +/*PostGlAccountsParams contains all the parameters to send to the API endpoint +for the post gl accounts operation typically these are written to a http.Request +*/ +type PostGlAccountsParams struct { + + /*GlAccountRequest + An array of new GL Account records + + */ + GlAccountRequest *ledger_models.GlAccountRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post gl accounts params +func (o *PostGlAccountsParams) WithTimeout(timeout time.Duration) *PostGlAccountsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post gl accounts params +func (o *PostGlAccountsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post gl accounts params +func (o *PostGlAccountsParams) WithContext(ctx context.Context) *PostGlAccountsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post gl accounts params +func (o *PostGlAccountsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post gl accounts params +func (o *PostGlAccountsParams) WithHTTPClient(client *http.Client) *PostGlAccountsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post gl accounts params +func (o *PostGlAccountsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithGlAccountRequest adds the glAccountRequest to the post gl accounts params +func (o *PostGlAccountsParams) WithGlAccountRequest(glAccountRequest *ledger_models.GlAccountRequest) *PostGlAccountsParams { + o.SetGlAccountRequest(glAccountRequest) + return o +} + +// SetGlAccountRequest adds the glAccountRequest to the post gl accounts params +func (o *PostGlAccountsParams) SetGlAccountRequest(glAccountRequest *ledger_models.GlAccountRequest) { + o.GlAccountRequest = glAccountRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostGlAccountsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.GlAccountRequest != nil { + if err := r.SetBodyParam(o.GlAccountRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ledger/v0.0.1/ledger_client/gl_account/post_gl_accounts_responses.go b/api/ledger/v0.0.1/ledger_client/gl_account/post_gl_accounts_responses.go new file mode 100644 index 0000000..1b326ae --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/gl_account/post_gl_accounts_responses.go @@ -0,0 +1,268 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package gl_account + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ledger/ledger_models" +) + +// PostGlAccountsReader is a Reader for the PostGlAccounts structure. +type PostGlAccountsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostGlAccountsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostGlAccountsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostGlAccountsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostGlAccountsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostGlAccountsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostGlAccountsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostGlAccountsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostGlAccountsOK creates a PostGlAccountsOK with default headers values +func NewPostGlAccountsOK() *PostGlAccountsOK { + return &PostGlAccountsOK{} +} + +/*PostGlAccountsOK handles this case with default header values. + +Taxnexus Response with GL Account objects with Journal Items +*/ +type PostGlAccountsOK struct { + Payload *ledger_models.GlAccountResponse +} + +func (o *PostGlAccountsOK) Error() string { + return fmt.Sprintf("[POST /glaccounts][%d] postGlAccountsOK %+v", 200, o.Payload) +} + +func (o *PostGlAccountsOK) GetPayload() *ledger_models.GlAccountResponse { + return o.Payload +} + +func (o *PostGlAccountsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.GlAccountResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostGlAccountsUnauthorized creates a PostGlAccountsUnauthorized with default headers values +func NewPostGlAccountsUnauthorized() *PostGlAccountsUnauthorized { + return &PostGlAccountsUnauthorized{} +} + +/*PostGlAccountsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostGlAccountsUnauthorized struct { + Payload *ledger_models.Error +} + +func (o *PostGlAccountsUnauthorized) Error() string { + return fmt.Sprintf("[POST /glaccounts][%d] postGlAccountsUnauthorized %+v", 401, o.Payload) +} + +func (o *PostGlAccountsUnauthorized) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostGlAccountsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostGlAccountsForbidden creates a PostGlAccountsForbidden with default headers values +func NewPostGlAccountsForbidden() *PostGlAccountsForbidden { + return &PostGlAccountsForbidden{} +} + +/*PostGlAccountsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostGlAccountsForbidden struct { + Payload *ledger_models.Error +} + +func (o *PostGlAccountsForbidden) Error() string { + return fmt.Sprintf("[POST /glaccounts][%d] postGlAccountsForbidden %+v", 403, o.Payload) +} + +func (o *PostGlAccountsForbidden) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostGlAccountsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostGlAccountsNotFound creates a PostGlAccountsNotFound with default headers values +func NewPostGlAccountsNotFound() *PostGlAccountsNotFound { + return &PostGlAccountsNotFound{} +} + +/*PostGlAccountsNotFound handles this case with default header values. + +Resource was not found +*/ +type PostGlAccountsNotFound struct { + Payload *ledger_models.Error +} + +func (o *PostGlAccountsNotFound) Error() string { + return fmt.Sprintf("[POST /glaccounts][%d] postGlAccountsNotFound %+v", 404, o.Payload) +} + +func (o *PostGlAccountsNotFound) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostGlAccountsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostGlAccountsUnprocessableEntity creates a PostGlAccountsUnprocessableEntity with default headers values +func NewPostGlAccountsUnprocessableEntity() *PostGlAccountsUnprocessableEntity { + return &PostGlAccountsUnprocessableEntity{} +} + +/*PostGlAccountsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostGlAccountsUnprocessableEntity struct { + Payload *ledger_models.Error +} + +func (o *PostGlAccountsUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /glaccounts][%d] postGlAccountsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostGlAccountsUnprocessableEntity) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostGlAccountsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostGlAccountsInternalServerError creates a PostGlAccountsInternalServerError with default headers values +func NewPostGlAccountsInternalServerError() *PostGlAccountsInternalServerError { + return &PostGlAccountsInternalServerError{} +} + +/*PostGlAccountsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostGlAccountsInternalServerError struct { + Payload *ledger_models.Error +} + +func (o *PostGlAccountsInternalServerError) Error() string { + return fmt.Sprintf("[POST /glaccounts][%d] postGlAccountsInternalServerError %+v", 500, o.Payload) +} + +func (o *PostGlAccountsInternalServerError) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostGlAccountsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ledger/v0.0.1/ledger_client/gl_balance/get_gl_balances_parameters.go b/api/ledger/v0.0.1/ledger_client/gl_balance/get_gl_balances_parameters.go new file mode 100644 index 0000000..e8b1b59 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/gl_balance/get_gl_balances_parameters.go @@ -0,0 +1,246 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package gl_balance + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetGlBalancesParams creates a new GetGlBalancesParams object +// with the default values initialized. +func NewGetGlBalancesParams() *GetGlBalancesParams { + var () + return &GetGlBalancesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetGlBalancesParamsWithTimeout creates a new GetGlBalancesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetGlBalancesParamsWithTimeout(timeout time.Duration) *GetGlBalancesParams { + var () + return &GetGlBalancesParams{ + + timeout: timeout, + } +} + +// NewGetGlBalancesParamsWithContext creates a new GetGlBalancesParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetGlBalancesParamsWithContext(ctx context.Context) *GetGlBalancesParams { + var () + return &GetGlBalancesParams{ + + Context: ctx, + } +} + +// NewGetGlBalancesParamsWithHTTPClient creates a new GetGlBalancesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetGlBalancesParamsWithHTTPClient(client *http.Client) *GetGlBalancesParams { + var () + return &GetGlBalancesParams{ + HTTPClient: client, + } +} + +/*GetGlBalancesParams contains all the parameters to send to the API endpoint +for the get gl balances operation typically these are written to a http.Request +*/ +type GetGlBalancesParams struct { + + /*AccountID + Taxnexus Record Id of an Account + + */ + AccountID *string + /*GlAccountID + Taxnexus Record Id of Gl Account Record + + */ + GlAccountID *string + /*ID + Taxnexus Record Id + + */ + ID *string + /*PeriodID + Taxnexus Record Id of a Period + + */ + PeriodID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get gl balances params +func (o *GetGlBalancesParams) WithTimeout(timeout time.Duration) *GetGlBalancesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get gl balances params +func (o *GetGlBalancesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get gl balances params +func (o *GetGlBalancesParams) WithContext(ctx context.Context) *GetGlBalancesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get gl balances params +func (o *GetGlBalancesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get gl balances params +func (o *GetGlBalancesParams) WithHTTPClient(client *http.Client) *GetGlBalancesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get gl balances params +func (o *GetGlBalancesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAccountID adds the accountID to the get gl balances params +func (o *GetGlBalancesParams) WithAccountID(accountID *string) *GetGlBalancesParams { + o.SetAccountID(accountID) + return o +} + +// SetAccountID adds the accountId to the get gl balances params +func (o *GetGlBalancesParams) SetAccountID(accountID *string) { + o.AccountID = accountID +} + +// WithGlAccountID adds the glAccountID to the get gl balances params +func (o *GetGlBalancesParams) WithGlAccountID(glAccountID *string) *GetGlBalancesParams { + o.SetGlAccountID(glAccountID) + return o +} + +// SetGlAccountID adds the glAccountId to the get gl balances params +func (o *GetGlBalancesParams) SetGlAccountID(glAccountID *string) { + o.GlAccountID = glAccountID +} + +// WithID adds the id to the get gl balances params +func (o *GetGlBalancesParams) WithID(id *string) *GetGlBalancesParams { + o.SetID(id) + return o +} + +// SetID adds the id to the get gl balances params +func (o *GetGlBalancesParams) SetID(id *string) { + o.ID = id +} + +// WithPeriodID adds the periodID to the get gl balances params +func (o *GetGlBalancesParams) WithPeriodID(periodID *string) *GetGlBalancesParams { + o.SetPeriodID(periodID) + return o +} + +// SetPeriodID adds the periodId to the get gl balances params +func (o *GetGlBalancesParams) SetPeriodID(periodID *string) { + o.PeriodID = periodID +} + +// WriteToRequest writes these params to a swagger request +func (o *GetGlBalancesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AccountID != nil { + + // query param accountId + var qrAccountID string + if o.AccountID != nil { + qrAccountID = *o.AccountID + } + qAccountID := qrAccountID + if qAccountID != "" { + if err := r.SetQueryParam("accountId", qAccountID); err != nil { + return err + } + } + + } + + if o.GlAccountID != nil { + + // query param glAccountId + var qrGlAccountID string + if o.GlAccountID != nil { + qrGlAccountID = *o.GlAccountID + } + qGlAccountID := qrGlAccountID + if qGlAccountID != "" { + if err := r.SetQueryParam("glAccountId", qGlAccountID); err != nil { + return err + } + } + + } + + if o.ID != nil { + + // query param id + var qrID string + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + + } + + if o.PeriodID != nil { + + // query param periodId + var qrPeriodID string + if o.PeriodID != nil { + qrPeriodID = *o.PeriodID + } + qPeriodID := qrPeriodID + if qPeriodID != "" { + if err := r.SetQueryParam("periodId", qPeriodID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ledger/v0.0.1/ledger_client/gl_balance/get_gl_balances_responses.go b/api/ledger/v0.0.1/ledger_client/gl_balance/get_gl_balances_responses.go new file mode 100644 index 0000000..2a8234f --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/gl_balance/get_gl_balances_responses.go @@ -0,0 +1,268 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package gl_balance + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ledger/ledger_models" +) + +// GetGlBalancesReader is a Reader for the GetGlBalances structure. +type GetGlBalancesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetGlBalancesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetGlBalancesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetGlBalancesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetGlBalancesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetGlBalancesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetGlBalancesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetGlBalancesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetGlBalancesOK creates a GetGlBalancesOK with default headers values +func NewGetGlBalancesOK() *GetGlBalancesOK { + return &GetGlBalancesOK{} +} + +/*GetGlBalancesOK handles this case with default header values. + +Taxnexus Response with GL Account objects with Journal Items +*/ +type GetGlBalancesOK struct { + Payload *ledger_models.GlBalanceResponse +} + +func (o *GetGlBalancesOK) Error() string { + return fmt.Sprintf("[GET /glbalances][%d] getGlBalancesOK %+v", 200, o.Payload) +} + +func (o *GetGlBalancesOK) GetPayload() *ledger_models.GlBalanceResponse { + return o.Payload +} + +func (o *GetGlBalancesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.GlBalanceResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetGlBalancesUnauthorized creates a GetGlBalancesUnauthorized with default headers values +func NewGetGlBalancesUnauthorized() *GetGlBalancesUnauthorized { + return &GetGlBalancesUnauthorized{} +} + +/*GetGlBalancesUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetGlBalancesUnauthorized struct { + Payload *ledger_models.Error +} + +func (o *GetGlBalancesUnauthorized) Error() string { + return fmt.Sprintf("[GET /glbalances][%d] getGlBalancesUnauthorized %+v", 401, o.Payload) +} + +func (o *GetGlBalancesUnauthorized) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetGlBalancesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetGlBalancesForbidden creates a GetGlBalancesForbidden with default headers values +func NewGetGlBalancesForbidden() *GetGlBalancesForbidden { + return &GetGlBalancesForbidden{} +} + +/*GetGlBalancesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetGlBalancesForbidden struct { + Payload *ledger_models.Error +} + +func (o *GetGlBalancesForbidden) Error() string { + return fmt.Sprintf("[GET /glbalances][%d] getGlBalancesForbidden %+v", 403, o.Payload) +} + +func (o *GetGlBalancesForbidden) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetGlBalancesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetGlBalancesNotFound creates a GetGlBalancesNotFound with default headers values +func NewGetGlBalancesNotFound() *GetGlBalancesNotFound { + return &GetGlBalancesNotFound{} +} + +/*GetGlBalancesNotFound handles this case with default header values. + +Resource was not found +*/ +type GetGlBalancesNotFound struct { + Payload *ledger_models.Error +} + +func (o *GetGlBalancesNotFound) Error() string { + return fmt.Sprintf("[GET /glbalances][%d] getGlBalancesNotFound %+v", 404, o.Payload) +} + +func (o *GetGlBalancesNotFound) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetGlBalancesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetGlBalancesUnprocessableEntity creates a GetGlBalancesUnprocessableEntity with default headers values +func NewGetGlBalancesUnprocessableEntity() *GetGlBalancesUnprocessableEntity { + return &GetGlBalancesUnprocessableEntity{} +} + +/*GetGlBalancesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetGlBalancesUnprocessableEntity struct { + Payload *ledger_models.Error +} + +func (o *GetGlBalancesUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /glbalances][%d] getGlBalancesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetGlBalancesUnprocessableEntity) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetGlBalancesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetGlBalancesInternalServerError creates a GetGlBalancesInternalServerError with default headers values +func NewGetGlBalancesInternalServerError() *GetGlBalancesInternalServerError { + return &GetGlBalancesInternalServerError{} +} + +/*GetGlBalancesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetGlBalancesInternalServerError struct { + Payload *ledger_models.Error +} + +func (o *GetGlBalancesInternalServerError) Error() string { + return fmt.Sprintf("[GET /glbalances][%d] getGlBalancesInternalServerError %+v", 500, o.Payload) +} + +func (o *GetGlBalancesInternalServerError) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetGlBalancesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ledger/v0.0.1/ledger_client/gl_balance/gl_balance_client.go b/api/ledger/v0.0.1/ledger_client/gl_balance/gl_balance_client.go new file mode 100644 index 0000000..26a14a7 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/gl_balance/gl_balance_client.go @@ -0,0 +1,118 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package gl_balance + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new gl balance API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for gl balance API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetGlBalances(params *GetGlBalancesParams, authInfo runtime.ClientAuthInfoWriter) (*GetGlBalancesOK, error) + + PostGlBalances(params *PostGlBalancesParams, authInfo runtime.ClientAuthInfoWriter) (*PostGlBalancesOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetGlBalances gets one or more general account balance records + + Return a list of General Account Balances for a Taxnexus Account +*/ +func (a *Client) GetGlBalances(params *GetGlBalancesParams, authInfo runtime.ClientAuthInfoWriter) (*GetGlBalancesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetGlBalancesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getGlBalances", + Method: "GET", + PathPattern: "/glbalances", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetGlBalancesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetGlBalancesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getGlBalances: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostGlBalances inserts a g l balance + + Insert new GL Balance records +*/ +func (a *Client) PostGlBalances(params *PostGlBalancesParams, authInfo runtime.ClientAuthInfoWriter) (*PostGlBalancesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostGlBalancesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postGlBalances", + Method: "POST", + PathPattern: "/glbalances", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostGlBalancesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostGlBalancesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postGlBalances: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/ledger/v0.0.1/ledger_client/gl_balance/post_gl_balances_parameters.go b/api/ledger/v0.0.1/ledger_client/gl_balance/post_gl_balances_parameters.go new file mode 100644 index 0000000..015f3ce --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/gl_balance/post_gl_balances_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package gl_balance + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ledger/ledger_models" +) + +// NewPostGlBalancesParams creates a new PostGlBalancesParams object +// with the default values initialized. +func NewPostGlBalancesParams() *PostGlBalancesParams { + var () + return &PostGlBalancesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostGlBalancesParamsWithTimeout creates a new PostGlBalancesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostGlBalancesParamsWithTimeout(timeout time.Duration) *PostGlBalancesParams { + var () + return &PostGlBalancesParams{ + + timeout: timeout, + } +} + +// NewPostGlBalancesParamsWithContext creates a new PostGlBalancesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostGlBalancesParamsWithContext(ctx context.Context) *PostGlBalancesParams { + var () + return &PostGlBalancesParams{ + + Context: ctx, + } +} + +// NewPostGlBalancesParamsWithHTTPClient creates a new PostGlBalancesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostGlBalancesParamsWithHTTPClient(client *http.Client) *PostGlBalancesParams { + var () + return &PostGlBalancesParams{ + HTTPClient: client, + } +} + +/*PostGlBalancesParams contains all the parameters to send to the API endpoint +for the post gl balances operation typically these are written to a http.Request +*/ +type PostGlBalancesParams struct { + + /*GlBalanceRequest + An array of new GL Balance records + + */ + GlBalanceRequest *ledger_models.GlBalanceRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post gl balances params +func (o *PostGlBalancesParams) WithTimeout(timeout time.Duration) *PostGlBalancesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post gl balances params +func (o *PostGlBalancesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post gl balances params +func (o *PostGlBalancesParams) WithContext(ctx context.Context) *PostGlBalancesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post gl balances params +func (o *PostGlBalancesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post gl balances params +func (o *PostGlBalancesParams) WithHTTPClient(client *http.Client) *PostGlBalancesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post gl balances params +func (o *PostGlBalancesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithGlBalanceRequest adds the glBalanceRequest to the post gl balances params +func (o *PostGlBalancesParams) WithGlBalanceRequest(glBalanceRequest *ledger_models.GlBalanceRequest) *PostGlBalancesParams { + o.SetGlBalanceRequest(glBalanceRequest) + return o +} + +// SetGlBalanceRequest adds the glBalanceRequest to the post gl balances params +func (o *PostGlBalancesParams) SetGlBalanceRequest(glBalanceRequest *ledger_models.GlBalanceRequest) { + o.GlBalanceRequest = glBalanceRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostGlBalancesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.GlBalanceRequest != nil { + if err := r.SetBodyParam(o.GlBalanceRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ledger/v0.0.1/ledger_client/gl_balance/post_gl_balances_responses.go b/api/ledger/v0.0.1/ledger_client/gl_balance/post_gl_balances_responses.go new file mode 100644 index 0000000..72b14e0 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/gl_balance/post_gl_balances_responses.go @@ -0,0 +1,268 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package gl_balance + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ledger/ledger_models" +) + +// PostGlBalancesReader is a Reader for the PostGlBalances structure. +type PostGlBalancesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostGlBalancesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostGlBalancesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostGlBalancesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostGlBalancesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostGlBalancesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostGlBalancesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostGlBalancesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostGlBalancesOK creates a PostGlBalancesOK with default headers values +func NewPostGlBalancesOK() *PostGlBalancesOK { + return &PostGlBalancesOK{} +} + +/*PostGlBalancesOK handles this case with default header values. + +Taxnexus Response with GL Account objects with Journal Items +*/ +type PostGlBalancesOK struct { + Payload *ledger_models.GlBalanceResponse +} + +func (o *PostGlBalancesOK) Error() string { + return fmt.Sprintf("[POST /glbalances][%d] postGlBalancesOK %+v", 200, o.Payload) +} + +func (o *PostGlBalancesOK) GetPayload() *ledger_models.GlBalanceResponse { + return o.Payload +} + +func (o *PostGlBalancesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.GlBalanceResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostGlBalancesUnauthorized creates a PostGlBalancesUnauthorized with default headers values +func NewPostGlBalancesUnauthorized() *PostGlBalancesUnauthorized { + return &PostGlBalancesUnauthorized{} +} + +/*PostGlBalancesUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostGlBalancesUnauthorized struct { + Payload *ledger_models.Error +} + +func (o *PostGlBalancesUnauthorized) Error() string { + return fmt.Sprintf("[POST /glbalances][%d] postGlBalancesUnauthorized %+v", 401, o.Payload) +} + +func (o *PostGlBalancesUnauthorized) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostGlBalancesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostGlBalancesForbidden creates a PostGlBalancesForbidden with default headers values +func NewPostGlBalancesForbidden() *PostGlBalancesForbidden { + return &PostGlBalancesForbidden{} +} + +/*PostGlBalancesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostGlBalancesForbidden struct { + Payload *ledger_models.Error +} + +func (o *PostGlBalancesForbidden) Error() string { + return fmt.Sprintf("[POST /glbalances][%d] postGlBalancesForbidden %+v", 403, o.Payload) +} + +func (o *PostGlBalancesForbidden) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostGlBalancesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostGlBalancesNotFound creates a PostGlBalancesNotFound with default headers values +func NewPostGlBalancesNotFound() *PostGlBalancesNotFound { + return &PostGlBalancesNotFound{} +} + +/*PostGlBalancesNotFound handles this case with default header values. + +Resource was not found +*/ +type PostGlBalancesNotFound struct { + Payload *ledger_models.Error +} + +func (o *PostGlBalancesNotFound) Error() string { + return fmt.Sprintf("[POST /glbalances][%d] postGlBalancesNotFound %+v", 404, o.Payload) +} + +func (o *PostGlBalancesNotFound) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostGlBalancesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostGlBalancesUnprocessableEntity creates a PostGlBalancesUnprocessableEntity with default headers values +func NewPostGlBalancesUnprocessableEntity() *PostGlBalancesUnprocessableEntity { + return &PostGlBalancesUnprocessableEntity{} +} + +/*PostGlBalancesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostGlBalancesUnprocessableEntity struct { + Payload *ledger_models.Error +} + +func (o *PostGlBalancesUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /glbalances][%d] postGlBalancesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostGlBalancesUnprocessableEntity) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostGlBalancesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostGlBalancesInternalServerError creates a PostGlBalancesInternalServerError with default headers values +func NewPostGlBalancesInternalServerError() *PostGlBalancesInternalServerError { + return &PostGlBalancesInternalServerError{} +} + +/*PostGlBalancesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostGlBalancesInternalServerError struct { + Payload *ledger_models.Error +} + +func (o *PostGlBalancesInternalServerError) Error() string { + return fmt.Sprintf("[POST /glbalances][%d] postGlBalancesInternalServerError %+v", 500, o.Payload) +} + +func (o *PostGlBalancesInternalServerError) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostGlBalancesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ledger/v0.0.1/ledger_client/journal_entry/get_journal_entries_parameters.go b/api/ledger/v0.0.1/ledger_client/journal_entry/get_journal_entries_parameters.go new file mode 100644 index 0000000..ea8e9ad --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/journal_entry/get_journal_entries_parameters.go @@ -0,0 +1,311 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package journal_entry + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetJournalEntriesParams creates a new GetJournalEntriesParams object +// with the default values initialized. +func NewGetJournalEntriesParams() *GetJournalEntriesParams { + var () + return &GetJournalEntriesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetJournalEntriesParamsWithTimeout creates a new GetJournalEntriesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetJournalEntriesParamsWithTimeout(timeout time.Duration) *GetJournalEntriesParams { + var () + return &GetJournalEntriesParams{ + + timeout: timeout, + } +} + +// NewGetJournalEntriesParamsWithContext creates a new GetJournalEntriesParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetJournalEntriesParamsWithContext(ctx context.Context) *GetJournalEntriesParams { + var () + return &GetJournalEntriesParams{ + + Context: ctx, + } +} + +// NewGetJournalEntriesParamsWithHTTPClient creates a new GetJournalEntriesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetJournalEntriesParamsWithHTTPClient(client *http.Client) *GetJournalEntriesParams { + var () + return &GetJournalEntriesParams{ + HTTPClient: client, + } +} + +/*GetJournalEntriesParams contains all the parameters to send to the API endpoint +for the get journal entries operation typically these are written to a http.Request +*/ +type GetJournalEntriesParams struct { + + /*AccountID + Taxnexus Record Id of an Account + + */ + AccountID *string + /*DateFrom + The Starting Date for an object retrieval + + */ + DateFrom *string + /*DateTo + The Ending Date for an object retrieval + + */ + DateTo *string + /*ID + Taxnexus Record Id + + */ + ID *string + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get journal entries params +func (o *GetJournalEntriesParams) WithTimeout(timeout time.Duration) *GetJournalEntriesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get journal entries params +func (o *GetJournalEntriesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get journal entries params +func (o *GetJournalEntriesParams) WithContext(ctx context.Context) *GetJournalEntriesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get journal entries params +func (o *GetJournalEntriesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get journal entries params +func (o *GetJournalEntriesParams) WithHTTPClient(client *http.Client) *GetJournalEntriesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get journal entries params +func (o *GetJournalEntriesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAccountID adds the accountID to the get journal entries params +func (o *GetJournalEntriesParams) WithAccountID(accountID *string) *GetJournalEntriesParams { + o.SetAccountID(accountID) + return o +} + +// SetAccountID adds the accountId to the get journal entries params +func (o *GetJournalEntriesParams) SetAccountID(accountID *string) { + o.AccountID = accountID +} + +// WithDateFrom adds the dateFrom to the get journal entries params +func (o *GetJournalEntriesParams) WithDateFrom(dateFrom *string) *GetJournalEntriesParams { + o.SetDateFrom(dateFrom) + return o +} + +// SetDateFrom adds the dateFrom to the get journal entries params +func (o *GetJournalEntriesParams) SetDateFrom(dateFrom *string) { + o.DateFrom = dateFrom +} + +// WithDateTo adds the dateTo to the get journal entries params +func (o *GetJournalEntriesParams) WithDateTo(dateTo *string) *GetJournalEntriesParams { + o.SetDateTo(dateTo) + return o +} + +// SetDateTo adds the dateTo to the get journal entries params +func (o *GetJournalEntriesParams) SetDateTo(dateTo *string) { + o.DateTo = dateTo +} + +// WithID adds the id to the get journal entries params +func (o *GetJournalEntriesParams) WithID(id *string) *GetJournalEntriesParams { + o.SetID(id) + return o +} + +// SetID adds the id to the get journal entries params +func (o *GetJournalEntriesParams) SetID(id *string) { + o.ID = id +} + +// WithLimit adds the limit to the get journal entries params +func (o *GetJournalEntriesParams) WithLimit(limit *int64) *GetJournalEntriesParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get journal entries params +func (o *GetJournalEntriesParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get journal entries params +func (o *GetJournalEntriesParams) WithOffset(offset *int64) *GetJournalEntriesParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get journal entries params +func (o *GetJournalEntriesParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *GetJournalEntriesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AccountID != nil { + + // query param accountId + var qrAccountID string + if o.AccountID != nil { + qrAccountID = *o.AccountID + } + qAccountID := qrAccountID + if qAccountID != "" { + if err := r.SetQueryParam("accountId", qAccountID); err != nil { + return err + } + } + + } + + if o.DateFrom != nil { + + // query param dateFrom + var qrDateFrom string + if o.DateFrom != nil { + qrDateFrom = *o.DateFrom + } + qDateFrom := qrDateFrom + if qDateFrom != "" { + if err := r.SetQueryParam("dateFrom", qDateFrom); err != nil { + return err + } + } + + } + + if o.DateTo != nil { + + // query param dateTo + var qrDateTo string + if o.DateTo != nil { + qrDateTo = *o.DateTo + } + qDateTo := qrDateTo + if qDateTo != "" { + if err := r.SetQueryParam("dateTo", qDateTo); err != nil { + return err + } + } + + } + + if o.ID != nil { + + // query param id + var qrID string + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ledger/v0.0.1/ledger_client/journal_entry/get_journal_entries_responses.go b/api/ledger/v0.0.1/ledger_client/journal_entry/get_journal_entries_responses.go new file mode 100644 index 0000000..1dab483 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/journal_entry/get_journal_entries_responses.go @@ -0,0 +1,268 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package journal_entry + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ledger/ledger_models" +) + +// GetJournalEntriesReader is a Reader for the GetJournalEntries structure. +type GetJournalEntriesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetJournalEntriesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetJournalEntriesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetJournalEntriesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetJournalEntriesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetJournalEntriesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetJournalEntriesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetJournalEntriesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetJournalEntriesOK creates a GetJournalEntriesOK with default headers values +func NewGetJournalEntriesOK() *GetJournalEntriesOK { + return &GetJournalEntriesOK{} +} + +/*GetJournalEntriesOK handles this case with default header values. + +Taxnexus Response with Journal Entry objects with Journal Items +*/ +type GetJournalEntriesOK struct { + Payload *ledger_models.JournalEntryResponse +} + +func (o *GetJournalEntriesOK) Error() string { + return fmt.Sprintf("[GET /journalentries][%d] getJournalEntriesOK %+v", 200, o.Payload) +} + +func (o *GetJournalEntriesOK) GetPayload() *ledger_models.JournalEntryResponse { + return o.Payload +} + +func (o *GetJournalEntriesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.JournalEntryResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetJournalEntriesUnauthorized creates a GetJournalEntriesUnauthorized with default headers values +func NewGetJournalEntriesUnauthorized() *GetJournalEntriesUnauthorized { + return &GetJournalEntriesUnauthorized{} +} + +/*GetJournalEntriesUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetJournalEntriesUnauthorized struct { + Payload *ledger_models.Error +} + +func (o *GetJournalEntriesUnauthorized) Error() string { + return fmt.Sprintf("[GET /journalentries][%d] getJournalEntriesUnauthorized %+v", 401, o.Payload) +} + +func (o *GetJournalEntriesUnauthorized) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetJournalEntriesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetJournalEntriesForbidden creates a GetJournalEntriesForbidden with default headers values +func NewGetJournalEntriesForbidden() *GetJournalEntriesForbidden { + return &GetJournalEntriesForbidden{} +} + +/*GetJournalEntriesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetJournalEntriesForbidden struct { + Payload *ledger_models.Error +} + +func (o *GetJournalEntriesForbidden) Error() string { + return fmt.Sprintf("[GET /journalentries][%d] getJournalEntriesForbidden %+v", 403, o.Payload) +} + +func (o *GetJournalEntriesForbidden) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetJournalEntriesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetJournalEntriesNotFound creates a GetJournalEntriesNotFound with default headers values +func NewGetJournalEntriesNotFound() *GetJournalEntriesNotFound { + return &GetJournalEntriesNotFound{} +} + +/*GetJournalEntriesNotFound handles this case with default header values. + +Resource was not found +*/ +type GetJournalEntriesNotFound struct { + Payload *ledger_models.Error +} + +func (o *GetJournalEntriesNotFound) Error() string { + return fmt.Sprintf("[GET /journalentries][%d] getJournalEntriesNotFound %+v", 404, o.Payload) +} + +func (o *GetJournalEntriesNotFound) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetJournalEntriesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetJournalEntriesUnprocessableEntity creates a GetJournalEntriesUnprocessableEntity with default headers values +func NewGetJournalEntriesUnprocessableEntity() *GetJournalEntriesUnprocessableEntity { + return &GetJournalEntriesUnprocessableEntity{} +} + +/*GetJournalEntriesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetJournalEntriesUnprocessableEntity struct { + Payload *ledger_models.Error +} + +func (o *GetJournalEntriesUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /journalentries][%d] getJournalEntriesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetJournalEntriesUnprocessableEntity) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetJournalEntriesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetJournalEntriesInternalServerError creates a GetJournalEntriesInternalServerError with default headers values +func NewGetJournalEntriesInternalServerError() *GetJournalEntriesInternalServerError { + return &GetJournalEntriesInternalServerError{} +} + +/*GetJournalEntriesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetJournalEntriesInternalServerError struct { + Payload *ledger_models.Error +} + +func (o *GetJournalEntriesInternalServerError) Error() string { + return fmt.Sprintf("[GET /journalentries][%d] getJournalEntriesInternalServerError %+v", 500, o.Payload) +} + +func (o *GetJournalEntriesInternalServerError) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetJournalEntriesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ledger/v0.0.1/ledger_client/journal_entry/journal_entry_client.go b/api/ledger/v0.0.1/ledger_client/journal_entry/journal_entry_client.go new file mode 100644 index 0000000..23e4c82 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/journal_entry/journal_entry_client.go @@ -0,0 +1,118 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package journal_entry + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new journal entry API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for journal entry API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetJournalEntries(params *GetJournalEntriesParams, authInfo runtime.ClientAuthInfoWriter) (*GetJournalEntriesOK, error) + + PostJournalEntries(params *PostJournalEntriesParams, authInfo runtime.ClientAuthInfoWriter) (*PostJournalEntriesOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetJournalEntries gets a list of journal entries + + Return a list of Journal Entries by by Journal Entry ID +*/ +func (a *Client) GetJournalEntries(params *GetJournalEntriesParams, authInfo runtime.ClientAuthInfoWriter) (*GetJournalEntriesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetJournalEntriesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getJournalEntries", + Method: "GET", + PathPattern: "/journalentries", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetJournalEntriesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetJournalEntriesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getJournalEntries: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostJournalEntries creates new journal entry records + + Create new Journal Entry Records +*/ +func (a *Client) PostJournalEntries(params *PostJournalEntriesParams, authInfo runtime.ClientAuthInfoWriter) (*PostJournalEntriesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostJournalEntriesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postJournalEntries", + Method: "POST", + PathPattern: "/journalentries", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostJournalEntriesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostJournalEntriesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postJournalEntries: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/ledger/v0.0.1/ledger_client/journal_entry/post_journal_entries_parameters.go b/api/ledger/v0.0.1/ledger_client/journal_entry/post_journal_entries_parameters.go new file mode 100644 index 0000000..df54472 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/journal_entry/post_journal_entries_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package journal_entry + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ledger/ledger_models" +) + +// NewPostJournalEntriesParams creates a new PostJournalEntriesParams object +// with the default values initialized. +func NewPostJournalEntriesParams() *PostJournalEntriesParams { + var () + return &PostJournalEntriesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostJournalEntriesParamsWithTimeout creates a new PostJournalEntriesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostJournalEntriesParamsWithTimeout(timeout time.Duration) *PostJournalEntriesParams { + var () + return &PostJournalEntriesParams{ + + timeout: timeout, + } +} + +// NewPostJournalEntriesParamsWithContext creates a new PostJournalEntriesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostJournalEntriesParamsWithContext(ctx context.Context) *PostJournalEntriesParams { + var () + return &PostJournalEntriesParams{ + + Context: ctx, + } +} + +// NewPostJournalEntriesParamsWithHTTPClient creates a new PostJournalEntriesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostJournalEntriesParamsWithHTTPClient(client *http.Client) *PostJournalEntriesParams { + var () + return &PostJournalEntriesParams{ + HTTPClient: client, + } +} + +/*PostJournalEntriesParams contains all the parameters to send to the API endpoint +for the post journal entries operation typically these are written to a http.Request +*/ +type PostJournalEntriesParams struct { + + /*JournalEntryRequest + An array of Journal Entry records + + */ + JournalEntryRequest *ledger_models.JournalEntryRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post journal entries params +func (o *PostJournalEntriesParams) WithTimeout(timeout time.Duration) *PostJournalEntriesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post journal entries params +func (o *PostJournalEntriesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post journal entries params +func (o *PostJournalEntriesParams) WithContext(ctx context.Context) *PostJournalEntriesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post journal entries params +func (o *PostJournalEntriesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post journal entries params +func (o *PostJournalEntriesParams) WithHTTPClient(client *http.Client) *PostJournalEntriesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post journal entries params +func (o *PostJournalEntriesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithJournalEntryRequest adds the journalEntryRequest to the post journal entries params +func (o *PostJournalEntriesParams) WithJournalEntryRequest(journalEntryRequest *ledger_models.JournalEntryRequest) *PostJournalEntriesParams { + o.SetJournalEntryRequest(journalEntryRequest) + return o +} + +// SetJournalEntryRequest adds the journalEntryRequest to the post journal entries params +func (o *PostJournalEntriesParams) SetJournalEntryRequest(journalEntryRequest *ledger_models.JournalEntryRequest) { + o.JournalEntryRequest = journalEntryRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostJournalEntriesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.JournalEntryRequest != nil { + if err := r.SetBodyParam(o.JournalEntryRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ledger/v0.0.1/ledger_client/journal_entry/post_journal_entries_responses.go b/api/ledger/v0.0.1/ledger_client/journal_entry/post_journal_entries_responses.go new file mode 100644 index 0000000..e26f0ca --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/journal_entry/post_journal_entries_responses.go @@ -0,0 +1,268 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package journal_entry + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ledger/ledger_models" +) + +// PostJournalEntriesReader is a Reader for the PostJournalEntries structure. +type PostJournalEntriesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostJournalEntriesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostJournalEntriesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostJournalEntriesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostJournalEntriesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostJournalEntriesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostJournalEntriesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostJournalEntriesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostJournalEntriesOK creates a PostJournalEntriesOK with default headers values +func NewPostJournalEntriesOK() *PostJournalEntriesOK { + return &PostJournalEntriesOK{} +} + +/*PostJournalEntriesOK handles this case with default header values. + +Taxnexus Response with Journal Entry objects with Journal Items +*/ +type PostJournalEntriesOK struct { + Payload *ledger_models.JournalEntryResponse +} + +func (o *PostJournalEntriesOK) Error() string { + return fmt.Sprintf("[POST /journalentries][%d] postJournalEntriesOK %+v", 200, o.Payload) +} + +func (o *PostJournalEntriesOK) GetPayload() *ledger_models.JournalEntryResponse { + return o.Payload +} + +func (o *PostJournalEntriesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.JournalEntryResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostJournalEntriesUnauthorized creates a PostJournalEntriesUnauthorized with default headers values +func NewPostJournalEntriesUnauthorized() *PostJournalEntriesUnauthorized { + return &PostJournalEntriesUnauthorized{} +} + +/*PostJournalEntriesUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostJournalEntriesUnauthorized struct { + Payload *ledger_models.Error +} + +func (o *PostJournalEntriesUnauthorized) Error() string { + return fmt.Sprintf("[POST /journalentries][%d] postJournalEntriesUnauthorized %+v", 401, o.Payload) +} + +func (o *PostJournalEntriesUnauthorized) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostJournalEntriesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostJournalEntriesForbidden creates a PostJournalEntriesForbidden with default headers values +func NewPostJournalEntriesForbidden() *PostJournalEntriesForbidden { + return &PostJournalEntriesForbidden{} +} + +/*PostJournalEntriesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostJournalEntriesForbidden struct { + Payload *ledger_models.Error +} + +func (o *PostJournalEntriesForbidden) Error() string { + return fmt.Sprintf("[POST /journalentries][%d] postJournalEntriesForbidden %+v", 403, o.Payload) +} + +func (o *PostJournalEntriesForbidden) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostJournalEntriesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostJournalEntriesNotFound creates a PostJournalEntriesNotFound with default headers values +func NewPostJournalEntriesNotFound() *PostJournalEntriesNotFound { + return &PostJournalEntriesNotFound{} +} + +/*PostJournalEntriesNotFound handles this case with default header values. + +Resource was not found +*/ +type PostJournalEntriesNotFound struct { + Payload *ledger_models.Error +} + +func (o *PostJournalEntriesNotFound) Error() string { + return fmt.Sprintf("[POST /journalentries][%d] postJournalEntriesNotFound %+v", 404, o.Payload) +} + +func (o *PostJournalEntriesNotFound) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostJournalEntriesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostJournalEntriesUnprocessableEntity creates a PostJournalEntriesUnprocessableEntity with default headers values +func NewPostJournalEntriesUnprocessableEntity() *PostJournalEntriesUnprocessableEntity { + return &PostJournalEntriesUnprocessableEntity{} +} + +/*PostJournalEntriesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostJournalEntriesUnprocessableEntity struct { + Payload *ledger_models.Error +} + +func (o *PostJournalEntriesUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /journalentries][%d] postJournalEntriesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostJournalEntriesUnprocessableEntity) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostJournalEntriesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostJournalEntriesInternalServerError creates a PostJournalEntriesInternalServerError with default headers values +func NewPostJournalEntriesInternalServerError() *PostJournalEntriesInternalServerError { + return &PostJournalEntriesInternalServerError{} +} + +/*PostJournalEntriesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostJournalEntriesInternalServerError struct { + Payload *ledger_models.Error +} + +func (o *PostJournalEntriesInternalServerError) Error() string { + return fmt.Sprintf("[POST /journalentries][%d] postJournalEntriesInternalServerError %+v", 500, o.Payload) +} + +func (o *PostJournalEntriesInternalServerError) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostJournalEntriesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ledger/v0.0.1/ledger_client/journal_item/get_journal_items_parameters.go b/api/ledger/v0.0.1/ledger_client/journal_item/get_journal_items_parameters.go new file mode 100644 index 0000000..5942dda --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/journal_item/get_journal_items_parameters.go @@ -0,0 +1,240 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package journal_item + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetJournalItemsParams creates a new GetJournalItemsParams object +// with the default values initialized. +func NewGetJournalItemsParams() *GetJournalItemsParams { + var () + return &GetJournalItemsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetJournalItemsParamsWithTimeout creates a new GetJournalItemsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetJournalItemsParamsWithTimeout(timeout time.Duration) *GetJournalItemsParams { + var () + return &GetJournalItemsParams{ + + timeout: timeout, + } +} + +// NewGetJournalItemsParamsWithContext creates a new GetJournalItemsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetJournalItemsParamsWithContext(ctx context.Context) *GetJournalItemsParams { + var () + return &GetJournalItemsParams{ + + Context: ctx, + } +} + +// NewGetJournalItemsParamsWithHTTPClient creates a new GetJournalItemsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetJournalItemsParamsWithHTTPClient(client *http.Client) *GetJournalItemsParams { + var () + return &GetJournalItemsParams{ + HTTPClient: client, + } +} + +/*GetJournalItemsParams contains all the parameters to send to the API endpoint +for the get journal items operation typically these are written to a http.Request +*/ +type GetJournalItemsParams struct { + + /*AccountID + Taxnexus Record Id of an Account + + */ + AccountID string + /*Month + The Month Number (1,2, ..., 12) of the report + + */ + Month *int64 + /*Quarter + The Quarter Number (1,2,3,4) of the report + + */ + Quarter *int64 + /*Year + The year of the report + + */ + Year *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get journal items params +func (o *GetJournalItemsParams) WithTimeout(timeout time.Duration) *GetJournalItemsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get journal items params +func (o *GetJournalItemsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get journal items params +func (o *GetJournalItemsParams) WithContext(ctx context.Context) *GetJournalItemsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get journal items params +func (o *GetJournalItemsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get journal items params +func (o *GetJournalItemsParams) WithHTTPClient(client *http.Client) *GetJournalItemsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get journal items params +func (o *GetJournalItemsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAccountID adds the accountID to the get journal items params +func (o *GetJournalItemsParams) WithAccountID(accountID string) *GetJournalItemsParams { + o.SetAccountID(accountID) + return o +} + +// SetAccountID adds the accountId to the get journal items params +func (o *GetJournalItemsParams) SetAccountID(accountID string) { + o.AccountID = accountID +} + +// WithMonth adds the month to the get journal items params +func (o *GetJournalItemsParams) WithMonth(month *int64) *GetJournalItemsParams { + o.SetMonth(month) + return o +} + +// SetMonth adds the month to the get journal items params +func (o *GetJournalItemsParams) SetMonth(month *int64) { + o.Month = month +} + +// WithQuarter adds the quarter to the get journal items params +func (o *GetJournalItemsParams) WithQuarter(quarter *int64) *GetJournalItemsParams { + o.SetQuarter(quarter) + return o +} + +// SetQuarter adds the quarter to the get journal items params +func (o *GetJournalItemsParams) SetQuarter(quarter *int64) { + o.Quarter = quarter +} + +// WithYear adds the year to the get journal items params +func (o *GetJournalItemsParams) WithYear(year *int64) *GetJournalItemsParams { + o.SetYear(year) + return o +} + +// SetYear adds the year to the get journal items params +func (o *GetJournalItemsParams) SetYear(year *int64) { + o.Year = year +} + +// WriteToRequest writes these params to a swagger request +func (o *GetJournalItemsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param accountId + qrAccountID := o.AccountID + qAccountID := qrAccountID + if qAccountID != "" { + if err := r.SetQueryParam("accountId", qAccountID); err != nil { + return err + } + } + + if o.Month != nil { + + // query param month + var qrMonth int64 + if o.Month != nil { + qrMonth = *o.Month + } + qMonth := swag.FormatInt64(qrMonth) + if qMonth != "" { + if err := r.SetQueryParam("month", qMonth); err != nil { + return err + } + } + + } + + if o.Quarter != nil { + + // query param quarter + var qrQuarter int64 + if o.Quarter != nil { + qrQuarter = *o.Quarter + } + qQuarter := swag.FormatInt64(qrQuarter) + if qQuarter != "" { + if err := r.SetQueryParam("quarter", qQuarter); err != nil { + return err + } + } + + } + + if o.Year != nil { + + // query param year + var qrYear int64 + if o.Year != nil { + qrYear = *o.Year + } + qYear := swag.FormatInt64(qrYear) + if qYear != "" { + if err := r.SetQueryParam("year", qYear); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ledger/v0.0.1/ledger_client/journal_item/get_journal_items_responses.go b/api/ledger/v0.0.1/ledger_client/journal_item/get_journal_items_responses.go new file mode 100644 index 0000000..0fba646 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/journal_item/get_journal_items_responses.go @@ -0,0 +1,268 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package journal_item + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ledger/ledger_models" +) + +// GetJournalItemsReader is a Reader for the GetJournalItems structure. +type GetJournalItemsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetJournalItemsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetJournalItemsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetJournalItemsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetJournalItemsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetJournalItemsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetJournalItemsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetJournalItemsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetJournalItemsOK creates a GetJournalItemsOK with default headers values +func NewGetJournalItemsOK() *GetJournalItemsOK { + return &GetJournalItemsOK{} +} + +/*GetJournalItemsOK handles this case with default header values. + +Taxnexus Response with Journal Item objects +*/ +type GetJournalItemsOK struct { + Payload *ledger_models.JournalItemSummaryResponse +} + +func (o *GetJournalItemsOK) Error() string { + return fmt.Sprintf("[GET /journalitems][%d] getJournalItemsOK %+v", 200, o.Payload) +} + +func (o *GetJournalItemsOK) GetPayload() *ledger_models.JournalItemSummaryResponse { + return o.Payload +} + +func (o *GetJournalItemsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.JournalItemSummaryResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetJournalItemsUnauthorized creates a GetJournalItemsUnauthorized with default headers values +func NewGetJournalItemsUnauthorized() *GetJournalItemsUnauthorized { + return &GetJournalItemsUnauthorized{} +} + +/*GetJournalItemsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetJournalItemsUnauthorized struct { + Payload *ledger_models.Error +} + +func (o *GetJournalItemsUnauthorized) Error() string { + return fmt.Sprintf("[GET /journalitems][%d] getJournalItemsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetJournalItemsUnauthorized) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetJournalItemsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetJournalItemsForbidden creates a GetJournalItemsForbidden with default headers values +func NewGetJournalItemsForbidden() *GetJournalItemsForbidden { + return &GetJournalItemsForbidden{} +} + +/*GetJournalItemsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetJournalItemsForbidden struct { + Payload *ledger_models.Error +} + +func (o *GetJournalItemsForbidden) Error() string { + return fmt.Sprintf("[GET /journalitems][%d] getJournalItemsForbidden %+v", 403, o.Payload) +} + +func (o *GetJournalItemsForbidden) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetJournalItemsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetJournalItemsNotFound creates a GetJournalItemsNotFound with default headers values +func NewGetJournalItemsNotFound() *GetJournalItemsNotFound { + return &GetJournalItemsNotFound{} +} + +/*GetJournalItemsNotFound handles this case with default header values. + +Resource was not found +*/ +type GetJournalItemsNotFound struct { + Payload *ledger_models.Error +} + +func (o *GetJournalItemsNotFound) Error() string { + return fmt.Sprintf("[GET /journalitems][%d] getJournalItemsNotFound %+v", 404, o.Payload) +} + +func (o *GetJournalItemsNotFound) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetJournalItemsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetJournalItemsUnprocessableEntity creates a GetJournalItemsUnprocessableEntity with default headers values +func NewGetJournalItemsUnprocessableEntity() *GetJournalItemsUnprocessableEntity { + return &GetJournalItemsUnprocessableEntity{} +} + +/*GetJournalItemsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetJournalItemsUnprocessableEntity struct { + Payload *ledger_models.Error +} + +func (o *GetJournalItemsUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /journalitems][%d] getJournalItemsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetJournalItemsUnprocessableEntity) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetJournalItemsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetJournalItemsInternalServerError creates a GetJournalItemsInternalServerError with default headers values +func NewGetJournalItemsInternalServerError() *GetJournalItemsInternalServerError { + return &GetJournalItemsInternalServerError{} +} + +/*GetJournalItemsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetJournalItemsInternalServerError struct { + Payload *ledger_models.Error +} + +func (o *GetJournalItemsInternalServerError) Error() string { + return fmt.Sprintf("[GET /journalitems][%d] getJournalItemsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetJournalItemsInternalServerError) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetJournalItemsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ledger/v0.0.1/ledger_client/journal_item/journal_item_client.go b/api/ledger/v0.0.1/ledger_client/journal_item/journal_item_client.go new file mode 100644 index 0000000..21a89fa --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/journal_item/journal_item_client.go @@ -0,0 +1,79 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package journal_item + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new journal item API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for journal item API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetJournalItems(params *GetJournalItemsParams, authInfo runtime.ClientAuthInfoWriter) (*GetJournalItemsOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetJournalItems gets a journal item report + + Get summaries of Journal Items by year, month and Quarter +*/ +func (a *Client) GetJournalItems(params *GetJournalItemsParams, authInfo runtime.ClientAuthInfoWriter) (*GetJournalItemsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetJournalItemsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getJournalItems", + Method: "GET", + PathPattern: "/journalitems", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetJournalItemsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetJournalItemsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getJournalItems: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/ledger/v0.0.1/ledger_client/ledger_client.go b/api/ledger/v0.0.1/ledger_client/ledger_client.go new file mode 100644 index 0000000..c0a24aa --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/ledger_client.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_client + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ledger/ledger_client/accounting_rule" + "github.com/taxnexus/lib/api/ledger/ledger_client/accounting_ruleset" + "github.com/taxnexus/lib/api/ledger/ledger_client/coa" + "github.com/taxnexus/lib/api/ledger/ledger_client/gl_account" + "github.com/taxnexus/lib/api/ledger/ledger_client/gl_balance" + "github.com/taxnexus/lib/api/ledger/ledger_client/journal_entry" + "github.com/taxnexus/lib/api/ledger/ledger_client/journal_item" + "github.com/taxnexus/lib/api/ledger/ledger_client/period" +) + +// Default ledger HTTP client. +var Default = NewHTTPClient(nil) + +const ( + // DefaultHost is the default Host + // found in Meta (info) section of spec file + DefaultHost string = "ledger.fabric.tnxs.net:8080" + // DefaultBasePath is the default BasePath + // found in Meta (info) section of spec file + DefaultBasePath string = "/v1" +) + +// DefaultSchemes are the default schemes found in Meta (info) section of spec file +var DefaultSchemes = []string{"http"} + +// NewHTTPClient creates a new ledger HTTP client. +func NewHTTPClient(formats strfmt.Registry) *Ledger { + return NewHTTPClientWithConfig(formats, nil) +} + +// NewHTTPClientWithConfig creates a new ledger HTTP client, +// using a customizable transport config. +func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *Ledger { + // ensure nullable parameters have default + if cfg == nil { + cfg = DefaultTransportConfig() + } + + // create transport and client + transport := httptransport.New(cfg.Host, cfg.BasePath, cfg.Schemes) + return New(transport, formats) +} + +// New creates a new ledger client +func New(transport runtime.ClientTransport, formats strfmt.Registry) *Ledger { + // ensure nullable parameters have default + if formats == nil { + formats = strfmt.Default + } + + cli := new(Ledger) + cli.Transport = transport + cli.AccountingRule = accounting_rule.New(transport, formats) + cli.AccountingRuleset = accounting_ruleset.New(transport, formats) + cli.Coa = coa.New(transport, formats) + cli.GlAccount = gl_account.New(transport, formats) + cli.GlBalance = gl_balance.New(transport, formats) + cli.JournalEntry = journal_entry.New(transport, formats) + cli.JournalItem = journal_item.New(transport, formats) + cli.Period = period.New(transport, formats) + return cli +} + +// DefaultTransportConfig creates a TransportConfig with the +// default settings taken from the meta section of the spec file. +func DefaultTransportConfig() *TransportConfig { + return &TransportConfig{ + Host: DefaultHost, + BasePath: DefaultBasePath, + Schemes: DefaultSchemes, + } +} + +// TransportConfig contains the transport related info, +// found in the meta section of the spec file. +type TransportConfig struct { + Host string + BasePath string + Schemes []string +} + +// WithHost overrides the default host, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithHost(host string) *TransportConfig { + cfg.Host = host + return cfg +} + +// WithBasePath overrides the default basePath, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithBasePath(basePath string) *TransportConfig { + cfg.BasePath = basePath + return cfg +} + +// WithSchemes overrides the default schemes, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { + cfg.Schemes = schemes + return cfg +} + +// Ledger is a client for ledger +type Ledger struct { + AccountingRule accounting_rule.ClientService + + AccountingRuleset accounting_ruleset.ClientService + + Coa coa.ClientService + + GlAccount gl_account.ClientService + + GlBalance gl_balance.ClientService + + JournalEntry journal_entry.ClientService + + JournalItem journal_item.ClientService + + Period period.ClientService + + Transport runtime.ClientTransport +} + +// SetTransport changes the transport on the client and all its subresources +func (c *Ledger) SetTransport(transport runtime.ClientTransport) { + c.Transport = transport + c.AccountingRule.SetTransport(transport) + c.AccountingRuleset.SetTransport(transport) + c.Coa.SetTransport(transport) + c.GlAccount.SetTransport(transport) + c.GlBalance.SetTransport(transport) + c.JournalEntry.SetTransport(transport) + c.JournalItem.SetTransport(transport) + c.Period.SetTransport(transport) +} diff --git a/api/ledger/v0.0.1/ledger_client/period/get_periods_parameters.go b/api/ledger/v0.0.1/ledger_client/period/get_periods_parameters.go new file mode 100644 index 0000000..bf10960 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/period/get_periods_parameters.go @@ -0,0 +1,279 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package period + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetPeriodsParams creates a new GetPeriodsParams object +// with the default values initialized. +func NewGetPeriodsParams() *GetPeriodsParams { + var () + return &GetPeriodsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetPeriodsParamsWithTimeout creates a new GetPeriodsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetPeriodsParamsWithTimeout(timeout time.Duration) *GetPeriodsParams { + var () + return &GetPeriodsParams{ + + timeout: timeout, + } +} + +// NewGetPeriodsParamsWithContext creates a new GetPeriodsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetPeriodsParamsWithContext(ctx context.Context) *GetPeriodsParams { + var () + return &GetPeriodsParams{ + + Context: ctx, + } +} + +// NewGetPeriodsParamsWithHTTPClient creates a new GetPeriodsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetPeriodsParamsWithHTTPClient(client *http.Client) *GetPeriodsParams { + var () + return &GetPeriodsParams{ + HTTPClient: client, + } +} + +/*GetPeriodsParams contains all the parameters to send to the API endpoint +for the get periods operation typically these are written to a http.Request +*/ +type GetPeriodsParams struct { + + /*AccountID + Taxnexus Record Id of an Account + + */ + AccountID *string + /*Date + The Date for an object retrieval + + */ + Date *string + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + /*PeriodID + Taxnexus Record Id of a Period + + */ + PeriodID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get periods params +func (o *GetPeriodsParams) WithTimeout(timeout time.Duration) *GetPeriodsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get periods params +func (o *GetPeriodsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get periods params +func (o *GetPeriodsParams) WithContext(ctx context.Context) *GetPeriodsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get periods params +func (o *GetPeriodsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get periods params +func (o *GetPeriodsParams) WithHTTPClient(client *http.Client) *GetPeriodsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get periods params +func (o *GetPeriodsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAccountID adds the accountID to the get periods params +func (o *GetPeriodsParams) WithAccountID(accountID *string) *GetPeriodsParams { + o.SetAccountID(accountID) + return o +} + +// SetAccountID adds the accountId to the get periods params +func (o *GetPeriodsParams) SetAccountID(accountID *string) { + o.AccountID = accountID +} + +// WithDate adds the date to the get periods params +func (o *GetPeriodsParams) WithDate(date *string) *GetPeriodsParams { + o.SetDate(date) + return o +} + +// SetDate adds the date to the get periods params +func (o *GetPeriodsParams) SetDate(date *string) { + o.Date = date +} + +// WithLimit adds the limit to the get periods params +func (o *GetPeriodsParams) WithLimit(limit *int64) *GetPeriodsParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get periods params +func (o *GetPeriodsParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get periods params +func (o *GetPeriodsParams) WithOffset(offset *int64) *GetPeriodsParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get periods params +func (o *GetPeriodsParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithPeriodID adds the periodID to the get periods params +func (o *GetPeriodsParams) WithPeriodID(periodID *string) *GetPeriodsParams { + o.SetPeriodID(periodID) + return o +} + +// SetPeriodID adds the periodId to the get periods params +func (o *GetPeriodsParams) SetPeriodID(periodID *string) { + o.PeriodID = periodID +} + +// WriteToRequest writes these params to a swagger request +func (o *GetPeriodsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AccountID != nil { + + // query param accountId + var qrAccountID string + if o.AccountID != nil { + qrAccountID = *o.AccountID + } + qAccountID := qrAccountID + if qAccountID != "" { + if err := r.SetQueryParam("accountId", qAccountID); err != nil { + return err + } + } + + } + + if o.Date != nil { + + // query param date + var qrDate string + if o.Date != nil { + qrDate = *o.Date + } + qDate := qrDate + if qDate != "" { + if err := r.SetQueryParam("date", qDate); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.PeriodID != nil { + + // query param periodId + var qrPeriodID string + if o.PeriodID != nil { + qrPeriodID = *o.PeriodID + } + qPeriodID := qrPeriodID + if qPeriodID != "" { + if err := r.SetQueryParam("periodId", qPeriodID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ledger/v0.0.1/ledger_client/period/get_periods_responses.go b/api/ledger/v0.0.1/ledger_client/period/get_periods_responses.go new file mode 100644 index 0000000..88481c6 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/period/get_periods_responses.go @@ -0,0 +1,268 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package period + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ledger/ledger_models" +) + +// GetPeriodsReader is a Reader for the GetPeriods structure. +type GetPeriodsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetPeriodsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetPeriodsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetPeriodsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetPeriodsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetPeriodsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetPeriodsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetPeriodsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetPeriodsOK creates a GetPeriodsOK with default headers values +func NewGetPeriodsOK() *GetPeriodsOK { + return &GetPeriodsOK{} +} + +/*GetPeriodsOK handles this case with default header values. + +Taxnexus Response with Period objects +*/ +type GetPeriodsOK struct { + Payload *ledger_models.PeriodResponse +} + +func (o *GetPeriodsOK) Error() string { + return fmt.Sprintf("[GET /periods][%d] getPeriodsOK %+v", 200, o.Payload) +} + +func (o *GetPeriodsOK) GetPayload() *ledger_models.PeriodResponse { + return o.Payload +} + +func (o *GetPeriodsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.PeriodResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetPeriodsUnauthorized creates a GetPeriodsUnauthorized with default headers values +func NewGetPeriodsUnauthorized() *GetPeriodsUnauthorized { + return &GetPeriodsUnauthorized{} +} + +/*GetPeriodsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetPeriodsUnauthorized struct { + Payload *ledger_models.Error +} + +func (o *GetPeriodsUnauthorized) Error() string { + return fmt.Sprintf("[GET /periods][%d] getPeriodsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetPeriodsUnauthorized) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetPeriodsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetPeriodsForbidden creates a GetPeriodsForbidden with default headers values +func NewGetPeriodsForbidden() *GetPeriodsForbidden { + return &GetPeriodsForbidden{} +} + +/*GetPeriodsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetPeriodsForbidden struct { + Payload *ledger_models.Error +} + +func (o *GetPeriodsForbidden) Error() string { + return fmt.Sprintf("[GET /periods][%d] getPeriodsForbidden %+v", 403, o.Payload) +} + +func (o *GetPeriodsForbidden) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetPeriodsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetPeriodsNotFound creates a GetPeriodsNotFound with default headers values +func NewGetPeriodsNotFound() *GetPeriodsNotFound { + return &GetPeriodsNotFound{} +} + +/*GetPeriodsNotFound handles this case with default header values. + +Resource was not found +*/ +type GetPeriodsNotFound struct { + Payload *ledger_models.Error +} + +func (o *GetPeriodsNotFound) Error() string { + return fmt.Sprintf("[GET /periods][%d] getPeriodsNotFound %+v", 404, o.Payload) +} + +func (o *GetPeriodsNotFound) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetPeriodsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetPeriodsUnprocessableEntity creates a GetPeriodsUnprocessableEntity with default headers values +func NewGetPeriodsUnprocessableEntity() *GetPeriodsUnprocessableEntity { + return &GetPeriodsUnprocessableEntity{} +} + +/*GetPeriodsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetPeriodsUnprocessableEntity struct { + Payload *ledger_models.Error +} + +func (o *GetPeriodsUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /periods][%d] getPeriodsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetPeriodsUnprocessableEntity) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetPeriodsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetPeriodsInternalServerError creates a GetPeriodsInternalServerError with default headers values +func NewGetPeriodsInternalServerError() *GetPeriodsInternalServerError { + return &GetPeriodsInternalServerError{} +} + +/*GetPeriodsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetPeriodsInternalServerError struct { + Payload *ledger_models.Error +} + +func (o *GetPeriodsInternalServerError) Error() string { + return fmt.Sprintf("[GET /periods][%d] getPeriodsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetPeriodsInternalServerError) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *GetPeriodsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ledger/v0.0.1/ledger_client/period/period_client.go b/api/ledger/v0.0.1/ledger_client/period/period_client.go new file mode 100644 index 0000000..5eb6b7f --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/period/period_client.go @@ -0,0 +1,118 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package period + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new period API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for period API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetPeriods(params *GetPeriodsParams, authInfo runtime.ClientAuthInfoWriter) (*GetPeriodsOK, error) + + PostPeriods(params *PostPeriodsParams, authInfo runtime.ClientAuthInfoWriter) (*PostPeriodsOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetPeriods gets a list of periods + + Return a list of Periods for an Account +*/ +func (a *Client) GetPeriods(params *GetPeriodsParams, authInfo runtime.ClientAuthInfoWriter) (*GetPeriodsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetPeriodsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getPeriods", + Method: "GET", + PathPattern: "/periods", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetPeriodsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetPeriodsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getPeriods: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostPeriods creates new periods + + Update Period records +*/ +func (a *Client) PostPeriods(params *PostPeriodsParams, authInfo runtime.ClientAuthInfoWriter) (*PostPeriodsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostPeriodsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postPeriods", + Method: "POST", + PathPattern: "/periods", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostPeriodsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostPeriodsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postPeriods: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/ledger/v0.0.1/ledger_client/period/post_periods_parameters.go b/api/ledger/v0.0.1/ledger_client/period/post_periods_parameters.go new file mode 100644 index 0000000..c1cc959 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/period/post_periods_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package period + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ledger/ledger_models" +) + +// NewPostPeriodsParams creates a new PostPeriodsParams object +// with the default values initialized. +func NewPostPeriodsParams() *PostPeriodsParams { + var () + return &PostPeriodsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostPeriodsParamsWithTimeout creates a new PostPeriodsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostPeriodsParamsWithTimeout(timeout time.Duration) *PostPeriodsParams { + var () + return &PostPeriodsParams{ + + timeout: timeout, + } +} + +// NewPostPeriodsParamsWithContext creates a new PostPeriodsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostPeriodsParamsWithContext(ctx context.Context) *PostPeriodsParams { + var () + return &PostPeriodsParams{ + + Context: ctx, + } +} + +// NewPostPeriodsParamsWithHTTPClient creates a new PostPeriodsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostPeriodsParamsWithHTTPClient(client *http.Client) *PostPeriodsParams { + var () + return &PostPeriodsParams{ + HTTPClient: client, + } +} + +/*PostPeriodsParams contains all the parameters to send to the API endpoint +for the post periods operation typically these are written to a http.Request +*/ +type PostPeriodsParams struct { + + /*PeriodRequest + An array of Period records + + */ + PeriodRequest *ledger_models.PeriodRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post periods params +func (o *PostPeriodsParams) WithTimeout(timeout time.Duration) *PostPeriodsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post periods params +func (o *PostPeriodsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post periods params +func (o *PostPeriodsParams) WithContext(ctx context.Context) *PostPeriodsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post periods params +func (o *PostPeriodsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post periods params +func (o *PostPeriodsParams) WithHTTPClient(client *http.Client) *PostPeriodsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post periods params +func (o *PostPeriodsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPeriodRequest adds the periodRequest to the post periods params +func (o *PostPeriodsParams) WithPeriodRequest(periodRequest *ledger_models.PeriodRequest) *PostPeriodsParams { + o.SetPeriodRequest(periodRequest) + return o +} + +// SetPeriodRequest adds the periodRequest to the post periods params +func (o *PostPeriodsParams) SetPeriodRequest(periodRequest *ledger_models.PeriodRequest) { + o.PeriodRequest = periodRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostPeriodsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.PeriodRequest != nil { + if err := r.SetBodyParam(o.PeriodRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ledger/v0.0.1/ledger_client/period/post_periods_responses.go b/api/ledger/v0.0.1/ledger_client/period/post_periods_responses.go new file mode 100644 index 0000000..4147078 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_client/period/post_periods_responses.go @@ -0,0 +1,268 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package period + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ledger/ledger_models" +) + +// PostPeriodsReader is a Reader for the PostPeriods structure. +type PostPeriodsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostPeriodsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostPeriodsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostPeriodsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostPeriodsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostPeriodsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostPeriodsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostPeriodsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostPeriodsOK creates a PostPeriodsOK with default headers values +func NewPostPeriodsOK() *PostPeriodsOK { + return &PostPeriodsOK{} +} + +/*PostPeriodsOK handles this case with default header values. + +Taxnexus Response with Period objects +*/ +type PostPeriodsOK struct { + Payload *ledger_models.PeriodResponse +} + +func (o *PostPeriodsOK) Error() string { + return fmt.Sprintf("[POST /periods][%d] postPeriodsOK %+v", 200, o.Payload) +} + +func (o *PostPeriodsOK) GetPayload() *ledger_models.PeriodResponse { + return o.Payload +} + +func (o *PostPeriodsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.PeriodResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPeriodsUnauthorized creates a PostPeriodsUnauthorized with default headers values +func NewPostPeriodsUnauthorized() *PostPeriodsUnauthorized { + return &PostPeriodsUnauthorized{} +} + +/*PostPeriodsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostPeriodsUnauthorized struct { + Payload *ledger_models.Error +} + +func (o *PostPeriodsUnauthorized) Error() string { + return fmt.Sprintf("[POST /periods][%d] postPeriodsUnauthorized %+v", 401, o.Payload) +} + +func (o *PostPeriodsUnauthorized) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostPeriodsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPeriodsForbidden creates a PostPeriodsForbidden with default headers values +func NewPostPeriodsForbidden() *PostPeriodsForbidden { + return &PostPeriodsForbidden{} +} + +/*PostPeriodsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostPeriodsForbidden struct { + Payload *ledger_models.Error +} + +func (o *PostPeriodsForbidden) Error() string { + return fmt.Sprintf("[POST /periods][%d] postPeriodsForbidden %+v", 403, o.Payload) +} + +func (o *PostPeriodsForbidden) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostPeriodsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPeriodsNotFound creates a PostPeriodsNotFound with default headers values +func NewPostPeriodsNotFound() *PostPeriodsNotFound { + return &PostPeriodsNotFound{} +} + +/*PostPeriodsNotFound handles this case with default header values. + +Resource was not found +*/ +type PostPeriodsNotFound struct { + Payload *ledger_models.Error +} + +func (o *PostPeriodsNotFound) Error() string { + return fmt.Sprintf("[POST /periods][%d] postPeriodsNotFound %+v", 404, o.Payload) +} + +func (o *PostPeriodsNotFound) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostPeriodsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPeriodsUnprocessableEntity creates a PostPeriodsUnprocessableEntity with default headers values +func NewPostPeriodsUnprocessableEntity() *PostPeriodsUnprocessableEntity { + return &PostPeriodsUnprocessableEntity{} +} + +/*PostPeriodsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostPeriodsUnprocessableEntity struct { + Payload *ledger_models.Error +} + +func (o *PostPeriodsUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /periods][%d] postPeriodsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostPeriodsUnprocessableEntity) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostPeriodsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPeriodsInternalServerError creates a PostPeriodsInternalServerError with default headers values +func NewPostPeriodsInternalServerError() *PostPeriodsInternalServerError { + return &PostPeriodsInternalServerError{} +} + +/*PostPeriodsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostPeriodsInternalServerError struct { + Payload *ledger_models.Error +} + +func (o *PostPeriodsInternalServerError) Error() string { + return fmt.Sprintf("[POST /periods][%d] postPeriodsInternalServerError %+v", 500, o.Payload) +} + +func (o *PostPeriodsInternalServerError) GetPayload() *ledger_models.Error { + return o.Payload +} + +func (o *PostPeriodsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ledger_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/accounting_rule.go b/api/ledger/v0.0.1/ledger_models/accounting_rule.go new file mode 100644 index 0000000..c9da1b4 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/accounting_rule.go @@ -0,0 +1,104 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// AccountingRule Rules used to assign transactions to the proper GL accounts +// +// swagger:model AccountingRule +type AccountingRule struct { + + // The Account ID for whom this Account Rule exists + AcountID string `json:"AcountID,omitempty"` + + // The Taxnexus ID of the Cost of Goods Sold account to be used for this Accounting Rule + COGSAccountID string `json:"COGSAccountID,omitempty"` + + // COGS Account Name + COGSAccountName string `json:"COGSAccountName,omitempty"` + + // The Code used for Accounting Rule Lookups + Code string `json:"Code,omitempty"` + + // Created By + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // The Taxnexus ID of the GL Account that is the Credit Account to be used in this Accounting Rule + CreditAccountID string `json:"CreditAccountID,omitempty"` + + // Credit Account Name + CreditAccountName string `json:"CreditAccountName,omitempty"` + + // The GL Account that is the Debit Account to be used in this Accounting Rule + DebitAccountID string `json:"DebitAccountID,omitempty"` + + // Debit Account Name + DebitAccountName string `json:"DebitAccountName,omitempty"` + + // Description + Description string `json:"Description,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // The Taxnexus ID of the GL Account that is the Inventory Account to be used in this Accounting Rule + InventoryAccountID string `json:"InventoryAccountID,omitempty"` + + // Inventory Account Name + InventoryAccountName string `json:"InventoryAccountName,omitempty"` + + // Is this a deferred tax, not to be charged on the invoice? + IsDeferred bool `json:"IsDeferred,omitempty"` + + // Last Modified By + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Parent Foreign Key + ParentFK string `json:"ParentFK,omitempty"` + + // The Proportion of Revenue which is governed by this Accounting Rule; used for proportional taxing of products and services + Proportion float64 `json:"Proportion,omitempty"` + + // Tenant that owns this object instance + TenantID string `json:"TenantID,omitempty"` +} + +// Validate validates this accounting rule +func (m *AccountingRule) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *AccountingRule) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AccountingRule) UnmarshalBinary(b []byte) error { + var res AccountingRule + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/accounting_rule_request.go b/api/ledger/v0.0.1/ledger_models/accounting_rule_request.go new file mode 100644 index 0000000..5c67726 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/accounting_rule_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// AccountingRuleRequest An array of Accounting Rule objects +// +// swagger:model AccountingRuleRequest +type AccountingRuleRequest struct { + + // data + Data []*AccountingRule `json:"Data"` +} + +// Validate validates this accounting rule request +func (m *AccountingRuleRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AccountingRuleRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *AccountingRuleRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AccountingRuleRequest) UnmarshalBinary(b []byte) error { + var res AccountingRuleRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/accounting_rule_response.go b/api/ledger/v0.0.1/ledger_models/accounting_rule_response.go new file mode 100644 index 0000000..3c44809 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/accounting_rule_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// AccountingRuleResponse An array of Accounting Rule objects +// +// swagger:model AccountingRuleResponse +type AccountingRuleResponse struct { + + // data + Data []*AccountingRule `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this accounting rule response +func (m *AccountingRuleResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AccountingRuleResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *AccountingRuleResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *AccountingRuleResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AccountingRuleResponse) UnmarshalBinary(b []byte) error { + var res AccountingRuleResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/accounting_ruleset.go b/api/ledger/v0.0.1/ledger_models/accounting_ruleset.go new file mode 100644 index 0000000..fee0317 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/accounting_ruleset.go @@ -0,0 +1,111 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// AccountingRuleset Master record for holding a set of accounting rules applied during GL processing +// +// swagger:model AccountingRuleset +type AccountingRuleset struct { + + // Taxnexus Account ID + AccountID string `json:"AccountID,omitempty"` + + // Accounting Ruleset Code + Code string `json:"Code,omitempty"` + + // Created By + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Ruleset Description + Description string `json:"Description,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // The Accounting Rules associated with this Ruleset + Items []*AccountingRulesetItem `json:"Items"` + + // Last Modified By + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Tenant that owns this object instance + TenantID string `json:"TenantID,omitempty"` +} + +// Validate validates this accounting ruleset +func (m *AccountingRuleset) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AccountingRuleset) validateItems(formats strfmt.Registry) error { + + if swag.IsZero(m.Items) { // not required + return nil + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *AccountingRuleset) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AccountingRuleset) UnmarshalBinary(b []byte) error { + var res AccountingRuleset + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/accounting_ruleset_item.go b/api/ledger/v0.0.1/ledger_models/accounting_ruleset_item.go new file mode 100644 index 0000000..6c926dc --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/accounting_ruleset_item.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// AccountingRulesetItem accounting ruleset item +// +// swagger:model AccountingRulesetItem +type AccountingRulesetItem struct { + + // The code of the rule in this ruleset + AccountingRuleCode string `json:"AccountingRuleCode,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // Tenant that owns this object instance + TenantID string `json:"TenantID,omitempty"` +} + +// Validate validates this accounting ruleset item +func (m *AccountingRulesetItem) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *AccountingRulesetItem) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AccountingRulesetItem) UnmarshalBinary(b []byte) error { + var res AccountingRulesetItem + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/accounting_ruleset_request.go b/api/ledger/v0.0.1/ledger_models/accounting_ruleset_request.go new file mode 100644 index 0000000..e8593d6 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/accounting_ruleset_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// AccountingRulesetRequest An array of Accounting Ruleset objects +// +// swagger:model AccountingRulesetRequest +type AccountingRulesetRequest struct { + + // data + Data []*AccountingRuleset `json:"Data"` +} + +// Validate validates this accounting ruleset request +func (m *AccountingRulesetRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AccountingRulesetRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *AccountingRulesetRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AccountingRulesetRequest) UnmarshalBinary(b []byte) error { + var res AccountingRulesetRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/accounting_ruleset_response.go b/api/ledger/v0.0.1/ledger_models/accounting_ruleset_response.go new file mode 100644 index 0000000..d747027 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/accounting_ruleset_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// AccountingRulesetResponse An array of Accounting Ruleset objects +// +// swagger:model AccountingRulesetResponse +type AccountingRulesetResponse struct { + + // data + Data []*AccountingRuleset `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this accounting ruleset response +func (m *AccountingRulesetResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AccountingRulesetResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *AccountingRulesetResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *AccountingRulesetResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AccountingRulesetResponse) UnmarshalBinary(b []byte) error { + var res AccountingRulesetResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/coa.go b/api/ledger/v0.0.1/ledger_models/coa.go new file mode 100644 index 0000000..4a019c0 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/coa.go @@ -0,0 +1,120 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Coa Chart of Accounts Report +// +// swagger:model Coa +type Coa struct { + + // Taxnexus Account ID + AccountID string `json:"AccountID,omitempty"` + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Description + Description string `json:"Description,omitempty"` + + // End Date + EndDate string `json:"EndDate,omitempty"` + + // Ending Period Taxnexus ID + EndPeriodID string `json:"EndPeriodID,omitempty"` + + // Record Id + ID string `json:"ID,omitempty"` + + // items + Items []*CoaItem `json:"Items"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Start Date + StartDate string `json:"StartDate,omitempty"` + + // Starting Period Taxnexus ID + StartPeriodID string `json:"StartPeriodID,omitempty"` + + // CoA Status + Status string `json:"Status,omitempty"` +} + +// Validate validates this coa +func (m *Coa) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Coa) validateItems(formats strfmt.Registry) error { + + if swag.IsZero(m.Items) { // not required + return nil + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Coa) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Coa) UnmarshalBinary(b []byte) error { + var res Coa + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/coa_item.go b/api/ledger/v0.0.1/ledger_models/coa_item.go new file mode 100644 index 0000000..f23ca19 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/coa_item.go @@ -0,0 +1,83 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// CoaItem coa item +// +// swagger:model CoaItem +type CoaItem struct { + + // Parent Chart of Accounts record D + CoaID string `json:"CoaID,omitempty"` + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // The Credit Balance for this item + Credits float64 `json:"Credits,omitempty"` + + // The Debit Balance for this item + Debits float64 `json:"Debits,omitempty"` + + // The General Ledger account name + GLAccountName string `json:"GLAccountName,omitempty"` + + // Record Id + ID string `json:"ID,omitempty"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // The name of the Period for this COA Item + PeriodName string `json:"PeriodName,omitempty"` + + // The Product Code value for this CoA Item + ProductCode string `json:"ProductCode,omitempty"` + + // The Sales Regulation value for this CoA Item + SalesRegulation string `json:"SalesRegulation,omitempty"` + + // The Taxnexus Code value for this CoA Item + TaxnexusCode string `json:"TaxnexusCode,omitempty"` +} + +// Validate validates this coa item +func (m *CoaItem) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *CoaItem) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CoaItem) UnmarshalBinary(b []byte) error { + var res CoaItem + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/coa_request.go b/api/ledger/v0.0.1/ledger_models/coa_request.go new file mode 100644 index 0000000..344b79b --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/coa_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// CoaRequest An array of Accounting Report objects +// +// swagger:model CoaRequest +type CoaRequest struct { + + // data + Data []*Coa `json:"Data"` +} + +// Validate validates this coa request +func (m *CoaRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *CoaRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *CoaRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CoaRequest) UnmarshalBinary(b []byte) error { + var res CoaRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/coa_response.go b/api/ledger/v0.0.1/ledger_models/coa_response.go new file mode 100644 index 0000000..f2c7a76 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/coa_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// CoaResponse An array of Accounting Report objects +// +// swagger:model CoaResponse +type CoaResponse struct { + + // data + Data []*Coa `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this coa response +func (m *CoaResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *CoaResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *CoaResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *CoaResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CoaResponse) UnmarshalBinary(b []byte) error { + var res CoaResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/delete_response.go b/api/ledger/v0.0.1/ledger_models/delete_response.go new file mode 100644 index 0000000..524d445 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/delete_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// DeleteResponse delete response +// +// swagger:model DeleteResponse +type DeleteResponse struct { + + // data + Data []*Message `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this delete response +func (m *DeleteResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DeleteResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *DeleteResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *DeleteResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DeleteResponse) UnmarshalBinary(b []byte) error { + var res DeleteResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/error.go b/api/ledger/v0.0.1/ledger_models/error.go new file mode 100644 index 0000000..0d13403 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/error.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Error error +// +// swagger:model Error +type Error struct { + + // message + Message string `json:"Message,omitempty"` + + // code + Code int64 `json:"code,omitempty"` + + // fields + Fields string `json:"fields,omitempty"` +} + +// Validate validates this error +func (m *Error) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Error) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Error) UnmarshalBinary(b []byte) error { + var res Error + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/gl_account.go b/api/ledger/v0.0.1/ledger_models/gl_account.go new file mode 100644 index 0000000..4267237 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/gl_account.go @@ -0,0 +1,147 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// GlAccount gl account +// +// swagger:model GlAccount +type GlAccount struct { + + // Taxnexus Account that owns ths GL account + AccountID string `json:"AccountID,omitempty"` + + // Account Level + AccountLevel float64 `json:"AccountLevel,omitempty"` + + // Account Name + AccountName string `json:"AccountName,omitempty"` + + // Account Sign + AccountSign string `json:"AccountSign,omitempty"` + + // Account Type + AccountType string `json:"AccountType,omitempty"` + + // The GL Balances associated with this GL account + Balances []*GlBalance `json:"Balances"` + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Description + Description string `json:"Description,omitempty"` + + // Taxnexus Record Id Only; not used in POST + ID string `json:"ID,omitempty"` + + // Is Active? + IsActive bool `json:"IsActive,omitempty"` + + // Is Bank Account ? + IsBankAccount bool `json:"IsBankAccount,omitempty"` + + // Is Summary? + IsSummary bool `json:"IsSummary,omitempty"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Display value for GL Account + Name string `json:"Name,omitempty"` + + // Parent Foreign Key + ParentFK string `json:"ParentFK,omitempty"` + + // Source System identifier for this record, if any + Ref string `json:"Ref,omitempty"` + + // Status + Status string `json:"Status,omitempty"` + + // Tenant that owns this object instance + TenantID string `json:"TenantID,omitempty"` + + // Account Number + AccountNumber float64 `json:"accountNumber,omitempty"` + + // Parent GL Account ID + ParentGLAccountID string `json:"parentGLAccountID,omitempty"` +} + +// Validate validates this gl account +func (m *GlAccount) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBalances(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GlAccount) validateBalances(formats strfmt.Registry) error { + + if swag.IsZero(m.Balances) { // not required + return nil + } + + for i := 0; i < len(m.Balances); i++ { + if swag.IsZero(m.Balances[i]) { // not required + continue + } + + if m.Balances[i] != nil { + if err := m.Balances[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Balances" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *GlAccount) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *GlAccount) UnmarshalBinary(b []byte) error { + var res GlAccount + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/gl_account_request.go b/api/ledger/v0.0.1/ledger_models/gl_account_request.go new file mode 100644 index 0000000..43e5398 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/gl_account_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// GlAccountRequest gl account request +// +// swagger:model GlAccountRequest +type GlAccountRequest struct { + + // data + Data []*GlAccount `json:"Data"` +} + +// Validate validates this gl account request +func (m *GlAccountRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GlAccountRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *GlAccountRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *GlAccountRequest) UnmarshalBinary(b []byte) error { + var res GlAccountRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/gl_account_response.go b/api/ledger/v0.0.1/ledger_models/gl_account_response.go new file mode 100644 index 0000000..6b4c4e5 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/gl_account_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// GlAccountResponse An array of GL Account Objects +// +// swagger:model GlAccountResponse +type GlAccountResponse struct { + + // data + Data []*GlAccount `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this gl account response +func (m *GlAccountResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GlAccountResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *GlAccountResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *GlAccountResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *GlAccountResponse) UnmarshalBinary(b []byte) error { + var res GlAccountResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/gl_balance.go b/api/ledger/v0.0.1/ledger_models/gl_balance.go new file mode 100644 index 0000000..1f39f10 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/gl_balance.go @@ -0,0 +1,101 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// GlBalance gl balance +// +// swagger:model GlBalance +type GlBalance struct { + + // Account Name + AccountName string `json:"AccountName,omitempty"` + + // Amount + Amount float64 `json:"Amount,omitempty"` + + // Close Date + CloseDate string `json:"CloseDate,omitempty"` + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Credits + Credits float64 `json:"Credits,omitempty"` + + // Debits + Debits float64 `json:"Debits,omitempty"` + + // Description + Description string `json:"Description,omitempty"` + + // GL Account Display Value + GLAccountDisplay string `json:"GLAccountDisplay,omitempty"` + + // GL Account + GLAccountID string `json:"GLAccountID,omitempty"` + + // Taxnexus Record Id Only; not used in POST + ID string `json:"ID,omitempty"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Period ID + PeriodID string `json:"PeriodID,omitempty"` + + // Source System identifier for this record, if any + Ref string `json:"Ref,omitempty"` + + // Rollup Credits + RollupCredits float64 `json:"RollupCredits,omitempty"` + + // Rollup Debits + RollupDebits float64 `json:"RollupDebits,omitempty"` + + // Status + Status string `json:"Status,omitempty"` + + // Tenant that owns this object instance + TenantID string `json:"TenantID,omitempty"` +} + +// Validate validates this gl balance +func (m *GlBalance) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *GlBalance) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *GlBalance) UnmarshalBinary(b []byte) error { + var res GlBalance + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/gl_balance_request.go b/api/ledger/v0.0.1/ledger_models/gl_balance_request.go new file mode 100644 index 0000000..5557fb9 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/gl_balance_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// GlBalanceRequest gl balance request +// +// swagger:model GlBalanceRequest +type GlBalanceRequest struct { + + // data + Data []*GlBalance `json:"Data"` +} + +// Validate validates this gl balance request +func (m *GlBalanceRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GlBalanceRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *GlBalanceRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *GlBalanceRequest) UnmarshalBinary(b []byte) error { + var res GlBalanceRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/gl_balance_response.go b/api/ledger/v0.0.1/ledger_models/gl_balance_response.go new file mode 100644 index 0000000..448a2df --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/gl_balance_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// GlBalanceResponse An array of GL Balance Objects +// +// swagger:model GlBalanceResponse +type GlBalanceResponse struct { + + // data + Data []*GlBalance `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this gl balance response +func (m *GlBalanceResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GlBalanceResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *GlBalanceResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *GlBalanceResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *GlBalanceResponse) UnmarshalBinary(b []byte) error { + var res GlBalanceResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/invalid_error.go b/api/ledger/v0.0.1/ledger_models/invalid_error.go new file mode 100644 index 0000000..774e315 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/invalid_error.go @@ -0,0 +1,104 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// InvalidError invalid error +// +// swagger:model InvalidError +type InvalidError struct { + Error + + // details + Details []string `json:"details"` +} + +// UnmarshalJSON unmarshals this object from a JSON structure +func (m *InvalidError) UnmarshalJSON(raw []byte) error { + // AO0 + var aO0 Error + if err := swag.ReadJSON(raw, &aO0); err != nil { + return err + } + m.Error = aO0 + + // AO1 + var dataAO1 struct { + Details []string `json:"details"` + } + if err := swag.ReadJSON(raw, &dataAO1); err != nil { + return err + } + + m.Details = dataAO1.Details + + return nil +} + +// MarshalJSON marshals this object to a JSON structure +func (m InvalidError) MarshalJSON() ([]byte, error) { + _parts := make([][]byte, 0, 2) + + aO0, err := swag.WriteJSON(m.Error) + if err != nil { + return nil, err + } + _parts = append(_parts, aO0) + var dataAO1 struct { + Details []string `json:"details"` + } + + dataAO1.Details = m.Details + + jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) + if errAO1 != nil { + return nil, errAO1 + } + _parts = append(_parts, jsonDataAO1) + return swag.ConcatJSON(_parts...), nil +} + +// Validate validates this invalid error +func (m *InvalidError) Validate(formats strfmt.Registry) error { + var res []error + + // validation for a type composition with Error + if err := m.Error.Validate(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// MarshalBinary interface implementation +func (m *InvalidError) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *InvalidError) UnmarshalBinary(b []byte) error { + var res InvalidError + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/journal_entry.go b/api/ledger/v0.0.1/ledger_models/journal_entry.go new file mode 100644 index 0000000..5e2f6c7 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/journal_entry.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// JournalEntry journal entry +// +// swagger:model JournalEntry +type JournalEntry struct { + + // Account ID + AccountID string `json:"AccountID,omitempty"` + + // Balanced? + Balanced bool `json:"Balanced,omitempty"` + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Credits + Credits float64 `json:"Credits,omitempty"` + + // Debits + Debits float64 `json:"Debits,omitempty"` + + // Description + Description string `json:"Description,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // Rating Ingest ID + IngestID string `json:"IngestID,omitempty"` + + // The Journal Items associated with this Journal Entry + Items []*JournalItem `json:"Items"` + + // Journal Date + JournalDate string `json:"JournalDate,omitempty"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Parent Foreign Key + ParentFK string `json:"ParentFK,omitempty"` + + // The ID of the period in which this Journal Entry occurs + PeriodID string `json:"PeriodID,omitempty"` + + // Posted + Posted bool `json:"Posted,omitempty"` + + // Source System identifier for this record, if any + Ref string `json:"Ref,omitempty"` + + // Sales Regulation + SalesRegulation string `json:"SalesRegulation,omitempty"` + + // Status + Status string `json:"Status,omitempty"` + + // Tenant that owns this object instance + TenantID string `json:"TenantID,omitempty"` +} + +// Validate validates this journal entry +func (m *JournalEntry) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *JournalEntry) validateItems(formats strfmt.Registry) error { + + if swag.IsZero(m.Items) { // not required + return nil + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *JournalEntry) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *JournalEntry) UnmarshalBinary(b []byte) error { + var res JournalEntry + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/journal_entry_request.go b/api/ledger/v0.0.1/ledger_models/journal_entry_request.go new file mode 100644 index 0000000..10687f2 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/journal_entry_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// JournalEntryRequest An array of Journal Entry objects with Journal Items +// +// swagger:model JournalEntryRequest +type JournalEntryRequest struct { + + // data + Data []*JournalEntry `json:"Data"` +} + +// Validate validates this journal entry request +func (m *JournalEntryRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *JournalEntryRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *JournalEntryRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *JournalEntryRequest) UnmarshalBinary(b []byte) error { + var res JournalEntryRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/journal_entry_response.go b/api/ledger/v0.0.1/ledger_models/journal_entry_response.go new file mode 100644 index 0000000..d245b59 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/journal_entry_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// JournalEntryResponse An array of Journal Entry objects with Journal Items +// +// swagger:model JournalEntryResponse +type JournalEntryResponse struct { + + // data + Data []*JournalEntry `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this journal entry response +func (m *JournalEntryResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *JournalEntryResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *JournalEntryResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *JournalEntryResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *JournalEntryResponse) UnmarshalBinary(b []byte) error { + var res JournalEntryResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/journal_item.go b/api/ledger/v0.0.1/ledger_models/journal_item.go new file mode 100644 index 0000000..714202b --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/journal_item.go @@ -0,0 +1,107 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// JournalItem journal item +// +// swagger:model JournalItem +type JournalItem struct { + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Credit value for this Journal Item + Credit float64 `json:"Credit,omitempty"` + + // Debit value for this Journal Item + Debit float64 `json:"Debit,omitempty"` + + // GL Account Display Value + GLAccountDisplay string `json:"GLAccountDisplay,omitempty"` + + // GL Account ID + GLAccountID string `json:"GLAccountID,omitempty"` + + // GL Balance ID + GLBalanceID string `json:"GLBalanceID,omitempty"` + + // Invoice Item ID + InvoiceItemID string `json:"InvoiceItemID,omitempty"` + + // Journal Entry ID + JournalEntryID string `json:"JournalEntryID,omitempty"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // PO Item ID + POItemID string `json:"POItemID,omitempty"` + + // Product Code + ProducCode string `json:"ProducCode,omitempty"` + + // Product ID + ProductID string `json:"ProductID,omitempty"` + + // Reference Type + ReferenceType string `json:"ReferenceType,omitempty"` + + // The Sales Regulation value for this CoA Item + SalesRegulation string `json:"SalesRegulation,omitempty"` + + // Tax Transaction ID + TaxTransactionID string `json:"TaxTransactionID,omitempty"` + + // Taxnexus Code Display Value + TaxnexusCodeDisplay string `json:"TaxnexusCodeDisplay,omitempty"` + + // Taxnexus Code ID + TaxnexusCodeID string `json:"TaxnexusCodeID,omitempty"` + + // Tenant that owns this object instance + TenantID string `json:"TenantID,omitempty"` + + // Taxnexus Record Id Only; not used in POST + ID string `json:"id,omitempty"` +} + +// Validate validates this journal item +func (m *JournalItem) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *JournalItem) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *JournalItem) UnmarshalBinary(b []byte) error { + var res JournalItem + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/journal_item_response.go b/api/ledger/v0.0.1/ledger_models/journal_item_response.go new file mode 100644 index 0000000..0d3d914 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/journal_item_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// JournalItemResponse An array of Journal Item objects +// +// swagger:model JournalItemResponse +type JournalItemResponse struct { + + // data + Data []*JournalItem `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this journal item response +func (m *JournalItemResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *JournalItemResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *JournalItemResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *JournalItemResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *JournalItemResponse) UnmarshalBinary(b []byte) error { + var res JournalItemResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/journal_item_summary.go b/api/ledger/v0.0.1/ledger_models/journal_item_summary.go new file mode 100644 index 0000000..4a270e2 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/journal_item_summary.go @@ -0,0 +1,68 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// JournalItemSummary journal item summary +// +// swagger:model JournalItemSummary +type JournalItemSummary struct { + + // credits + Credits float64 `json:"Credits,omitempty"` + + // debits + Debits float64 `json:"Debits,omitempty"` + + // g l account name + GLAccountName string `json:"GLAccountName,omitempty"` + + // g l balance ID + GLBalanceID string `json:"GLBalanceID,omitempty"` + + // month number + MonthNumber int64 `json:"MonthNumber,omitempty"` + + // period name + PeriodName string `json:"PeriodName,omitempty"` + + // quarter number + QuarterNumber int64 `json:"QuarterNumber,omitempty"` + + // year number + YearNumber int64 `json:"YearNumber,omitempty"` +} + +// Validate validates this journal item summary +func (m *JournalItemSummary) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *JournalItemSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *JournalItemSummary) UnmarshalBinary(b []byte) error { + var res JournalItemSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/journal_item_summary_response.go b/api/ledger/v0.0.1/ledger_models/journal_item_summary_response.go new file mode 100644 index 0000000..aac7392 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/journal_item_summary_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// JournalItemSummaryResponse An array of Journal Item Summary objects +// +// swagger:model JournalItemSummaryResponse +type JournalItemSummaryResponse struct { + + // data + Data []*JournalItemSummary `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this journal item summary response +func (m *JournalItemSummaryResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *JournalItemSummaryResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *JournalItemSummaryResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *JournalItemSummaryResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *JournalItemSummaryResponse) UnmarshalBinary(b []byte) error { + var res JournalItemSummaryResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/message.go b/api/ledger/v0.0.1/ledger_models/message.go new file mode 100644 index 0000000..c9368bd --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/message.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Message message +// +// swagger:model Message +type Message struct { + + // message + Message string `json:"Message,omitempty"` + + // ref + Ref string `json:"Ref,omitempty"` + + // status + Status int64 `json:"Status,omitempty"` +} + +// Validate validates this message +func (m *Message) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Message) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Message) UnmarshalBinary(b []byte) error { + var res Message + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/pagination.go b/api/ledger/v0.0.1/ledger_models/pagination.go new file mode 100644 index 0000000..4dcc1a0 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/pagination.go @@ -0,0 +1,56 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Pagination pagination +// +// swagger:model Pagination +type Pagination struct { + + // limit + Limit int64 `json:"Limit,omitempty"` + + // p offset + POffset int64 `json:"POffset,omitempty"` + + // page size + PageSize int64 `json:"PageSize,omitempty"` + + // set size + SetSize int64 `json:"SetSize,omitempty"` +} + +// Validate validates this pagination +func (m *Pagination) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Pagination) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Pagination) UnmarshalBinary(b []byte) error { + var res Pagination + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/period.go b/api/ledger/v0.0.1/ledger_models/period.go new file mode 100644 index 0000000..1374101 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/period.go @@ -0,0 +1,98 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Period period +// +// swagger:model Period +type Period struct { + + // Account that owns this Period + AccountID string `json:"AccountID,omitempty"` + + // Company + CompanyID string `json:"CompanyID,omitempty"` + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Days + Days int64 `json:"Days,omitempty"` + + // End Date + EndDate string `json:"EndDate,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Month number + Month int64 `json:"Month,omitempty"` + + // Period Name + Name string `json:"Name,omitempty"` + + // Quarter Number + Quarter int64 `json:"Quarter,omitempty"` + + // Source System identifier for this record, if any + Ref string `json:"Ref,omitempty"` + + // The Semiannual period in numeric format + Semiannual int64 `json:"Semiannual,omitempty"` + + // Start Date + StartDate string `json:"StartDate,omitempty"` + + // Status + Status string `json:"Status,omitempty"` + + // Tenant that owns this object instance + TenantID string `json:"TenantID,omitempty"` + + // Year number + Year int64 `json:"Year,omitempty"` +} + +// Validate validates this period +func (m *Period) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Period) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Period) UnmarshalBinary(b []byte) error { + var res Period + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/period_request.go b/api/ledger/v0.0.1/ledger_models/period_request.go new file mode 100644 index 0000000..81ca8a4 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/period_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// PeriodRequest period request +// +// swagger:model PeriodRequest +type PeriodRequest struct { + + // data + Data []*Period `json:"Data"` +} + +// Validate validates this period request +func (m *PeriodRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PeriodRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PeriodRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PeriodRequest) UnmarshalBinary(b []byte) error { + var res PeriodRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/period_response.go b/api/ledger/v0.0.1/ledger_models/period_response.go new file mode 100644 index 0000000..e01109f --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/period_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// PeriodResponse An array of period objects +// +// swagger:model PeriodResponse +type PeriodResponse struct { + + // data + Data []*Period `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this period response +func (m *PeriodResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PeriodResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PeriodResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PeriodResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PeriodResponse) UnmarshalBinary(b []byte) error { + var res PeriodResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/put_response.go b/api/ledger/v0.0.1/ledger_models/put_response.go new file mode 100644 index 0000000..70c5ecd --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/put_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// PutResponse put response +// +// swagger:model PutResponse +type PutResponse struct { + + // data + Data []*Message `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this put response +func (m *PutResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PutResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PutResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PutResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PutResponse) UnmarshalBinary(b []byte) error { + var res PutResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/request_meta.go b/api/ledger/v0.0.1/ledger_models/request_meta.go new file mode 100644 index 0000000..ba01163 --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/request_meta.go @@ -0,0 +1,68 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// RequestMeta request meta +// +// swagger:model RequestMeta +type RequestMeta struct { + + // Taxnexus Account Number of the Reseller or OEM + // Required: true + TaxnexusAccount *string `json:"TaxnexusAccount"` +} + +// Validate validates this request meta +func (m *RequestMeta) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTaxnexusAccount(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RequestMeta) validateTaxnexusAccount(formats strfmt.Registry) error { + + if err := validate.Required("TaxnexusAccount", "body", m.TaxnexusAccount); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *RequestMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RequestMeta) UnmarshalBinary(b []byte) error { + var res RequestMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ledger/v0.0.1/ledger_models/response_meta.go b/api/ledger/v0.0.1/ledger_models/response_meta.go new file mode 100644 index 0000000..6c57e1d --- /dev/null +++ b/api/ledger/v0.0.1/ledger_models/response_meta.go @@ -0,0 +1,108 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ledger_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ResponseMeta response meta +// +// swagger:model ResponseMeta +type ResponseMeta struct { + + // Microservice Contact Info + Contact string `json:"Contact,omitempty"` + + // Copyright Info + Copyright string `json:"Copyright,omitempty"` + + // License Information and Restrictions + License string `json:"License,omitempty"` + + // Operation ID + OperationID string `json:"OperationID,omitempty"` + + // pagination + Pagination *Pagination `json:"Pagination,omitempty"` + + // Request IP Address + RequestIP string `json:"RequestIP,omitempty"` + + // Request Type + RequestType string `json:"RequestType,omitempty"` + + // Request URL + RequestURL string `json:"RequestURL,omitempty"` + + // Data Server Info + ServerInfo string `json:"ServerInfo,omitempty"` + + // Data Server Response Time (ms) + ServerResponseTime string `json:"ServerResponseTime,omitempty"` + + // Backend Server Timestamp + ServerTimestamp string `json:"ServerTimestamp,omitempty"` + + // Taxnexus Account Number used for recording transactions + TaxnexusAccount string `json:"TaxnexusAccount,omitempty"` +} + +// Validate validates this response meta +func (m *ResponseMeta) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePagination(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ResponseMeta) validatePagination(formats strfmt.Registry) error { + + if swag.IsZero(m.Pagination) { // not required + return nil + } + + if m.Pagination != nil { + if err := m.Pagination.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Pagination") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ResponseMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ResponseMeta) UnmarshalBinary(b []byte) error { + var res ResponseMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cash_receipt/cash_receipt_client.go b/api/ops/v0.0.1/ops_client/cash_receipt/cash_receipt_client.go new file mode 100644 index 0000000..7283c51 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cash_receipt/cash_receipt_client.go @@ -0,0 +1,196 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cash_receipt + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new cash receipt API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for cash receipt API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + DeleteCashReceipt(params *DeleteCashReceiptParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteCashReceiptOK, error) + + GetCashReceipts(params *GetCashReceiptsParams, authInfo runtime.ClientAuthInfoWriter) (*GetCashReceiptsOK, error) + + PostCashReceipts(params *PostCashReceiptsParams, authInfo runtime.ClientAuthInfoWriter) (*PostCashReceiptsOK, error) + + PutCashReceipts(params *PutCashReceiptsParams, authInfo runtime.ClientAuthInfoWriter) (*PutCashReceiptsOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + DeleteCashReceipt deletes a cash receipt + + Delete cash receipt by ID +*/ +func (a *Client) DeleteCashReceipt(params *DeleteCashReceiptParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteCashReceiptOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDeleteCashReceiptParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "deleteCashReceipt", + Method: "DELETE", + PathPattern: "/cashreceipts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &DeleteCashReceiptReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*DeleteCashReceiptOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for deleteCashReceipt: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetCashReceipts gets a list of cash receipts + + Return a list of available Taxnexus Cash Receipts +*/ +func (a *Client) GetCashReceipts(params *GetCashReceiptsParams, authInfo runtime.ClientAuthInfoWriter) (*GetCashReceiptsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetCashReceiptsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getCashReceipts", + Method: "GET", + PathPattern: "/cashreceipts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetCashReceiptsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetCashReceiptsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getCashReceipts: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostCashReceipts creates new cash receipts + + Create New Cash Receipts +*/ +func (a *Client) PostCashReceipts(params *PostCashReceiptsParams, authInfo runtime.ClientAuthInfoWriter) (*PostCashReceiptsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostCashReceiptsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postCashReceipts", + Method: "POST", + PathPattern: "/cashreceipts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostCashReceiptsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostCashReceiptsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postCashReceipts: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PutCashReceipts puts a list of cash receipts + + Put a list of Cash Receipts +*/ +func (a *Client) PutCashReceipts(params *PutCashReceiptsParams, authInfo runtime.ClientAuthInfoWriter) (*PutCashReceiptsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPutCashReceiptsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "putCashReceipts", + Method: "PUT", + PathPattern: "/cashreceipts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PutCashReceiptsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PutCashReceiptsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for putCashReceipts: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/ops/v0.0.1/ops_client/cash_receipt/delete_cash_receipt_parameters.go b/api/ops/v0.0.1/ops_client/cash_receipt/delete_cash_receipt_parameters.go new file mode 100644 index 0000000..d02263c --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cash_receipt/delete_cash_receipt_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cash_receipt + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewDeleteCashReceiptParams creates a new DeleteCashReceiptParams object +// with the default values initialized. +func NewDeleteCashReceiptParams() *DeleteCashReceiptParams { + var () + return &DeleteCashReceiptParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewDeleteCashReceiptParamsWithTimeout creates a new DeleteCashReceiptParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewDeleteCashReceiptParamsWithTimeout(timeout time.Duration) *DeleteCashReceiptParams { + var () + return &DeleteCashReceiptParams{ + + timeout: timeout, + } +} + +// NewDeleteCashReceiptParamsWithContext creates a new DeleteCashReceiptParams object +// with the default values initialized, and the ability to set a context for a request +func NewDeleteCashReceiptParamsWithContext(ctx context.Context) *DeleteCashReceiptParams { + var () + return &DeleteCashReceiptParams{ + + Context: ctx, + } +} + +// NewDeleteCashReceiptParamsWithHTTPClient creates a new DeleteCashReceiptParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewDeleteCashReceiptParamsWithHTTPClient(client *http.Client) *DeleteCashReceiptParams { + var () + return &DeleteCashReceiptParams{ + HTTPClient: client, + } +} + +/*DeleteCashReceiptParams contains all the parameters to send to the API endpoint +for the delete cash receipt operation typically these are written to a http.Request +*/ +type DeleteCashReceiptParams struct { + + /*ID + Taxnexus Id of the record to be retrieved + + */ + ID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the delete cash receipt params +func (o *DeleteCashReceiptParams) WithTimeout(timeout time.Duration) *DeleteCashReceiptParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the delete cash receipt params +func (o *DeleteCashReceiptParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the delete cash receipt params +func (o *DeleteCashReceiptParams) WithContext(ctx context.Context) *DeleteCashReceiptParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the delete cash receipt params +func (o *DeleteCashReceiptParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the delete cash receipt params +func (o *DeleteCashReceiptParams) WithHTTPClient(client *http.Client) *DeleteCashReceiptParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the delete cash receipt params +func (o *DeleteCashReceiptParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the delete cash receipt params +func (o *DeleteCashReceiptParams) WithID(id *string) *DeleteCashReceiptParams { + o.SetID(id) + return o +} + +// SetID adds the id to the delete cash receipt params +func (o *DeleteCashReceiptParams) SetID(id *string) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DeleteCashReceiptParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ID != nil { + + // query param id + var qrID string + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cash_receipt/delete_cash_receipt_responses.go b/api/ops/v0.0.1/ops_client/cash_receipt/delete_cash_receipt_responses.go new file mode 100644 index 0000000..7ecd037 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cash_receipt/delete_cash_receipt_responses.go @@ -0,0 +1,298 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cash_receipt + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// DeleteCashReceiptReader is a Reader for the DeleteCashReceipt structure. +type DeleteCashReceiptReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DeleteCashReceiptReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDeleteCashReceiptOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewDeleteCashReceiptUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewDeleteCashReceiptForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewDeleteCashReceiptNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewDeleteCashReceiptUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewDeleteCashReceiptInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewDeleteCashReceiptOK creates a DeleteCashReceiptOK with default headers values +func NewDeleteCashReceiptOK() *DeleteCashReceiptOK { + return &DeleteCashReceiptOK{} +} + +/*DeleteCashReceiptOK handles this case with default header values. + +Taxnexus Response with Message Objects with Delete Status +*/ +type DeleteCashReceiptOK struct { + AccessControlAllowOrigin string + + Payload *ops_models.DeleteResponse +} + +func (o *DeleteCashReceiptOK) Error() string { + return fmt.Sprintf("[DELETE /cashreceipts][%d] deleteCashReceiptOK %+v", 200, o.Payload) +} + +func (o *DeleteCashReceiptOK) GetPayload() *ops_models.DeleteResponse { + return o.Payload +} + +func (o *DeleteCashReceiptOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.DeleteResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteCashReceiptUnauthorized creates a DeleteCashReceiptUnauthorized with default headers values +func NewDeleteCashReceiptUnauthorized() *DeleteCashReceiptUnauthorized { + return &DeleteCashReceiptUnauthorized{} +} + +/*DeleteCashReceiptUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type DeleteCashReceiptUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeleteCashReceiptUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /cashreceipts][%d] deleteCashReceiptUnauthorized %+v", 401, o.Payload) +} + +func (o *DeleteCashReceiptUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeleteCashReceiptUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteCashReceiptForbidden creates a DeleteCashReceiptForbidden with default headers values +func NewDeleteCashReceiptForbidden() *DeleteCashReceiptForbidden { + return &DeleteCashReceiptForbidden{} +} + +/*DeleteCashReceiptForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type DeleteCashReceiptForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeleteCashReceiptForbidden) Error() string { + return fmt.Sprintf("[DELETE /cashreceipts][%d] deleteCashReceiptForbidden %+v", 403, o.Payload) +} + +func (o *DeleteCashReceiptForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeleteCashReceiptForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteCashReceiptNotFound creates a DeleteCashReceiptNotFound with default headers values +func NewDeleteCashReceiptNotFound() *DeleteCashReceiptNotFound { + return &DeleteCashReceiptNotFound{} +} + +/*DeleteCashReceiptNotFound handles this case with default header values. + +Resource was not found +*/ +type DeleteCashReceiptNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeleteCashReceiptNotFound) Error() string { + return fmt.Sprintf("[DELETE /cashreceipts][%d] deleteCashReceiptNotFound %+v", 404, o.Payload) +} + +func (o *DeleteCashReceiptNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeleteCashReceiptNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteCashReceiptUnprocessableEntity creates a DeleteCashReceiptUnprocessableEntity with default headers values +func NewDeleteCashReceiptUnprocessableEntity() *DeleteCashReceiptUnprocessableEntity { + return &DeleteCashReceiptUnprocessableEntity{} +} + +/*DeleteCashReceiptUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type DeleteCashReceiptUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeleteCashReceiptUnprocessableEntity) Error() string { + return fmt.Sprintf("[DELETE /cashreceipts][%d] deleteCashReceiptUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *DeleteCashReceiptUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeleteCashReceiptUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteCashReceiptInternalServerError creates a DeleteCashReceiptInternalServerError with default headers values +func NewDeleteCashReceiptInternalServerError() *DeleteCashReceiptInternalServerError { + return &DeleteCashReceiptInternalServerError{} +} + +/*DeleteCashReceiptInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type DeleteCashReceiptInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeleteCashReceiptInternalServerError) Error() string { + return fmt.Sprintf("[DELETE /cashreceipts][%d] deleteCashReceiptInternalServerError %+v", 500, o.Payload) +} + +func (o *DeleteCashReceiptInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeleteCashReceiptInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cash_receipt/get_cash_receipts_parameters.go b/api/ops/v0.0.1/ops_client/cash_receipt/get_cash_receipts_parameters.go new file mode 100644 index 0000000..7a7ad3b --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cash_receipt/get_cash_receipts_parameters.go @@ -0,0 +1,215 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cash_receipt + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetCashReceiptsParams creates a new GetCashReceiptsParams object +// with the default values initialized. +func NewGetCashReceiptsParams() *GetCashReceiptsParams { + var () + return &GetCashReceiptsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetCashReceiptsParamsWithTimeout creates a new GetCashReceiptsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetCashReceiptsParamsWithTimeout(timeout time.Duration) *GetCashReceiptsParams { + var () + return &GetCashReceiptsParams{ + + timeout: timeout, + } +} + +// NewGetCashReceiptsParamsWithContext creates a new GetCashReceiptsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetCashReceiptsParamsWithContext(ctx context.Context) *GetCashReceiptsParams { + var () + return &GetCashReceiptsParams{ + + Context: ctx, + } +} + +// NewGetCashReceiptsParamsWithHTTPClient creates a new GetCashReceiptsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetCashReceiptsParamsWithHTTPClient(client *http.Client) *GetCashReceiptsParams { + var () + return &GetCashReceiptsParams{ + HTTPClient: client, + } +} + +/*GetCashReceiptsParams contains all the parameters to send to the API endpoint +for the get cash receipts operation typically these are written to a http.Request +*/ +type GetCashReceiptsParams struct { + + /*CashReceiptID + Taxnexus Record Id of a Cash Receipt + + */ + CashReceiptID *string + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get cash receipts params +func (o *GetCashReceiptsParams) WithTimeout(timeout time.Duration) *GetCashReceiptsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get cash receipts params +func (o *GetCashReceiptsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get cash receipts params +func (o *GetCashReceiptsParams) WithContext(ctx context.Context) *GetCashReceiptsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get cash receipts params +func (o *GetCashReceiptsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get cash receipts params +func (o *GetCashReceiptsParams) WithHTTPClient(client *http.Client) *GetCashReceiptsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get cash receipts params +func (o *GetCashReceiptsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCashReceiptID adds the cashReceiptID to the get cash receipts params +func (o *GetCashReceiptsParams) WithCashReceiptID(cashReceiptID *string) *GetCashReceiptsParams { + o.SetCashReceiptID(cashReceiptID) + return o +} + +// SetCashReceiptID adds the cashReceiptId to the get cash receipts params +func (o *GetCashReceiptsParams) SetCashReceiptID(cashReceiptID *string) { + o.CashReceiptID = cashReceiptID +} + +// WithLimit adds the limit to the get cash receipts params +func (o *GetCashReceiptsParams) WithLimit(limit *int64) *GetCashReceiptsParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get cash receipts params +func (o *GetCashReceiptsParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get cash receipts params +func (o *GetCashReceiptsParams) WithOffset(offset *int64) *GetCashReceiptsParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get cash receipts params +func (o *GetCashReceiptsParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *GetCashReceiptsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CashReceiptID != nil { + + // query param cashReceiptId + var qrCashReceiptID string + if o.CashReceiptID != nil { + qrCashReceiptID = *o.CashReceiptID + } + qCashReceiptID := qrCashReceiptID + if qCashReceiptID != "" { + if err := r.SetQueryParam("cashReceiptId", qCashReceiptID); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cash_receipt/get_cash_receipts_responses.go b/api/ops/v0.0.1/ops_client/cash_receipt/get_cash_receipts_responses.go new file mode 100644 index 0000000..84ae79f --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cash_receipt/get_cash_receipts_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cash_receipt + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// GetCashReceiptsReader is a Reader for the GetCashReceipts structure. +type GetCashReceiptsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetCashReceiptsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetCashReceiptsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetCashReceiptsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetCashReceiptsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetCashReceiptsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetCashReceiptsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetCashReceiptsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetCashReceiptsOK creates a GetCashReceiptsOK with default headers values +func NewGetCashReceiptsOK() *GetCashReceiptsOK { + return &GetCashReceiptsOK{} +} + +/*GetCashReceiptsOK handles this case with default header values. + +Taxnexus Response with Cash Receipt objects +*/ +type GetCashReceiptsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *ops_models.CashReceiptResponse +} + +func (o *GetCashReceiptsOK) Error() string { + return fmt.Sprintf("[GET /cashreceipts][%d] getCashReceiptsOK %+v", 200, o.Payload) +} + +func (o *GetCashReceiptsOK) GetPayload() *ops_models.CashReceiptResponse { + return o.Payload +} + +func (o *GetCashReceiptsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(ops_models.CashReceiptResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCashReceiptsUnauthorized creates a GetCashReceiptsUnauthorized with default headers values +func NewGetCashReceiptsUnauthorized() *GetCashReceiptsUnauthorized { + return &GetCashReceiptsUnauthorized{} +} + +/*GetCashReceiptsUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetCashReceiptsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetCashReceiptsUnauthorized) Error() string { + return fmt.Sprintf("[GET /cashreceipts][%d] getCashReceiptsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetCashReceiptsUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetCashReceiptsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCashReceiptsForbidden creates a GetCashReceiptsForbidden with default headers values +func NewGetCashReceiptsForbidden() *GetCashReceiptsForbidden { + return &GetCashReceiptsForbidden{} +} + +/*GetCashReceiptsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetCashReceiptsForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetCashReceiptsForbidden) Error() string { + return fmt.Sprintf("[GET /cashreceipts][%d] getCashReceiptsForbidden %+v", 403, o.Payload) +} + +func (o *GetCashReceiptsForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetCashReceiptsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCashReceiptsNotFound creates a GetCashReceiptsNotFound with default headers values +func NewGetCashReceiptsNotFound() *GetCashReceiptsNotFound { + return &GetCashReceiptsNotFound{} +} + +/*GetCashReceiptsNotFound handles this case with default header values. + +Resource was not found +*/ +type GetCashReceiptsNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetCashReceiptsNotFound) Error() string { + return fmt.Sprintf("[GET /cashreceipts][%d] getCashReceiptsNotFound %+v", 404, o.Payload) +} + +func (o *GetCashReceiptsNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetCashReceiptsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCashReceiptsUnprocessableEntity creates a GetCashReceiptsUnprocessableEntity with default headers values +func NewGetCashReceiptsUnprocessableEntity() *GetCashReceiptsUnprocessableEntity { + return &GetCashReceiptsUnprocessableEntity{} +} + +/*GetCashReceiptsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetCashReceiptsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetCashReceiptsUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /cashreceipts][%d] getCashReceiptsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetCashReceiptsUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetCashReceiptsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetCashReceiptsInternalServerError creates a GetCashReceiptsInternalServerError with default headers values +func NewGetCashReceiptsInternalServerError() *GetCashReceiptsInternalServerError { + return &GetCashReceiptsInternalServerError{} +} + +/*GetCashReceiptsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetCashReceiptsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetCashReceiptsInternalServerError) Error() string { + return fmt.Sprintf("[GET /cashreceipts][%d] getCashReceiptsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetCashReceiptsInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetCashReceiptsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cash_receipt/post_cash_receipts_parameters.go b/api/ops/v0.0.1/ops_client/cash_receipt/post_cash_receipts_parameters.go new file mode 100644 index 0000000..4486d7b --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cash_receipt/post_cash_receipts_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cash_receipt + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// NewPostCashReceiptsParams creates a new PostCashReceiptsParams object +// with the default values initialized. +func NewPostCashReceiptsParams() *PostCashReceiptsParams { + var () + return &PostCashReceiptsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostCashReceiptsParamsWithTimeout creates a new PostCashReceiptsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostCashReceiptsParamsWithTimeout(timeout time.Duration) *PostCashReceiptsParams { + var () + return &PostCashReceiptsParams{ + + timeout: timeout, + } +} + +// NewPostCashReceiptsParamsWithContext creates a new PostCashReceiptsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostCashReceiptsParamsWithContext(ctx context.Context) *PostCashReceiptsParams { + var () + return &PostCashReceiptsParams{ + + Context: ctx, + } +} + +// NewPostCashReceiptsParamsWithHTTPClient creates a new PostCashReceiptsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostCashReceiptsParamsWithHTTPClient(client *http.Client) *PostCashReceiptsParams { + var () + return &PostCashReceiptsParams{ + HTTPClient: client, + } +} + +/*PostCashReceiptsParams contains all the parameters to send to the API endpoint +for the post cash receipts operation typically these are written to a http.Request +*/ +type PostCashReceiptsParams struct { + + /*CashReceiptRequest + A request with an array of Cash Receipot Objects + + */ + CashReceiptRequest *ops_models.CashReceiptRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post cash receipts params +func (o *PostCashReceiptsParams) WithTimeout(timeout time.Duration) *PostCashReceiptsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post cash receipts params +func (o *PostCashReceiptsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post cash receipts params +func (o *PostCashReceiptsParams) WithContext(ctx context.Context) *PostCashReceiptsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post cash receipts params +func (o *PostCashReceiptsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post cash receipts params +func (o *PostCashReceiptsParams) WithHTTPClient(client *http.Client) *PostCashReceiptsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post cash receipts params +func (o *PostCashReceiptsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCashReceiptRequest adds the cashReceiptRequest to the post cash receipts params +func (o *PostCashReceiptsParams) WithCashReceiptRequest(cashReceiptRequest *ops_models.CashReceiptRequest) *PostCashReceiptsParams { + o.SetCashReceiptRequest(cashReceiptRequest) + return o +} + +// SetCashReceiptRequest adds the cashReceiptRequest to the post cash receipts params +func (o *PostCashReceiptsParams) SetCashReceiptRequest(cashReceiptRequest *ops_models.CashReceiptRequest) { + o.CashReceiptRequest = cashReceiptRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostCashReceiptsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CashReceiptRequest != nil { + if err := r.SetBodyParam(o.CashReceiptRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cash_receipt/post_cash_receipts_responses.go b/api/ops/v0.0.1/ops_client/cash_receipt/post_cash_receipts_responses.go new file mode 100644 index 0000000..5735803 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cash_receipt/post_cash_receipts_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cash_receipt + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// PostCashReceiptsReader is a Reader for the PostCashReceipts structure. +type PostCashReceiptsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostCashReceiptsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostCashReceiptsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostCashReceiptsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostCashReceiptsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostCashReceiptsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostCashReceiptsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostCashReceiptsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostCashReceiptsOK creates a PostCashReceiptsOK with default headers values +func NewPostCashReceiptsOK() *PostCashReceiptsOK { + return &PostCashReceiptsOK{} +} + +/*PostCashReceiptsOK handles this case with default header values. + +Taxnexus Response with Cash Receipt objects +*/ +type PostCashReceiptsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *ops_models.CashReceiptResponse +} + +func (o *PostCashReceiptsOK) Error() string { + return fmt.Sprintf("[POST /cashreceipts][%d] postCashReceiptsOK %+v", 200, o.Payload) +} + +func (o *PostCashReceiptsOK) GetPayload() *ops_models.CashReceiptResponse { + return o.Payload +} + +func (o *PostCashReceiptsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(ops_models.CashReceiptResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCashReceiptsUnauthorized creates a PostCashReceiptsUnauthorized with default headers values +func NewPostCashReceiptsUnauthorized() *PostCashReceiptsUnauthorized { + return &PostCashReceiptsUnauthorized{} +} + +/*PostCashReceiptsUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PostCashReceiptsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostCashReceiptsUnauthorized) Error() string { + return fmt.Sprintf("[POST /cashreceipts][%d] postCashReceiptsUnauthorized %+v", 401, o.Payload) +} + +func (o *PostCashReceiptsUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostCashReceiptsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCashReceiptsForbidden creates a PostCashReceiptsForbidden with default headers values +func NewPostCashReceiptsForbidden() *PostCashReceiptsForbidden { + return &PostCashReceiptsForbidden{} +} + +/*PostCashReceiptsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostCashReceiptsForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostCashReceiptsForbidden) Error() string { + return fmt.Sprintf("[POST /cashreceipts][%d] postCashReceiptsForbidden %+v", 403, o.Payload) +} + +func (o *PostCashReceiptsForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostCashReceiptsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCashReceiptsNotFound creates a PostCashReceiptsNotFound with default headers values +func NewPostCashReceiptsNotFound() *PostCashReceiptsNotFound { + return &PostCashReceiptsNotFound{} +} + +/*PostCashReceiptsNotFound handles this case with default header values. + +Resource was not found +*/ +type PostCashReceiptsNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostCashReceiptsNotFound) Error() string { + return fmt.Sprintf("[POST /cashreceipts][%d] postCashReceiptsNotFound %+v", 404, o.Payload) +} + +func (o *PostCashReceiptsNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostCashReceiptsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCashReceiptsUnprocessableEntity creates a PostCashReceiptsUnprocessableEntity with default headers values +func NewPostCashReceiptsUnprocessableEntity() *PostCashReceiptsUnprocessableEntity { + return &PostCashReceiptsUnprocessableEntity{} +} + +/*PostCashReceiptsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostCashReceiptsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostCashReceiptsUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /cashreceipts][%d] postCashReceiptsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostCashReceiptsUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostCashReceiptsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostCashReceiptsInternalServerError creates a PostCashReceiptsInternalServerError with default headers values +func NewPostCashReceiptsInternalServerError() *PostCashReceiptsInternalServerError { + return &PostCashReceiptsInternalServerError{} +} + +/*PostCashReceiptsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostCashReceiptsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostCashReceiptsInternalServerError) Error() string { + return fmt.Sprintf("[POST /cashreceipts][%d] postCashReceiptsInternalServerError %+v", 500, o.Payload) +} + +func (o *PostCashReceiptsInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostCashReceiptsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cash_receipt/put_cash_receipts_parameters.go b/api/ops/v0.0.1/ops_client/cash_receipt/put_cash_receipts_parameters.go new file mode 100644 index 0000000..f9530fa --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cash_receipt/put_cash_receipts_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cash_receipt + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// NewPutCashReceiptsParams creates a new PutCashReceiptsParams object +// with the default values initialized. +func NewPutCashReceiptsParams() *PutCashReceiptsParams { + var () + return &PutCashReceiptsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPutCashReceiptsParamsWithTimeout creates a new PutCashReceiptsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPutCashReceiptsParamsWithTimeout(timeout time.Duration) *PutCashReceiptsParams { + var () + return &PutCashReceiptsParams{ + + timeout: timeout, + } +} + +// NewPutCashReceiptsParamsWithContext creates a new PutCashReceiptsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPutCashReceiptsParamsWithContext(ctx context.Context) *PutCashReceiptsParams { + var () + return &PutCashReceiptsParams{ + + Context: ctx, + } +} + +// NewPutCashReceiptsParamsWithHTTPClient creates a new PutCashReceiptsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPutCashReceiptsParamsWithHTTPClient(client *http.Client) *PutCashReceiptsParams { + var () + return &PutCashReceiptsParams{ + HTTPClient: client, + } +} + +/*PutCashReceiptsParams contains all the parameters to send to the API endpoint +for the put cash receipts operation typically these are written to a http.Request +*/ +type PutCashReceiptsParams struct { + + /*CashReceiptRequest + A request with an array of Cash Receipot Objects + + */ + CashReceiptRequest *ops_models.CashReceiptRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the put cash receipts params +func (o *PutCashReceiptsParams) WithTimeout(timeout time.Duration) *PutCashReceiptsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the put cash receipts params +func (o *PutCashReceiptsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the put cash receipts params +func (o *PutCashReceiptsParams) WithContext(ctx context.Context) *PutCashReceiptsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the put cash receipts params +func (o *PutCashReceiptsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the put cash receipts params +func (o *PutCashReceiptsParams) WithHTTPClient(client *http.Client) *PutCashReceiptsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the put cash receipts params +func (o *PutCashReceiptsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCashReceiptRequest adds the cashReceiptRequest to the put cash receipts params +func (o *PutCashReceiptsParams) WithCashReceiptRequest(cashReceiptRequest *ops_models.CashReceiptRequest) *PutCashReceiptsParams { + o.SetCashReceiptRequest(cashReceiptRequest) + return o +} + +// SetCashReceiptRequest adds the cashReceiptRequest to the put cash receipts params +func (o *PutCashReceiptsParams) SetCashReceiptRequest(cashReceiptRequest *ops_models.CashReceiptRequest) { + o.CashReceiptRequest = cashReceiptRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PutCashReceiptsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CashReceiptRequest != nil { + if err := r.SetBodyParam(o.CashReceiptRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cash_receipt/put_cash_receipts_responses.go b/api/ops/v0.0.1/ops_client/cash_receipt/put_cash_receipts_responses.go new file mode 100644 index 0000000..079bfb7 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cash_receipt/put_cash_receipts_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cash_receipt + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// PutCashReceiptsReader is a Reader for the PutCashReceipts structure. +type PutCashReceiptsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PutCashReceiptsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPutCashReceiptsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPutCashReceiptsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPutCashReceiptsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPutCashReceiptsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPutCashReceiptsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPutCashReceiptsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPutCashReceiptsOK creates a PutCashReceiptsOK with default headers values +func NewPutCashReceiptsOK() *PutCashReceiptsOK { + return &PutCashReceiptsOK{} +} + +/*PutCashReceiptsOK handles this case with default header values. + +Taxnexus Response with Cash Receipt objects +*/ +type PutCashReceiptsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *ops_models.CashReceiptResponse +} + +func (o *PutCashReceiptsOK) Error() string { + return fmt.Sprintf("[PUT /cashreceipts][%d] putCashReceiptsOK %+v", 200, o.Payload) +} + +func (o *PutCashReceiptsOK) GetPayload() *ops_models.CashReceiptResponse { + return o.Payload +} + +func (o *PutCashReceiptsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(ops_models.CashReceiptResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutCashReceiptsUnauthorized creates a PutCashReceiptsUnauthorized with default headers values +func NewPutCashReceiptsUnauthorized() *PutCashReceiptsUnauthorized { + return &PutCashReceiptsUnauthorized{} +} + +/*PutCashReceiptsUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PutCashReceiptsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutCashReceiptsUnauthorized) Error() string { + return fmt.Sprintf("[PUT /cashreceipts][%d] putCashReceiptsUnauthorized %+v", 401, o.Payload) +} + +func (o *PutCashReceiptsUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutCashReceiptsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutCashReceiptsForbidden creates a PutCashReceiptsForbidden with default headers values +func NewPutCashReceiptsForbidden() *PutCashReceiptsForbidden { + return &PutCashReceiptsForbidden{} +} + +/*PutCashReceiptsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PutCashReceiptsForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutCashReceiptsForbidden) Error() string { + return fmt.Sprintf("[PUT /cashreceipts][%d] putCashReceiptsForbidden %+v", 403, o.Payload) +} + +func (o *PutCashReceiptsForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutCashReceiptsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutCashReceiptsNotFound creates a PutCashReceiptsNotFound with default headers values +func NewPutCashReceiptsNotFound() *PutCashReceiptsNotFound { + return &PutCashReceiptsNotFound{} +} + +/*PutCashReceiptsNotFound handles this case with default header values. + +Resource was not found +*/ +type PutCashReceiptsNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutCashReceiptsNotFound) Error() string { + return fmt.Sprintf("[PUT /cashreceipts][%d] putCashReceiptsNotFound %+v", 404, o.Payload) +} + +func (o *PutCashReceiptsNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutCashReceiptsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutCashReceiptsUnprocessableEntity creates a PutCashReceiptsUnprocessableEntity with default headers values +func NewPutCashReceiptsUnprocessableEntity() *PutCashReceiptsUnprocessableEntity { + return &PutCashReceiptsUnprocessableEntity{} +} + +/*PutCashReceiptsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PutCashReceiptsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutCashReceiptsUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /cashreceipts][%d] putCashReceiptsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutCashReceiptsUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutCashReceiptsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutCashReceiptsInternalServerError creates a PutCashReceiptsInternalServerError with default headers values +func NewPutCashReceiptsInternalServerError() *PutCashReceiptsInternalServerError { + return &PutCashReceiptsInternalServerError{} +} + +/*PutCashReceiptsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PutCashReceiptsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutCashReceiptsInternalServerError) Error() string { + return fmt.Sprintf("[PUT /cashreceipts][%d] putCashReceiptsInternalServerError %+v", 500, o.Payload) +} + +func (o *PutCashReceiptsInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutCashReceiptsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/charge/charge_client.go b/api/ops/v0.0.1/ops_client/charge/charge_client.go new file mode 100644 index 0000000..bbe5f3e --- /dev/null +++ b/api/ops/v0.0.1/ops_client/charge/charge_client.go @@ -0,0 +1,196 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package charge + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new charge API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for charge API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + DeleteCharge(params *DeleteChargeParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteChargeOK, error) + + GetCharges(params *GetChargesParams, authInfo runtime.ClientAuthInfoWriter) (*GetChargesOK, error) + + PostCharges(params *PostChargesParams, authInfo runtime.ClientAuthInfoWriter) (*PostChargesOK, error) + + PutCharges(params *PutChargesParams, authInfo runtime.ClientAuthInfoWriter) (*PutChargesOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + DeleteCharge deletes a charge + + Delete a Charge by ID +*/ +func (a *Client) DeleteCharge(params *DeleteChargeParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteChargeOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDeleteChargeParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "deleteCharge", + Method: "DELETE", + PathPattern: "/charges", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &DeleteChargeReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*DeleteChargeOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for deleteCharge: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetCharges gets a list of charges + + Return a list of available Taxnexus Charges +*/ +func (a *Client) GetCharges(params *GetChargesParams, authInfo runtime.ClientAuthInfoWriter) (*GetChargesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetChargesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getCharges", + Method: "GET", + PathPattern: "/charges", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetChargesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetChargesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getCharges: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostCharges creates new charges + + Create New Charges +*/ +func (a *Client) PostCharges(params *PostChargesParams, authInfo runtime.ClientAuthInfoWriter) (*PostChargesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostChargesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postCharges", + Method: "POST", + PathPattern: "/charges", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostChargesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostChargesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postCharges: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PutCharges puts a list of charges + + Put a list of Charges +*/ +func (a *Client) PutCharges(params *PutChargesParams, authInfo runtime.ClientAuthInfoWriter) (*PutChargesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPutChargesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "putCharges", + Method: "PUT", + PathPattern: "/charges", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PutChargesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PutChargesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for putCharges: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/ops/v0.0.1/ops_client/charge/delete_charge_parameters.go b/api/ops/v0.0.1/ops_client/charge/delete_charge_parameters.go new file mode 100644 index 0000000..122a252 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/charge/delete_charge_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package charge + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewDeleteChargeParams creates a new DeleteChargeParams object +// with the default values initialized. +func NewDeleteChargeParams() *DeleteChargeParams { + var () + return &DeleteChargeParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewDeleteChargeParamsWithTimeout creates a new DeleteChargeParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewDeleteChargeParamsWithTimeout(timeout time.Duration) *DeleteChargeParams { + var () + return &DeleteChargeParams{ + + timeout: timeout, + } +} + +// NewDeleteChargeParamsWithContext creates a new DeleteChargeParams object +// with the default values initialized, and the ability to set a context for a request +func NewDeleteChargeParamsWithContext(ctx context.Context) *DeleteChargeParams { + var () + return &DeleteChargeParams{ + + Context: ctx, + } +} + +// NewDeleteChargeParamsWithHTTPClient creates a new DeleteChargeParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewDeleteChargeParamsWithHTTPClient(client *http.Client) *DeleteChargeParams { + var () + return &DeleteChargeParams{ + HTTPClient: client, + } +} + +/*DeleteChargeParams contains all the parameters to send to the API endpoint +for the delete charge operation typically these are written to a http.Request +*/ +type DeleteChargeParams struct { + + /*ID + Taxnexus Id of the record to be retrieved + + */ + ID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the delete charge params +func (o *DeleteChargeParams) WithTimeout(timeout time.Duration) *DeleteChargeParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the delete charge params +func (o *DeleteChargeParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the delete charge params +func (o *DeleteChargeParams) WithContext(ctx context.Context) *DeleteChargeParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the delete charge params +func (o *DeleteChargeParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the delete charge params +func (o *DeleteChargeParams) WithHTTPClient(client *http.Client) *DeleteChargeParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the delete charge params +func (o *DeleteChargeParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the delete charge params +func (o *DeleteChargeParams) WithID(id *string) *DeleteChargeParams { + o.SetID(id) + return o +} + +// SetID adds the id to the delete charge params +func (o *DeleteChargeParams) SetID(id *string) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DeleteChargeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ID != nil { + + // query param id + var qrID string + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/charge/delete_charge_responses.go b/api/ops/v0.0.1/ops_client/charge/delete_charge_responses.go new file mode 100644 index 0000000..cba81af --- /dev/null +++ b/api/ops/v0.0.1/ops_client/charge/delete_charge_responses.go @@ -0,0 +1,298 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package charge + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// DeleteChargeReader is a Reader for the DeleteCharge structure. +type DeleteChargeReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DeleteChargeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDeleteChargeOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewDeleteChargeUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewDeleteChargeForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewDeleteChargeNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewDeleteChargeUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewDeleteChargeInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewDeleteChargeOK creates a DeleteChargeOK with default headers values +func NewDeleteChargeOK() *DeleteChargeOK { + return &DeleteChargeOK{} +} + +/*DeleteChargeOK handles this case with default header values. + +Taxnexus Response with Message Objects with Delete Status +*/ +type DeleteChargeOK struct { + AccessControlAllowOrigin string + + Payload *ops_models.DeleteResponse +} + +func (o *DeleteChargeOK) Error() string { + return fmt.Sprintf("[DELETE /charges][%d] deleteChargeOK %+v", 200, o.Payload) +} + +func (o *DeleteChargeOK) GetPayload() *ops_models.DeleteResponse { + return o.Payload +} + +func (o *DeleteChargeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.DeleteResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteChargeUnauthorized creates a DeleteChargeUnauthorized with default headers values +func NewDeleteChargeUnauthorized() *DeleteChargeUnauthorized { + return &DeleteChargeUnauthorized{} +} + +/*DeleteChargeUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type DeleteChargeUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeleteChargeUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /charges][%d] deleteChargeUnauthorized %+v", 401, o.Payload) +} + +func (o *DeleteChargeUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeleteChargeUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteChargeForbidden creates a DeleteChargeForbidden with default headers values +func NewDeleteChargeForbidden() *DeleteChargeForbidden { + return &DeleteChargeForbidden{} +} + +/*DeleteChargeForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type DeleteChargeForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeleteChargeForbidden) Error() string { + return fmt.Sprintf("[DELETE /charges][%d] deleteChargeForbidden %+v", 403, o.Payload) +} + +func (o *DeleteChargeForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeleteChargeForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteChargeNotFound creates a DeleteChargeNotFound with default headers values +func NewDeleteChargeNotFound() *DeleteChargeNotFound { + return &DeleteChargeNotFound{} +} + +/*DeleteChargeNotFound handles this case with default header values. + +Resource was not found +*/ +type DeleteChargeNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeleteChargeNotFound) Error() string { + return fmt.Sprintf("[DELETE /charges][%d] deleteChargeNotFound %+v", 404, o.Payload) +} + +func (o *DeleteChargeNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeleteChargeNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteChargeUnprocessableEntity creates a DeleteChargeUnprocessableEntity with default headers values +func NewDeleteChargeUnprocessableEntity() *DeleteChargeUnprocessableEntity { + return &DeleteChargeUnprocessableEntity{} +} + +/*DeleteChargeUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type DeleteChargeUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeleteChargeUnprocessableEntity) Error() string { + return fmt.Sprintf("[DELETE /charges][%d] deleteChargeUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *DeleteChargeUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeleteChargeUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteChargeInternalServerError creates a DeleteChargeInternalServerError with default headers values +func NewDeleteChargeInternalServerError() *DeleteChargeInternalServerError { + return &DeleteChargeInternalServerError{} +} + +/*DeleteChargeInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type DeleteChargeInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeleteChargeInternalServerError) Error() string { + return fmt.Sprintf("[DELETE /charges][%d] deleteChargeInternalServerError %+v", 500, o.Payload) +} + +func (o *DeleteChargeInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeleteChargeInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/charge/get_charges_parameters.go b/api/ops/v0.0.1/ops_client/charge/get_charges_parameters.go new file mode 100644 index 0000000..644437f --- /dev/null +++ b/api/ops/v0.0.1/ops_client/charge/get_charges_parameters.go @@ -0,0 +1,215 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package charge + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetChargesParams creates a new GetChargesParams object +// with the default values initialized. +func NewGetChargesParams() *GetChargesParams { + var () + return &GetChargesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetChargesParamsWithTimeout creates a new GetChargesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetChargesParamsWithTimeout(timeout time.Duration) *GetChargesParams { + var () + return &GetChargesParams{ + + timeout: timeout, + } +} + +// NewGetChargesParamsWithContext creates a new GetChargesParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetChargesParamsWithContext(ctx context.Context) *GetChargesParams { + var () + return &GetChargesParams{ + + Context: ctx, + } +} + +// NewGetChargesParamsWithHTTPClient creates a new GetChargesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetChargesParamsWithHTTPClient(client *http.Client) *GetChargesParams { + var () + return &GetChargesParams{ + HTTPClient: client, + } +} + +/*GetChargesParams contains all the parameters to send to the API endpoint +for the get charges operation typically these are written to a http.Request +*/ +type GetChargesParams struct { + + /*ChargeID + Taxnexus Record Id of a Charge + + */ + ChargeID *string + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get charges params +func (o *GetChargesParams) WithTimeout(timeout time.Duration) *GetChargesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get charges params +func (o *GetChargesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get charges params +func (o *GetChargesParams) WithContext(ctx context.Context) *GetChargesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get charges params +func (o *GetChargesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get charges params +func (o *GetChargesParams) WithHTTPClient(client *http.Client) *GetChargesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get charges params +func (o *GetChargesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithChargeID adds the chargeID to the get charges params +func (o *GetChargesParams) WithChargeID(chargeID *string) *GetChargesParams { + o.SetChargeID(chargeID) + return o +} + +// SetChargeID adds the chargeId to the get charges params +func (o *GetChargesParams) SetChargeID(chargeID *string) { + o.ChargeID = chargeID +} + +// WithLimit adds the limit to the get charges params +func (o *GetChargesParams) WithLimit(limit *int64) *GetChargesParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get charges params +func (o *GetChargesParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get charges params +func (o *GetChargesParams) WithOffset(offset *int64) *GetChargesParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get charges params +func (o *GetChargesParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *GetChargesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ChargeID != nil { + + // query param chargeId + var qrChargeID string + if o.ChargeID != nil { + qrChargeID = *o.ChargeID + } + qChargeID := qrChargeID + if qChargeID != "" { + if err := r.SetQueryParam("chargeId", qChargeID); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/charge/get_charges_responses.go b/api/ops/v0.0.1/ops_client/charge/get_charges_responses.go new file mode 100644 index 0000000..4621767 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/charge/get_charges_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package charge + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// GetChargesReader is a Reader for the GetCharges structure. +type GetChargesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetChargesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetChargesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetChargesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetChargesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetChargesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetChargesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetChargesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetChargesOK creates a GetChargesOK with default headers values +func NewGetChargesOK() *GetChargesOK { + return &GetChargesOK{} +} + +/*GetChargesOK handles this case with default header values. + +Taxnexus Response with Charge objects +*/ +type GetChargesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *ops_models.ChargeResponse +} + +func (o *GetChargesOK) Error() string { + return fmt.Sprintf("[GET /charges][%d] getChargesOK %+v", 200, o.Payload) +} + +func (o *GetChargesOK) GetPayload() *ops_models.ChargeResponse { + return o.Payload +} + +func (o *GetChargesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(ops_models.ChargeResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetChargesUnauthorized creates a GetChargesUnauthorized with default headers values +func NewGetChargesUnauthorized() *GetChargesUnauthorized { + return &GetChargesUnauthorized{} +} + +/*GetChargesUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetChargesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetChargesUnauthorized) Error() string { + return fmt.Sprintf("[GET /charges][%d] getChargesUnauthorized %+v", 401, o.Payload) +} + +func (o *GetChargesUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetChargesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetChargesForbidden creates a GetChargesForbidden with default headers values +func NewGetChargesForbidden() *GetChargesForbidden { + return &GetChargesForbidden{} +} + +/*GetChargesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetChargesForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetChargesForbidden) Error() string { + return fmt.Sprintf("[GET /charges][%d] getChargesForbidden %+v", 403, o.Payload) +} + +func (o *GetChargesForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetChargesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetChargesNotFound creates a GetChargesNotFound with default headers values +func NewGetChargesNotFound() *GetChargesNotFound { + return &GetChargesNotFound{} +} + +/*GetChargesNotFound handles this case with default header values. + +Resource was not found +*/ +type GetChargesNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetChargesNotFound) Error() string { + return fmt.Sprintf("[GET /charges][%d] getChargesNotFound %+v", 404, o.Payload) +} + +func (o *GetChargesNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetChargesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetChargesUnprocessableEntity creates a GetChargesUnprocessableEntity with default headers values +func NewGetChargesUnprocessableEntity() *GetChargesUnprocessableEntity { + return &GetChargesUnprocessableEntity{} +} + +/*GetChargesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetChargesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetChargesUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /charges][%d] getChargesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetChargesUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetChargesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetChargesInternalServerError creates a GetChargesInternalServerError with default headers values +func NewGetChargesInternalServerError() *GetChargesInternalServerError { + return &GetChargesInternalServerError{} +} + +/*GetChargesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetChargesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetChargesInternalServerError) Error() string { + return fmt.Sprintf("[GET /charges][%d] getChargesInternalServerError %+v", 500, o.Payload) +} + +func (o *GetChargesInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetChargesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/charge/post_charges_parameters.go b/api/ops/v0.0.1/ops_client/charge/post_charges_parameters.go new file mode 100644 index 0000000..e87411b --- /dev/null +++ b/api/ops/v0.0.1/ops_client/charge/post_charges_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package charge + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// NewPostChargesParams creates a new PostChargesParams object +// with the default values initialized. +func NewPostChargesParams() *PostChargesParams { + var () + return &PostChargesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostChargesParamsWithTimeout creates a new PostChargesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostChargesParamsWithTimeout(timeout time.Duration) *PostChargesParams { + var () + return &PostChargesParams{ + + timeout: timeout, + } +} + +// NewPostChargesParamsWithContext creates a new PostChargesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostChargesParamsWithContext(ctx context.Context) *PostChargesParams { + var () + return &PostChargesParams{ + + Context: ctx, + } +} + +// NewPostChargesParamsWithHTTPClient creates a new PostChargesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostChargesParamsWithHTTPClient(client *http.Client) *PostChargesParams { + var () + return &PostChargesParams{ + HTTPClient: client, + } +} + +/*PostChargesParams contains all the parameters to send to the API endpoint +for the post charges operation typically these are written to a http.Request +*/ +type PostChargesParams struct { + + /*ChargeRequest + A request with an array of Charge Objects + + */ + ChargeRequest *ops_models.ChargeRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post charges params +func (o *PostChargesParams) WithTimeout(timeout time.Duration) *PostChargesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post charges params +func (o *PostChargesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post charges params +func (o *PostChargesParams) WithContext(ctx context.Context) *PostChargesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post charges params +func (o *PostChargesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post charges params +func (o *PostChargesParams) WithHTTPClient(client *http.Client) *PostChargesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post charges params +func (o *PostChargesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithChargeRequest adds the chargeRequest to the post charges params +func (o *PostChargesParams) WithChargeRequest(chargeRequest *ops_models.ChargeRequest) *PostChargesParams { + o.SetChargeRequest(chargeRequest) + return o +} + +// SetChargeRequest adds the chargeRequest to the post charges params +func (o *PostChargesParams) SetChargeRequest(chargeRequest *ops_models.ChargeRequest) { + o.ChargeRequest = chargeRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostChargesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ChargeRequest != nil { + if err := r.SetBodyParam(o.ChargeRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/charge/post_charges_responses.go b/api/ops/v0.0.1/ops_client/charge/post_charges_responses.go new file mode 100644 index 0000000..d94cc67 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/charge/post_charges_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package charge + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// PostChargesReader is a Reader for the PostCharges structure. +type PostChargesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostChargesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostChargesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostChargesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostChargesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostChargesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostChargesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostChargesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostChargesOK creates a PostChargesOK with default headers values +func NewPostChargesOK() *PostChargesOK { + return &PostChargesOK{} +} + +/*PostChargesOK handles this case with default header values. + +Taxnexus Response with Charge objects +*/ +type PostChargesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *ops_models.ChargeResponse +} + +func (o *PostChargesOK) Error() string { + return fmt.Sprintf("[POST /charges][%d] postChargesOK %+v", 200, o.Payload) +} + +func (o *PostChargesOK) GetPayload() *ops_models.ChargeResponse { + return o.Payload +} + +func (o *PostChargesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(ops_models.ChargeResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostChargesUnauthorized creates a PostChargesUnauthorized with default headers values +func NewPostChargesUnauthorized() *PostChargesUnauthorized { + return &PostChargesUnauthorized{} +} + +/*PostChargesUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PostChargesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostChargesUnauthorized) Error() string { + return fmt.Sprintf("[POST /charges][%d] postChargesUnauthorized %+v", 401, o.Payload) +} + +func (o *PostChargesUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostChargesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostChargesForbidden creates a PostChargesForbidden with default headers values +func NewPostChargesForbidden() *PostChargesForbidden { + return &PostChargesForbidden{} +} + +/*PostChargesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostChargesForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostChargesForbidden) Error() string { + return fmt.Sprintf("[POST /charges][%d] postChargesForbidden %+v", 403, o.Payload) +} + +func (o *PostChargesForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostChargesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostChargesNotFound creates a PostChargesNotFound with default headers values +func NewPostChargesNotFound() *PostChargesNotFound { + return &PostChargesNotFound{} +} + +/*PostChargesNotFound handles this case with default header values. + +Resource was not found +*/ +type PostChargesNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostChargesNotFound) Error() string { + return fmt.Sprintf("[POST /charges][%d] postChargesNotFound %+v", 404, o.Payload) +} + +func (o *PostChargesNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostChargesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostChargesUnprocessableEntity creates a PostChargesUnprocessableEntity with default headers values +func NewPostChargesUnprocessableEntity() *PostChargesUnprocessableEntity { + return &PostChargesUnprocessableEntity{} +} + +/*PostChargesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostChargesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostChargesUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /charges][%d] postChargesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostChargesUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostChargesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostChargesInternalServerError creates a PostChargesInternalServerError with default headers values +func NewPostChargesInternalServerError() *PostChargesInternalServerError { + return &PostChargesInternalServerError{} +} + +/*PostChargesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostChargesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostChargesInternalServerError) Error() string { + return fmt.Sprintf("[POST /charges][%d] postChargesInternalServerError %+v", 500, o.Payload) +} + +func (o *PostChargesInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostChargesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/charge/put_charges_parameters.go b/api/ops/v0.0.1/ops_client/charge/put_charges_parameters.go new file mode 100644 index 0000000..63d0b2c --- /dev/null +++ b/api/ops/v0.0.1/ops_client/charge/put_charges_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package charge + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// NewPutChargesParams creates a new PutChargesParams object +// with the default values initialized. +func NewPutChargesParams() *PutChargesParams { + var () + return &PutChargesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPutChargesParamsWithTimeout creates a new PutChargesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPutChargesParamsWithTimeout(timeout time.Duration) *PutChargesParams { + var () + return &PutChargesParams{ + + timeout: timeout, + } +} + +// NewPutChargesParamsWithContext creates a new PutChargesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPutChargesParamsWithContext(ctx context.Context) *PutChargesParams { + var () + return &PutChargesParams{ + + Context: ctx, + } +} + +// NewPutChargesParamsWithHTTPClient creates a new PutChargesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPutChargesParamsWithHTTPClient(client *http.Client) *PutChargesParams { + var () + return &PutChargesParams{ + HTTPClient: client, + } +} + +/*PutChargesParams contains all the parameters to send to the API endpoint +for the put charges operation typically these are written to a http.Request +*/ +type PutChargesParams struct { + + /*ChargeRequest + A request with an array of Charge Objects + + */ + ChargeRequest *ops_models.ChargeRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the put charges params +func (o *PutChargesParams) WithTimeout(timeout time.Duration) *PutChargesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the put charges params +func (o *PutChargesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the put charges params +func (o *PutChargesParams) WithContext(ctx context.Context) *PutChargesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the put charges params +func (o *PutChargesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the put charges params +func (o *PutChargesParams) WithHTTPClient(client *http.Client) *PutChargesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the put charges params +func (o *PutChargesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithChargeRequest adds the chargeRequest to the put charges params +func (o *PutChargesParams) WithChargeRequest(chargeRequest *ops_models.ChargeRequest) *PutChargesParams { + o.SetChargeRequest(chargeRequest) + return o +} + +// SetChargeRequest adds the chargeRequest to the put charges params +func (o *PutChargesParams) SetChargeRequest(chargeRequest *ops_models.ChargeRequest) { + o.ChargeRequest = chargeRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PutChargesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ChargeRequest != nil { + if err := r.SetBodyParam(o.ChargeRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/charge/put_charges_responses.go b/api/ops/v0.0.1/ops_client/charge/put_charges_responses.go new file mode 100644 index 0000000..b42660b --- /dev/null +++ b/api/ops/v0.0.1/ops_client/charge/put_charges_responses.go @@ -0,0 +1,298 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package charge + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// PutChargesReader is a Reader for the PutCharges structure. +type PutChargesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PutChargesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPutChargesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPutChargesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPutChargesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPutChargesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPutChargesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPutChargesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPutChargesOK creates a PutChargesOK with default headers values +func NewPutChargesOK() *PutChargesOK { + return &PutChargesOK{} +} + +/*PutChargesOK handles this case with default header values. + +Taxnexus Response with an array of Message objects in response to a PUT +*/ +type PutChargesOK struct { + AccessControlAllowOrigin string + + Payload *ops_models.PutResponse +} + +func (o *PutChargesOK) Error() string { + return fmt.Sprintf("[PUT /charges][%d] putChargesOK %+v", 200, o.Payload) +} + +func (o *PutChargesOK) GetPayload() *ops_models.PutResponse { + return o.Payload +} + +func (o *PutChargesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.PutResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutChargesUnauthorized creates a PutChargesUnauthorized with default headers values +func NewPutChargesUnauthorized() *PutChargesUnauthorized { + return &PutChargesUnauthorized{} +} + +/*PutChargesUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PutChargesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutChargesUnauthorized) Error() string { + return fmt.Sprintf("[PUT /charges][%d] putChargesUnauthorized %+v", 401, o.Payload) +} + +func (o *PutChargesUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutChargesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutChargesForbidden creates a PutChargesForbidden with default headers values +func NewPutChargesForbidden() *PutChargesForbidden { + return &PutChargesForbidden{} +} + +/*PutChargesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PutChargesForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutChargesForbidden) Error() string { + return fmt.Sprintf("[PUT /charges][%d] putChargesForbidden %+v", 403, o.Payload) +} + +func (o *PutChargesForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutChargesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutChargesNotFound creates a PutChargesNotFound with default headers values +func NewPutChargesNotFound() *PutChargesNotFound { + return &PutChargesNotFound{} +} + +/*PutChargesNotFound handles this case with default header values. + +Resource was not found +*/ +type PutChargesNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutChargesNotFound) Error() string { + return fmt.Sprintf("[PUT /charges][%d] putChargesNotFound %+v", 404, o.Payload) +} + +func (o *PutChargesNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutChargesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutChargesUnprocessableEntity creates a PutChargesUnprocessableEntity with default headers values +func NewPutChargesUnprocessableEntity() *PutChargesUnprocessableEntity { + return &PutChargesUnprocessableEntity{} +} + +/*PutChargesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PutChargesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutChargesUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /charges][%d] putChargesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutChargesUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutChargesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutChargesInternalServerError creates a PutChargesInternalServerError with default headers values +func NewPutChargesInternalServerError() *PutChargesInternalServerError { + return &PutChargesInternalServerError{} +} + +/*PutChargesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PutChargesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutChargesInternalServerError) Error() string { + return fmt.Sprintf("[PUT /charges][%d] putChargesInternalServerError %+v", 500, o.Payload) +} + +func (o *PutChargesInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutChargesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cors/cash_receipt_options_parameters.go b/api/ops/v0.0.1/ops_client/cors/cash_receipt_options_parameters.go new file mode 100644 index 0000000..419f21b --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cors/cash_receipt_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewCashReceiptOptionsParams creates a new CashReceiptOptionsParams object +// with the default values initialized. +func NewCashReceiptOptionsParams() *CashReceiptOptionsParams { + + return &CashReceiptOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCashReceiptOptionsParamsWithTimeout creates a new CashReceiptOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCashReceiptOptionsParamsWithTimeout(timeout time.Duration) *CashReceiptOptionsParams { + + return &CashReceiptOptionsParams{ + + timeout: timeout, + } +} + +// NewCashReceiptOptionsParamsWithContext creates a new CashReceiptOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewCashReceiptOptionsParamsWithContext(ctx context.Context) *CashReceiptOptionsParams { + + return &CashReceiptOptionsParams{ + + Context: ctx, + } +} + +// NewCashReceiptOptionsParamsWithHTTPClient creates a new CashReceiptOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCashReceiptOptionsParamsWithHTTPClient(client *http.Client) *CashReceiptOptionsParams { + + return &CashReceiptOptionsParams{ + HTTPClient: client, + } +} + +/*CashReceiptOptionsParams contains all the parameters to send to the API endpoint +for the cash receipt options operation typically these are written to a http.Request +*/ +type CashReceiptOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cash receipt options params +func (o *CashReceiptOptionsParams) WithTimeout(timeout time.Duration) *CashReceiptOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cash receipt options params +func (o *CashReceiptOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cash receipt options params +func (o *CashReceiptOptionsParams) WithContext(ctx context.Context) *CashReceiptOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cash receipt options params +func (o *CashReceiptOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cash receipt options params +func (o *CashReceiptOptionsParams) WithHTTPClient(client *http.Client) *CashReceiptOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cash receipt options params +func (o *CashReceiptOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CashReceiptOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cors/cash_receipt_options_responses.go b/api/ops/v0.0.1/ops_client/cors/cash_receipt_options_responses.go new file mode 100644 index 0000000..394f84c --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cors/cash_receipt_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// CashReceiptOptionsReader is a Reader for the CashReceiptOptions structure. +type CashReceiptOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CashReceiptOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCashReceiptOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewCashReceiptOptionsOK creates a CashReceiptOptionsOK with default headers values +func NewCashReceiptOptionsOK() *CashReceiptOptionsOK { + return &CashReceiptOptionsOK{} +} + +/*CashReceiptOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type CashReceiptOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *CashReceiptOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /cashreceipts][%d] cashReceiptOptionsOK ", 200) +} + +func (o *CashReceiptOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cors/charge_options_parameters.go b/api/ops/v0.0.1/ops_client/cors/charge_options_parameters.go new file mode 100644 index 0000000..a5767e2 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cors/charge_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewChargeOptionsParams creates a new ChargeOptionsParams object +// with the default values initialized. +func NewChargeOptionsParams() *ChargeOptionsParams { + + return &ChargeOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewChargeOptionsParamsWithTimeout creates a new ChargeOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewChargeOptionsParamsWithTimeout(timeout time.Duration) *ChargeOptionsParams { + + return &ChargeOptionsParams{ + + timeout: timeout, + } +} + +// NewChargeOptionsParamsWithContext creates a new ChargeOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewChargeOptionsParamsWithContext(ctx context.Context) *ChargeOptionsParams { + + return &ChargeOptionsParams{ + + Context: ctx, + } +} + +// NewChargeOptionsParamsWithHTTPClient creates a new ChargeOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewChargeOptionsParamsWithHTTPClient(client *http.Client) *ChargeOptionsParams { + + return &ChargeOptionsParams{ + HTTPClient: client, + } +} + +/*ChargeOptionsParams contains all the parameters to send to the API endpoint +for the charge options operation typically these are written to a http.Request +*/ +type ChargeOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the charge options params +func (o *ChargeOptionsParams) WithTimeout(timeout time.Duration) *ChargeOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the charge options params +func (o *ChargeOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the charge options params +func (o *ChargeOptionsParams) WithContext(ctx context.Context) *ChargeOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the charge options params +func (o *ChargeOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the charge options params +func (o *ChargeOptionsParams) WithHTTPClient(client *http.Client) *ChargeOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the charge options params +func (o *ChargeOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ChargeOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cors/charge_options_responses.go b/api/ops/v0.0.1/ops_client/cors/charge_options_responses.go new file mode 100644 index 0000000..18adb89 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cors/charge_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// ChargeOptionsReader is a Reader for the ChargeOptions structure. +type ChargeOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ChargeOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewChargeOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewChargeOptionsOK creates a ChargeOptionsOK with default headers values +func NewChargeOptionsOK() *ChargeOptionsOK { + return &ChargeOptionsOK{} +} + +/*ChargeOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type ChargeOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *ChargeOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /charges][%d] chargeOptionsOK ", 200) +} + +func (o *ChargeOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cors/cors_client.go b/api/ops/v0.0.1/ops_client/cors/cors_client.go new file mode 100644 index 0000000..cbb9cd8 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cors/cors_client.go @@ -0,0 +1,544 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new cors API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for cors API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + CashReceiptOptions(params *CashReceiptOptionsParams) (*CashReceiptOptionsOK, error) + + ChargeOptions(params *ChargeOptionsParams) (*ChargeOptionsOK, error) + + EftOptions(params *EftOptionsParams) (*EftOptionsOK, error) + + InvoiceOptions(params *InvoiceOptionsParams) (*InvoiceOptionsOK, error) + + OrdersOptions(params *OrdersOptionsParams) (*OrdersOptionsOK, error) + + PaymentMethodOptions(params *PaymentMethodOptionsParams) (*PaymentMethodOptionsOK, error) + + PoOptions(params *PoOptionsParams) (*PoOptionsOK, error) + + ProductOptions(params *ProductOptionsParams) (*ProductOptionsOK, error) + + ProductOptionsObservable(params *ProductOptionsObservableParams) (*ProductOptionsObservableOK, error) + + QuoteOptions(params *QuoteOptionsParams) (*QuoteOptionsOK, error) + + TaxInvoiceOptions(params *TaxInvoiceOptionsParams) (*TaxInvoiceOptionsOK, error) + + TaxOrderOptions(params *TaxOrderOptionsParams) (*TaxOrderOptionsOK, error) + + TaxPoOptions(params *TaxPoOptionsParams) (*TaxPoOptionsOK, error) + + TaxQuoteOptions(params *TaxQuoteOptionsParams) (*TaxQuoteOptionsOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + CashReceiptOptions CORS support +*/ +func (a *Client) CashReceiptOptions(params *CashReceiptOptionsParams) (*CashReceiptOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCashReceiptOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "cashReceiptOptions", + Method: "OPTIONS", + PathPattern: "/cashreceipts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CashReceiptOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CashReceiptOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for cashReceiptOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + ChargeOptions CORS support +*/ +func (a *Client) ChargeOptions(params *ChargeOptionsParams) (*ChargeOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewChargeOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "chargeOptions", + Method: "OPTIONS", + PathPattern: "/charges", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ChargeOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ChargeOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for chargeOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + EftOptions CORS support +*/ +func (a *Client) EftOptions(params *EftOptionsParams) (*EftOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewEftOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "eftOptions", + Method: "OPTIONS", + PathPattern: "/efts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &EftOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*EftOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for eftOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + InvoiceOptions CORS support +*/ +func (a *Client) InvoiceOptions(params *InvoiceOptionsParams) (*InvoiceOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewInvoiceOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "invoiceOptions", + Method: "OPTIONS", + PathPattern: "/invoices", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &InvoiceOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*InvoiceOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for invoiceOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + OrdersOptions CORS support +*/ +func (a *Client) OrdersOptions(params *OrdersOptionsParams) (*OrdersOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewOrdersOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ordersOptions", + Method: "OPTIONS", + PathPattern: "/orders", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &OrdersOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*OrdersOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for ordersOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PaymentMethodOptions CORS support +*/ +func (a *Client) PaymentMethodOptions(params *PaymentMethodOptionsParams) (*PaymentMethodOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPaymentMethodOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "paymentMethodOptions", + Method: "OPTIONS", + PathPattern: "/paymentmethods", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PaymentMethodOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PaymentMethodOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for paymentMethodOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PoOptions CORS support +*/ +func (a *Client) PoOptions(params *PoOptionsParams) (*PoOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPoOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "poOptions", + Method: "OPTIONS", + PathPattern: "/pos", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PoOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PoOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for poOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + ProductOptions CORS support +*/ +func (a *Client) ProductOptions(params *ProductOptionsParams) (*ProductOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewProductOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "productOptions", + Method: "OPTIONS", + PathPattern: "/products", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ProductOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ProductOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for productOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + ProductOptionsObservable CORS support +*/ +func (a *Client) ProductOptionsObservable(params *ProductOptionsObservableParams) (*ProductOptionsObservableOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewProductOptionsObservableParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "productOptionsObservable", + Method: "OPTIONS", + PathPattern: "/products/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ProductOptionsObservableReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ProductOptionsObservableOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for productOptionsObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + QuoteOptions CORS support +*/ +func (a *Client) QuoteOptions(params *QuoteOptionsParams) (*QuoteOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewQuoteOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "quoteOptions", + Method: "OPTIONS", + PathPattern: "/quotes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &QuoteOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*QuoteOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for quoteOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TaxInvoiceOptions CORS support +*/ +func (a *Client) TaxInvoiceOptions(params *TaxInvoiceOptionsParams) (*TaxInvoiceOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTaxInvoiceOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "taxInvoiceOptions", + Method: "OPTIONS", + PathPattern: "/taxes/invoices", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &TaxInvoiceOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*TaxInvoiceOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for taxInvoiceOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TaxOrderOptions CORS support +*/ +func (a *Client) TaxOrderOptions(params *TaxOrderOptionsParams) (*TaxOrderOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTaxOrderOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "taxOrderOptions", + Method: "OPTIONS", + PathPattern: "/taxes/orders", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &TaxOrderOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*TaxOrderOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for taxOrderOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TaxPoOptions CORS support +*/ +func (a *Client) TaxPoOptions(params *TaxPoOptionsParams) (*TaxPoOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTaxPoOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "taxPoOptions", + Method: "OPTIONS", + PathPattern: "/taxes/pos", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &TaxPoOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*TaxPoOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for taxPoOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + TaxQuoteOptions CORS support +*/ +func (a *Client) TaxQuoteOptions(params *TaxQuoteOptionsParams) (*TaxQuoteOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewTaxQuoteOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "taxQuoteOptions", + Method: "OPTIONS", + PathPattern: "/taxes/quotes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &TaxQuoteOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*TaxQuoteOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for taxQuoteOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/ops/v0.0.1/ops_client/cors/eft_options_parameters.go b/api/ops/v0.0.1/ops_client/cors/eft_options_parameters.go new file mode 100644 index 0000000..126e00d --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cors/eft_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewEftOptionsParams creates a new EftOptionsParams object +// with the default values initialized. +func NewEftOptionsParams() *EftOptionsParams { + + return &EftOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewEftOptionsParamsWithTimeout creates a new EftOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewEftOptionsParamsWithTimeout(timeout time.Duration) *EftOptionsParams { + + return &EftOptionsParams{ + + timeout: timeout, + } +} + +// NewEftOptionsParamsWithContext creates a new EftOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewEftOptionsParamsWithContext(ctx context.Context) *EftOptionsParams { + + return &EftOptionsParams{ + + Context: ctx, + } +} + +// NewEftOptionsParamsWithHTTPClient creates a new EftOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewEftOptionsParamsWithHTTPClient(client *http.Client) *EftOptionsParams { + + return &EftOptionsParams{ + HTTPClient: client, + } +} + +/*EftOptionsParams contains all the parameters to send to the API endpoint +for the eft options operation typically these are written to a http.Request +*/ +type EftOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the eft options params +func (o *EftOptionsParams) WithTimeout(timeout time.Duration) *EftOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the eft options params +func (o *EftOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the eft options params +func (o *EftOptionsParams) WithContext(ctx context.Context) *EftOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the eft options params +func (o *EftOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the eft options params +func (o *EftOptionsParams) WithHTTPClient(client *http.Client) *EftOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the eft options params +func (o *EftOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *EftOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cors/eft_options_responses.go b/api/ops/v0.0.1/ops_client/cors/eft_options_responses.go new file mode 100644 index 0000000..2309f44 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cors/eft_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// EftOptionsReader is a Reader for the EftOptions structure. +type EftOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *EftOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewEftOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewEftOptionsOK creates a EftOptionsOK with default headers values +func NewEftOptionsOK() *EftOptionsOK { + return &EftOptionsOK{} +} + +/*EftOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type EftOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *EftOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /efts][%d] eftOptionsOK ", 200) +} + +func (o *EftOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cors/invoice_options_parameters.go b/api/ops/v0.0.1/ops_client/cors/invoice_options_parameters.go new file mode 100644 index 0000000..072dfad --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cors/invoice_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewInvoiceOptionsParams creates a new InvoiceOptionsParams object +// with the default values initialized. +func NewInvoiceOptionsParams() *InvoiceOptionsParams { + + return &InvoiceOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewInvoiceOptionsParamsWithTimeout creates a new InvoiceOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewInvoiceOptionsParamsWithTimeout(timeout time.Duration) *InvoiceOptionsParams { + + return &InvoiceOptionsParams{ + + timeout: timeout, + } +} + +// NewInvoiceOptionsParamsWithContext creates a new InvoiceOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewInvoiceOptionsParamsWithContext(ctx context.Context) *InvoiceOptionsParams { + + return &InvoiceOptionsParams{ + + Context: ctx, + } +} + +// NewInvoiceOptionsParamsWithHTTPClient creates a new InvoiceOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewInvoiceOptionsParamsWithHTTPClient(client *http.Client) *InvoiceOptionsParams { + + return &InvoiceOptionsParams{ + HTTPClient: client, + } +} + +/*InvoiceOptionsParams contains all the parameters to send to the API endpoint +for the invoice options operation typically these are written to a http.Request +*/ +type InvoiceOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the invoice options params +func (o *InvoiceOptionsParams) WithTimeout(timeout time.Duration) *InvoiceOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the invoice options params +func (o *InvoiceOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the invoice options params +func (o *InvoiceOptionsParams) WithContext(ctx context.Context) *InvoiceOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the invoice options params +func (o *InvoiceOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the invoice options params +func (o *InvoiceOptionsParams) WithHTTPClient(client *http.Client) *InvoiceOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the invoice options params +func (o *InvoiceOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *InvoiceOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cors/invoice_options_responses.go b/api/ops/v0.0.1/ops_client/cors/invoice_options_responses.go new file mode 100644 index 0000000..42563f1 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cors/invoice_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// InvoiceOptionsReader is a Reader for the InvoiceOptions structure. +type InvoiceOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *InvoiceOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewInvoiceOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewInvoiceOptionsOK creates a InvoiceOptionsOK with default headers values +func NewInvoiceOptionsOK() *InvoiceOptionsOK { + return &InvoiceOptionsOK{} +} + +/*InvoiceOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type InvoiceOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *InvoiceOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /invoices][%d] invoiceOptionsOK ", 200) +} + +func (o *InvoiceOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cors/orders_options_parameters.go b/api/ops/v0.0.1/ops_client/cors/orders_options_parameters.go new file mode 100644 index 0000000..108f99d --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cors/orders_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewOrdersOptionsParams creates a new OrdersOptionsParams object +// with the default values initialized. +func NewOrdersOptionsParams() *OrdersOptionsParams { + + return &OrdersOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewOrdersOptionsParamsWithTimeout creates a new OrdersOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewOrdersOptionsParamsWithTimeout(timeout time.Duration) *OrdersOptionsParams { + + return &OrdersOptionsParams{ + + timeout: timeout, + } +} + +// NewOrdersOptionsParamsWithContext creates a new OrdersOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewOrdersOptionsParamsWithContext(ctx context.Context) *OrdersOptionsParams { + + return &OrdersOptionsParams{ + + Context: ctx, + } +} + +// NewOrdersOptionsParamsWithHTTPClient creates a new OrdersOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewOrdersOptionsParamsWithHTTPClient(client *http.Client) *OrdersOptionsParams { + + return &OrdersOptionsParams{ + HTTPClient: client, + } +} + +/*OrdersOptionsParams contains all the parameters to send to the API endpoint +for the orders options operation typically these are written to a http.Request +*/ +type OrdersOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the orders options params +func (o *OrdersOptionsParams) WithTimeout(timeout time.Duration) *OrdersOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the orders options params +func (o *OrdersOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the orders options params +func (o *OrdersOptionsParams) WithContext(ctx context.Context) *OrdersOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the orders options params +func (o *OrdersOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the orders options params +func (o *OrdersOptionsParams) WithHTTPClient(client *http.Client) *OrdersOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the orders options params +func (o *OrdersOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *OrdersOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cors/orders_options_responses.go b/api/ops/v0.0.1/ops_client/cors/orders_options_responses.go new file mode 100644 index 0000000..5fdc694 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cors/orders_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// OrdersOptionsReader is a Reader for the OrdersOptions structure. +type OrdersOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *OrdersOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewOrdersOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewOrdersOptionsOK creates a OrdersOptionsOK with default headers values +func NewOrdersOptionsOK() *OrdersOptionsOK { + return &OrdersOptionsOK{} +} + +/*OrdersOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type OrdersOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *OrdersOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /orders][%d] ordersOptionsOK ", 200) +} + +func (o *OrdersOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cors/payment_method_options_parameters.go b/api/ops/v0.0.1/ops_client/cors/payment_method_options_parameters.go new file mode 100644 index 0000000..689460a --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cors/payment_method_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewPaymentMethodOptionsParams creates a new PaymentMethodOptionsParams object +// with the default values initialized. +func NewPaymentMethodOptionsParams() *PaymentMethodOptionsParams { + + return &PaymentMethodOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPaymentMethodOptionsParamsWithTimeout creates a new PaymentMethodOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPaymentMethodOptionsParamsWithTimeout(timeout time.Duration) *PaymentMethodOptionsParams { + + return &PaymentMethodOptionsParams{ + + timeout: timeout, + } +} + +// NewPaymentMethodOptionsParamsWithContext creates a new PaymentMethodOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPaymentMethodOptionsParamsWithContext(ctx context.Context) *PaymentMethodOptionsParams { + + return &PaymentMethodOptionsParams{ + + Context: ctx, + } +} + +// NewPaymentMethodOptionsParamsWithHTTPClient creates a new PaymentMethodOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPaymentMethodOptionsParamsWithHTTPClient(client *http.Client) *PaymentMethodOptionsParams { + + return &PaymentMethodOptionsParams{ + HTTPClient: client, + } +} + +/*PaymentMethodOptionsParams contains all the parameters to send to the API endpoint +for the payment method options operation typically these are written to a http.Request +*/ +type PaymentMethodOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the payment method options params +func (o *PaymentMethodOptionsParams) WithTimeout(timeout time.Duration) *PaymentMethodOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the payment method options params +func (o *PaymentMethodOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the payment method options params +func (o *PaymentMethodOptionsParams) WithContext(ctx context.Context) *PaymentMethodOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the payment method options params +func (o *PaymentMethodOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the payment method options params +func (o *PaymentMethodOptionsParams) WithHTTPClient(client *http.Client) *PaymentMethodOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the payment method options params +func (o *PaymentMethodOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *PaymentMethodOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cors/payment_method_options_responses.go b/api/ops/v0.0.1/ops_client/cors/payment_method_options_responses.go new file mode 100644 index 0000000..e9a6de5 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cors/payment_method_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// PaymentMethodOptionsReader is a Reader for the PaymentMethodOptions structure. +type PaymentMethodOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PaymentMethodOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPaymentMethodOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPaymentMethodOptionsOK creates a PaymentMethodOptionsOK with default headers values +func NewPaymentMethodOptionsOK() *PaymentMethodOptionsOK { + return &PaymentMethodOptionsOK{} +} + +/*PaymentMethodOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type PaymentMethodOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *PaymentMethodOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /paymentmethods][%d] paymentMethodOptionsOK ", 200) +} + +func (o *PaymentMethodOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cors/po_options_parameters.go b/api/ops/v0.0.1/ops_client/cors/po_options_parameters.go new file mode 100644 index 0000000..fe27155 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cors/po_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewPoOptionsParams creates a new PoOptionsParams object +// with the default values initialized. +func NewPoOptionsParams() *PoOptionsParams { + + return &PoOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPoOptionsParamsWithTimeout creates a new PoOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPoOptionsParamsWithTimeout(timeout time.Duration) *PoOptionsParams { + + return &PoOptionsParams{ + + timeout: timeout, + } +} + +// NewPoOptionsParamsWithContext creates a new PoOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPoOptionsParamsWithContext(ctx context.Context) *PoOptionsParams { + + return &PoOptionsParams{ + + Context: ctx, + } +} + +// NewPoOptionsParamsWithHTTPClient creates a new PoOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPoOptionsParamsWithHTTPClient(client *http.Client) *PoOptionsParams { + + return &PoOptionsParams{ + HTTPClient: client, + } +} + +/*PoOptionsParams contains all the parameters to send to the API endpoint +for the po options operation typically these are written to a http.Request +*/ +type PoOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the po options params +func (o *PoOptionsParams) WithTimeout(timeout time.Duration) *PoOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the po options params +func (o *PoOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the po options params +func (o *PoOptionsParams) WithContext(ctx context.Context) *PoOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the po options params +func (o *PoOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the po options params +func (o *PoOptionsParams) WithHTTPClient(client *http.Client) *PoOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the po options params +func (o *PoOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *PoOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cors/po_options_responses.go b/api/ops/v0.0.1/ops_client/cors/po_options_responses.go new file mode 100644 index 0000000..42d670d --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cors/po_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// PoOptionsReader is a Reader for the PoOptions structure. +type PoOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PoOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPoOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPoOptionsOK creates a PoOptionsOK with default headers values +func NewPoOptionsOK() *PoOptionsOK { + return &PoOptionsOK{} +} + +/*PoOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type PoOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *PoOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /pos][%d] poOptionsOK ", 200) +} + +func (o *PoOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cors/product_options_observable_parameters.go b/api/ops/v0.0.1/ops_client/cors/product_options_observable_parameters.go new file mode 100644 index 0000000..910ccd6 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cors/product_options_observable_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewProductOptionsObservableParams creates a new ProductOptionsObservableParams object +// with the default values initialized. +func NewProductOptionsObservableParams() *ProductOptionsObservableParams { + + return &ProductOptionsObservableParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewProductOptionsObservableParamsWithTimeout creates a new ProductOptionsObservableParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewProductOptionsObservableParamsWithTimeout(timeout time.Duration) *ProductOptionsObservableParams { + + return &ProductOptionsObservableParams{ + + timeout: timeout, + } +} + +// NewProductOptionsObservableParamsWithContext creates a new ProductOptionsObservableParams object +// with the default values initialized, and the ability to set a context for a request +func NewProductOptionsObservableParamsWithContext(ctx context.Context) *ProductOptionsObservableParams { + + return &ProductOptionsObservableParams{ + + Context: ctx, + } +} + +// NewProductOptionsObservableParamsWithHTTPClient creates a new ProductOptionsObservableParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewProductOptionsObservableParamsWithHTTPClient(client *http.Client) *ProductOptionsObservableParams { + + return &ProductOptionsObservableParams{ + HTTPClient: client, + } +} + +/*ProductOptionsObservableParams contains all the parameters to send to the API endpoint +for the product options observable operation typically these are written to a http.Request +*/ +type ProductOptionsObservableParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the product options observable params +func (o *ProductOptionsObservableParams) WithTimeout(timeout time.Duration) *ProductOptionsObservableParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the product options observable params +func (o *ProductOptionsObservableParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the product options observable params +func (o *ProductOptionsObservableParams) WithContext(ctx context.Context) *ProductOptionsObservableParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the product options observable params +func (o *ProductOptionsObservableParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the product options observable params +func (o *ProductOptionsObservableParams) WithHTTPClient(client *http.Client) *ProductOptionsObservableParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the product options observable params +func (o *ProductOptionsObservableParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ProductOptionsObservableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cors/product_options_observable_responses.go b/api/ops/v0.0.1/ops_client/cors/product_options_observable_responses.go new file mode 100644 index 0000000..5e03271 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cors/product_options_observable_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// ProductOptionsObservableReader is a Reader for the ProductOptionsObservable structure. +type ProductOptionsObservableReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ProductOptionsObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewProductOptionsObservableOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewProductOptionsObservableOK creates a ProductOptionsObservableOK with default headers values +func NewProductOptionsObservableOK() *ProductOptionsObservableOK { + return &ProductOptionsObservableOK{} +} + +/*ProductOptionsObservableOK handles this case with default header values. + +CORS OPTIONS response +*/ +type ProductOptionsObservableOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *ProductOptionsObservableOK) Error() string { + return fmt.Sprintf("[OPTIONS /products/observable][%d] productOptionsObservableOK ", 200) +} + +func (o *ProductOptionsObservableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cors/product_options_parameters.go b/api/ops/v0.0.1/ops_client/cors/product_options_parameters.go new file mode 100644 index 0000000..ca0bea5 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cors/product_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewProductOptionsParams creates a new ProductOptionsParams object +// with the default values initialized. +func NewProductOptionsParams() *ProductOptionsParams { + + return &ProductOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewProductOptionsParamsWithTimeout creates a new ProductOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewProductOptionsParamsWithTimeout(timeout time.Duration) *ProductOptionsParams { + + return &ProductOptionsParams{ + + timeout: timeout, + } +} + +// NewProductOptionsParamsWithContext creates a new ProductOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewProductOptionsParamsWithContext(ctx context.Context) *ProductOptionsParams { + + return &ProductOptionsParams{ + + Context: ctx, + } +} + +// NewProductOptionsParamsWithHTTPClient creates a new ProductOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewProductOptionsParamsWithHTTPClient(client *http.Client) *ProductOptionsParams { + + return &ProductOptionsParams{ + HTTPClient: client, + } +} + +/*ProductOptionsParams contains all the parameters to send to the API endpoint +for the product options operation typically these are written to a http.Request +*/ +type ProductOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the product options params +func (o *ProductOptionsParams) WithTimeout(timeout time.Duration) *ProductOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the product options params +func (o *ProductOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the product options params +func (o *ProductOptionsParams) WithContext(ctx context.Context) *ProductOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the product options params +func (o *ProductOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the product options params +func (o *ProductOptionsParams) WithHTTPClient(client *http.Client) *ProductOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the product options params +func (o *ProductOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ProductOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cors/product_options_responses.go b/api/ops/v0.0.1/ops_client/cors/product_options_responses.go new file mode 100644 index 0000000..aadcc31 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cors/product_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// ProductOptionsReader is a Reader for the ProductOptions structure. +type ProductOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ProductOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewProductOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewProductOptionsOK creates a ProductOptionsOK with default headers values +func NewProductOptionsOK() *ProductOptionsOK { + return &ProductOptionsOK{} +} + +/*ProductOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type ProductOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *ProductOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /products][%d] productOptionsOK ", 200) +} + +func (o *ProductOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cors/quote_options_parameters.go b/api/ops/v0.0.1/ops_client/cors/quote_options_parameters.go new file mode 100644 index 0000000..a062c8b --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cors/quote_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewQuoteOptionsParams creates a new QuoteOptionsParams object +// with the default values initialized. +func NewQuoteOptionsParams() *QuoteOptionsParams { + + return &QuoteOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewQuoteOptionsParamsWithTimeout creates a new QuoteOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewQuoteOptionsParamsWithTimeout(timeout time.Duration) *QuoteOptionsParams { + + return &QuoteOptionsParams{ + + timeout: timeout, + } +} + +// NewQuoteOptionsParamsWithContext creates a new QuoteOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewQuoteOptionsParamsWithContext(ctx context.Context) *QuoteOptionsParams { + + return &QuoteOptionsParams{ + + Context: ctx, + } +} + +// NewQuoteOptionsParamsWithHTTPClient creates a new QuoteOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewQuoteOptionsParamsWithHTTPClient(client *http.Client) *QuoteOptionsParams { + + return &QuoteOptionsParams{ + HTTPClient: client, + } +} + +/*QuoteOptionsParams contains all the parameters to send to the API endpoint +for the quote options operation typically these are written to a http.Request +*/ +type QuoteOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the quote options params +func (o *QuoteOptionsParams) WithTimeout(timeout time.Duration) *QuoteOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the quote options params +func (o *QuoteOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the quote options params +func (o *QuoteOptionsParams) WithContext(ctx context.Context) *QuoteOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the quote options params +func (o *QuoteOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the quote options params +func (o *QuoteOptionsParams) WithHTTPClient(client *http.Client) *QuoteOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the quote options params +func (o *QuoteOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *QuoteOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cors/quote_options_responses.go b/api/ops/v0.0.1/ops_client/cors/quote_options_responses.go new file mode 100644 index 0000000..0148ba0 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cors/quote_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// QuoteOptionsReader is a Reader for the QuoteOptions structure. +type QuoteOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *QuoteOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewQuoteOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewQuoteOptionsOK creates a QuoteOptionsOK with default headers values +func NewQuoteOptionsOK() *QuoteOptionsOK { + return &QuoteOptionsOK{} +} + +/*QuoteOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type QuoteOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *QuoteOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /quotes][%d] quoteOptionsOK ", 200) +} + +func (o *QuoteOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cors/tax_invoice_options_parameters.go b/api/ops/v0.0.1/ops_client/cors/tax_invoice_options_parameters.go new file mode 100644 index 0000000..06ecbcf --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cors/tax_invoice_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewTaxInvoiceOptionsParams creates a new TaxInvoiceOptionsParams object +// with the default values initialized. +func NewTaxInvoiceOptionsParams() *TaxInvoiceOptionsParams { + + return &TaxInvoiceOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewTaxInvoiceOptionsParamsWithTimeout creates a new TaxInvoiceOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewTaxInvoiceOptionsParamsWithTimeout(timeout time.Duration) *TaxInvoiceOptionsParams { + + return &TaxInvoiceOptionsParams{ + + timeout: timeout, + } +} + +// NewTaxInvoiceOptionsParamsWithContext creates a new TaxInvoiceOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewTaxInvoiceOptionsParamsWithContext(ctx context.Context) *TaxInvoiceOptionsParams { + + return &TaxInvoiceOptionsParams{ + + Context: ctx, + } +} + +// NewTaxInvoiceOptionsParamsWithHTTPClient creates a new TaxInvoiceOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewTaxInvoiceOptionsParamsWithHTTPClient(client *http.Client) *TaxInvoiceOptionsParams { + + return &TaxInvoiceOptionsParams{ + HTTPClient: client, + } +} + +/*TaxInvoiceOptionsParams contains all the parameters to send to the API endpoint +for the tax invoice options operation typically these are written to a http.Request +*/ +type TaxInvoiceOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the tax invoice options params +func (o *TaxInvoiceOptionsParams) WithTimeout(timeout time.Duration) *TaxInvoiceOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tax invoice options params +func (o *TaxInvoiceOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tax invoice options params +func (o *TaxInvoiceOptionsParams) WithContext(ctx context.Context) *TaxInvoiceOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tax invoice options params +func (o *TaxInvoiceOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tax invoice options params +func (o *TaxInvoiceOptionsParams) WithHTTPClient(client *http.Client) *TaxInvoiceOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tax invoice options params +func (o *TaxInvoiceOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *TaxInvoiceOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cors/tax_invoice_options_responses.go b/api/ops/v0.0.1/ops_client/cors/tax_invoice_options_responses.go new file mode 100644 index 0000000..a05b406 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cors/tax_invoice_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// TaxInvoiceOptionsReader is a Reader for the TaxInvoiceOptions structure. +type TaxInvoiceOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TaxInvoiceOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewTaxInvoiceOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewTaxInvoiceOptionsOK creates a TaxInvoiceOptionsOK with default headers values +func NewTaxInvoiceOptionsOK() *TaxInvoiceOptionsOK { + return &TaxInvoiceOptionsOK{} +} + +/*TaxInvoiceOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type TaxInvoiceOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *TaxInvoiceOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /taxes/invoices][%d] taxInvoiceOptionsOK ", 200) +} + +func (o *TaxInvoiceOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cors/tax_order_options_parameters.go b/api/ops/v0.0.1/ops_client/cors/tax_order_options_parameters.go new file mode 100644 index 0000000..64801c4 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cors/tax_order_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewTaxOrderOptionsParams creates a new TaxOrderOptionsParams object +// with the default values initialized. +func NewTaxOrderOptionsParams() *TaxOrderOptionsParams { + + return &TaxOrderOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewTaxOrderOptionsParamsWithTimeout creates a new TaxOrderOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewTaxOrderOptionsParamsWithTimeout(timeout time.Duration) *TaxOrderOptionsParams { + + return &TaxOrderOptionsParams{ + + timeout: timeout, + } +} + +// NewTaxOrderOptionsParamsWithContext creates a new TaxOrderOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewTaxOrderOptionsParamsWithContext(ctx context.Context) *TaxOrderOptionsParams { + + return &TaxOrderOptionsParams{ + + Context: ctx, + } +} + +// NewTaxOrderOptionsParamsWithHTTPClient creates a new TaxOrderOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewTaxOrderOptionsParamsWithHTTPClient(client *http.Client) *TaxOrderOptionsParams { + + return &TaxOrderOptionsParams{ + HTTPClient: client, + } +} + +/*TaxOrderOptionsParams contains all the parameters to send to the API endpoint +for the tax order options operation typically these are written to a http.Request +*/ +type TaxOrderOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the tax order options params +func (o *TaxOrderOptionsParams) WithTimeout(timeout time.Duration) *TaxOrderOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tax order options params +func (o *TaxOrderOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tax order options params +func (o *TaxOrderOptionsParams) WithContext(ctx context.Context) *TaxOrderOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tax order options params +func (o *TaxOrderOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tax order options params +func (o *TaxOrderOptionsParams) WithHTTPClient(client *http.Client) *TaxOrderOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tax order options params +func (o *TaxOrderOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *TaxOrderOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cors/tax_order_options_responses.go b/api/ops/v0.0.1/ops_client/cors/tax_order_options_responses.go new file mode 100644 index 0000000..474a326 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cors/tax_order_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// TaxOrderOptionsReader is a Reader for the TaxOrderOptions structure. +type TaxOrderOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TaxOrderOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewTaxOrderOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewTaxOrderOptionsOK creates a TaxOrderOptionsOK with default headers values +func NewTaxOrderOptionsOK() *TaxOrderOptionsOK { + return &TaxOrderOptionsOK{} +} + +/*TaxOrderOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type TaxOrderOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *TaxOrderOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /taxes/orders][%d] taxOrderOptionsOK ", 200) +} + +func (o *TaxOrderOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cors/tax_po_options_parameters.go b/api/ops/v0.0.1/ops_client/cors/tax_po_options_parameters.go new file mode 100644 index 0000000..b516d51 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cors/tax_po_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewTaxPoOptionsParams creates a new TaxPoOptionsParams object +// with the default values initialized. +func NewTaxPoOptionsParams() *TaxPoOptionsParams { + + return &TaxPoOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewTaxPoOptionsParamsWithTimeout creates a new TaxPoOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewTaxPoOptionsParamsWithTimeout(timeout time.Duration) *TaxPoOptionsParams { + + return &TaxPoOptionsParams{ + + timeout: timeout, + } +} + +// NewTaxPoOptionsParamsWithContext creates a new TaxPoOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewTaxPoOptionsParamsWithContext(ctx context.Context) *TaxPoOptionsParams { + + return &TaxPoOptionsParams{ + + Context: ctx, + } +} + +// NewTaxPoOptionsParamsWithHTTPClient creates a new TaxPoOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewTaxPoOptionsParamsWithHTTPClient(client *http.Client) *TaxPoOptionsParams { + + return &TaxPoOptionsParams{ + HTTPClient: client, + } +} + +/*TaxPoOptionsParams contains all the parameters to send to the API endpoint +for the tax po options operation typically these are written to a http.Request +*/ +type TaxPoOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the tax po options params +func (o *TaxPoOptionsParams) WithTimeout(timeout time.Duration) *TaxPoOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tax po options params +func (o *TaxPoOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tax po options params +func (o *TaxPoOptionsParams) WithContext(ctx context.Context) *TaxPoOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tax po options params +func (o *TaxPoOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tax po options params +func (o *TaxPoOptionsParams) WithHTTPClient(client *http.Client) *TaxPoOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tax po options params +func (o *TaxPoOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *TaxPoOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cors/tax_po_options_responses.go b/api/ops/v0.0.1/ops_client/cors/tax_po_options_responses.go new file mode 100644 index 0000000..7a1fbce --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cors/tax_po_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// TaxPoOptionsReader is a Reader for the TaxPoOptions structure. +type TaxPoOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TaxPoOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewTaxPoOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewTaxPoOptionsOK creates a TaxPoOptionsOK with default headers values +func NewTaxPoOptionsOK() *TaxPoOptionsOK { + return &TaxPoOptionsOK{} +} + +/*TaxPoOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type TaxPoOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *TaxPoOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /taxes/pos][%d] taxPoOptionsOK ", 200) +} + +func (o *TaxPoOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cors/tax_quote_options_parameters.go b/api/ops/v0.0.1/ops_client/cors/tax_quote_options_parameters.go new file mode 100644 index 0000000..d5457a0 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cors/tax_quote_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewTaxQuoteOptionsParams creates a new TaxQuoteOptionsParams object +// with the default values initialized. +func NewTaxQuoteOptionsParams() *TaxQuoteOptionsParams { + + return &TaxQuoteOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewTaxQuoteOptionsParamsWithTimeout creates a new TaxQuoteOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewTaxQuoteOptionsParamsWithTimeout(timeout time.Duration) *TaxQuoteOptionsParams { + + return &TaxQuoteOptionsParams{ + + timeout: timeout, + } +} + +// NewTaxQuoteOptionsParamsWithContext creates a new TaxQuoteOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewTaxQuoteOptionsParamsWithContext(ctx context.Context) *TaxQuoteOptionsParams { + + return &TaxQuoteOptionsParams{ + + Context: ctx, + } +} + +// NewTaxQuoteOptionsParamsWithHTTPClient creates a new TaxQuoteOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewTaxQuoteOptionsParamsWithHTTPClient(client *http.Client) *TaxQuoteOptionsParams { + + return &TaxQuoteOptionsParams{ + HTTPClient: client, + } +} + +/*TaxQuoteOptionsParams contains all the parameters to send to the API endpoint +for the tax quote options operation typically these are written to a http.Request +*/ +type TaxQuoteOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the tax quote options params +func (o *TaxQuoteOptionsParams) WithTimeout(timeout time.Duration) *TaxQuoteOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the tax quote options params +func (o *TaxQuoteOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the tax quote options params +func (o *TaxQuoteOptionsParams) WithContext(ctx context.Context) *TaxQuoteOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the tax quote options params +func (o *TaxQuoteOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the tax quote options params +func (o *TaxQuoteOptionsParams) WithHTTPClient(client *http.Client) *TaxQuoteOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the tax quote options params +func (o *TaxQuoteOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *TaxQuoteOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/cors/tax_quote_options_responses.go b/api/ops/v0.0.1/ops_client/cors/tax_quote_options_responses.go new file mode 100644 index 0000000..6b837fd --- /dev/null +++ b/api/ops/v0.0.1/ops_client/cors/tax_quote_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// TaxQuoteOptionsReader is a Reader for the TaxQuoteOptions structure. +type TaxQuoteOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *TaxQuoteOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewTaxQuoteOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewTaxQuoteOptionsOK creates a TaxQuoteOptionsOK with default headers values +func NewTaxQuoteOptionsOK() *TaxQuoteOptionsOK { + return &TaxQuoteOptionsOK{} +} + +/*TaxQuoteOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type TaxQuoteOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *TaxQuoteOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /taxes/quotes][%d] taxQuoteOptionsOK ", 200) +} + +func (o *TaxQuoteOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/eft/eft_client.go b/api/ops/v0.0.1/ops_client/eft/eft_client.go new file mode 100644 index 0000000..ca93d1b --- /dev/null +++ b/api/ops/v0.0.1/ops_client/eft/eft_client.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package eft + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new eft API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for eft API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetEfts(params *GetEftsParams, authInfo runtime.ClientAuthInfoWriter) (*GetEftsOK, error) + + PostEfts(params *PostEftsParams, authInfo runtime.ClientAuthInfoWriter) (*PostEftsOK, error) + + PutEfts(params *PutEftsParams, authInfo runtime.ClientAuthInfoWriter) (*PutEftsOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetEfts gets a list of efts + + Return a list of available Taxnexus Efts +*/ +func (a *Client) GetEfts(params *GetEftsParams, authInfo runtime.ClientAuthInfoWriter) (*GetEftsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetEftsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getEfts", + Method: "GET", + PathPattern: "/efts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetEftsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetEftsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getEfts: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostEfts creates new efts + + Create New Efts +*/ +func (a *Client) PostEfts(params *PostEftsParams, authInfo runtime.ClientAuthInfoWriter) (*PostEftsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostEftsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postEfts", + Method: "POST", + PathPattern: "/efts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostEftsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostEftsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postEfts: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PutEfts puts a list of efts + + Put a list of Efts +*/ +func (a *Client) PutEfts(params *PutEftsParams, authInfo runtime.ClientAuthInfoWriter) (*PutEftsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPutEftsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "putEfts", + Method: "PUT", + PathPattern: "/efts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PutEftsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PutEftsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for putEfts: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/ops/v0.0.1/ops_client/eft/get_efts_parameters.go b/api/ops/v0.0.1/ops_client/eft/get_efts_parameters.go new file mode 100644 index 0000000..0f2766e --- /dev/null +++ b/api/ops/v0.0.1/ops_client/eft/get_efts_parameters.go @@ -0,0 +1,215 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package eft + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetEftsParams creates a new GetEftsParams object +// with the default values initialized. +func NewGetEftsParams() *GetEftsParams { + var () + return &GetEftsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetEftsParamsWithTimeout creates a new GetEftsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetEftsParamsWithTimeout(timeout time.Duration) *GetEftsParams { + var () + return &GetEftsParams{ + + timeout: timeout, + } +} + +// NewGetEftsParamsWithContext creates a new GetEftsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetEftsParamsWithContext(ctx context.Context) *GetEftsParams { + var () + return &GetEftsParams{ + + Context: ctx, + } +} + +// NewGetEftsParamsWithHTTPClient creates a new GetEftsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetEftsParamsWithHTTPClient(client *http.Client) *GetEftsParams { + var () + return &GetEftsParams{ + HTTPClient: client, + } +} + +/*GetEftsParams contains all the parameters to send to the API endpoint +for the get efts operation typically these are written to a http.Request +*/ +type GetEftsParams struct { + + /*EftID + Taxnexus Record Id of a EFT + + */ + EftID *string + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get efts params +func (o *GetEftsParams) WithTimeout(timeout time.Duration) *GetEftsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get efts params +func (o *GetEftsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get efts params +func (o *GetEftsParams) WithContext(ctx context.Context) *GetEftsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get efts params +func (o *GetEftsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get efts params +func (o *GetEftsParams) WithHTTPClient(client *http.Client) *GetEftsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get efts params +func (o *GetEftsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithEftID adds the eftID to the get efts params +func (o *GetEftsParams) WithEftID(eftID *string) *GetEftsParams { + o.SetEftID(eftID) + return o +} + +// SetEftID adds the eftId to the get efts params +func (o *GetEftsParams) SetEftID(eftID *string) { + o.EftID = eftID +} + +// WithLimit adds the limit to the get efts params +func (o *GetEftsParams) WithLimit(limit *int64) *GetEftsParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get efts params +func (o *GetEftsParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get efts params +func (o *GetEftsParams) WithOffset(offset *int64) *GetEftsParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get efts params +func (o *GetEftsParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *GetEftsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.EftID != nil { + + // query param eftId + var qrEftID string + if o.EftID != nil { + qrEftID = *o.EftID + } + qEftID := qrEftID + if qEftID != "" { + if err := r.SetQueryParam("eftId", qEftID); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/eft/get_efts_responses.go b/api/ops/v0.0.1/ops_client/eft/get_efts_responses.go new file mode 100644 index 0000000..bab0406 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/eft/get_efts_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package eft + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// GetEftsReader is a Reader for the GetEfts structure. +type GetEftsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetEftsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetEftsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetEftsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetEftsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetEftsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetEftsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetEftsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetEftsOK creates a GetEftsOK with default headers values +func NewGetEftsOK() *GetEftsOK { + return &GetEftsOK{} +} + +/*GetEftsOK handles this case with default header values. + +Taxnexus Response with EFT objects +*/ +type GetEftsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *ops_models.EftResponse +} + +func (o *GetEftsOK) Error() string { + return fmt.Sprintf("[GET /efts][%d] getEftsOK %+v", 200, o.Payload) +} + +func (o *GetEftsOK) GetPayload() *ops_models.EftResponse { + return o.Payload +} + +func (o *GetEftsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(ops_models.EftResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetEftsUnauthorized creates a GetEftsUnauthorized with default headers values +func NewGetEftsUnauthorized() *GetEftsUnauthorized { + return &GetEftsUnauthorized{} +} + +/*GetEftsUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetEftsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetEftsUnauthorized) Error() string { + return fmt.Sprintf("[GET /efts][%d] getEftsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetEftsUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetEftsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetEftsForbidden creates a GetEftsForbidden with default headers values +func NewGetEftsForbidden() *GetEftsForbidden { + return &GetEftsForbidden{} +} + +/*GetEftsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetEftsForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetEftsForbidden) Error() string { + return fmt.Sprintf("[GET /efts][%d] getEftsForbidden %+v", 403, o.Payload) +} + +func (o *GetEftsForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetEftsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetEftsNotFound creates a GetEftsNotFound with default headers values +func NewGetEftsNotFound() *GetEftsNotFound { + return &GetEftsNotFound{} +} + +/*GetEftsNotFound handles this case with default header values. + +Resource was not found +*/ +type GetEftsNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetEftsNotFound) Error() string { + return fmt.Sprintf("[GET /efts][%d] getEftsNotFound %+v", 404, o.Payload) +} + +func (o *GetEftsNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetEftsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetEftsUnprocessableEntity creates a GetEftsUnprocessableEntity with default headers values +func NewGetEftsUnprocessableEntity() *GetEftsUnprocessableEntity { + return &GetEftsUnprocessableEntity{} +} + +/*GetEftsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetEftsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetEftsUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /efts][%d] getEftsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetEftsUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetEftsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetEftsInternalServerError creates a GetEftsInternalServerError with default headers values +func NewGetEftsInternalServerError() *GetEftsInternalServerError { + return &GetEftsInternalServerError{} +} + +/*GetEftsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetEftsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetEftsInternalServerError) Error() string { + return fmt.Sprintf("[GET /efts][%d] getEftsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetEftsInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetEftsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/eft/post_efts_parameters.go b/api/ops/v0.0.1/ops_client/eft/post_efts_parameters.go new file mode 100644 index 0000000..acd6f0b --- /dev/null +++ b/api/ops/v0.0.1/ops_client/eft/post_efts_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package eft + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// NewPostEftsParams creates a new PostEftsParams object +// with the default values initialized. +func NewPostEftsParams() *PostEftsParams { + var () + return &PostEftsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostEftsParamsWithTimeout creates a new PostEftsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostEftsParamsWithTimeout(timeout time.Duration) *PostEftsParams { + var () + return &PostEftsParams{ + + timeout: timeout, + } +} + +// NewPostEftsParamsWithContext creates a new PostEftsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostEftsParamsWithContext(ctx context.Context) *PostEftsParams { + var () + return &PostEftsParams{ + + Context: ctx, + } +} + +// NewPostEftsParamsWithHTTPClient creates a new PostEftsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostEftsParamsWithHTTPClient(client *http.Client) *PostEftsParams { + var () + return &PostEftsParams{ + HTTPClient: client, + } +} + +/*PostEftsParams contains all the parameters to send to the API endpoint +for the post efts operation typically these are written to a http.Request +*/ +type PostEftsParams struct { + + /*EftRequest + A request with an array of EFT Objects + + */ + EftRequest *ops_models.EftRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post efts params +func (o *PostEftsParams) WithTimeout(timeout time.Duration) *PostEftsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post efts params +func (o *PostEftsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post efts params +func (o *PostEftsParams) WithContext(ctx context.Context) *PostEftsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post efts params +func (o *PostEftsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post efts params +func (o *PostEftsParams) WithHTTPClient(client *http.Client) *PostEftsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post efts params +func (o *PostEftsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithEftRequest adds the eftRequest to the post efts params +func (o *PostEftsParams) WithEftRequest(eftRequest *ops_models.EftRequest) *PostEftsParams { + o.SetEftRequest(eftRequest) + return o +} + +// SetEftRequest adds the eftRequest to the post efts params +func (o *PostEftsParams) SetEftRequest(eftRequest *ops_models.EftRequest) { + o.EftRequest = eftRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostEftsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.EftRequest != nil { + if err := r.SetBodyParam(o.EftRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/eft/post_efts_responses.go b/api/ops/v0.0.1/ops_client/eft/post_efts_responses.go new file mode 100644 index 0000000..ddf3656 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/eft/post_efts_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package eft + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// PostEftsReader is a Reader for the PostEfts structure. +type PostEftsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostEftsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostEftsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostEftsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostEftsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostEftsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostEftsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostEftsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostEftsOK creates a PostEftsOK with default headers values +func NewPostEftsOK() *PostEftsOK { + return &PostEftsOK{} +} + +/*PostEftsOK handles this case with default header values. + +Taxnexus Response with EFT objects +*/ +type PostEftsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *ops_models.EftResponse +} + +func (o *PostEftsOK) Error() string { + return fmt.Sprintf("[POST /efts][%d] postEftsOK %+v", 200, o.Payload) +} + +func (o *PostEftsOK) GetPayload() *ops_models.EftResponse { + return o.Payload +} + +func (o *PostEftsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(ops_models.EftResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostEftsUnauthorized creates a PostEftsUnauthorized with default headers values +func NewPostEftsUnauthorized() *PostEftsUnauthorized { + return &PostEftsUnauthorized{} +} + +/*PostEftsUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PostEftsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostEftsUnauthorized) Error() string { + return fmt.Sprintf("[POST /efts][%d] postEftsUnauthorized %+v", 401, o.Payload) +} + +func (o *PostEftsUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostEftsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostEftsForbidden creates a PostEftsForbidden with default headers values +func NewPostEftsForbidden() *PostEftsForbidden { + return &PostEftsForbidden{} +} + +/*PostEftsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostEftsForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostEftsForbidden) Error() string { + return fmt.Sprintf("[POST /efts][%d] postEftsForbidden %+v", 403, o.Payload) +} + +func (o *PostEftsForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostEftsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostEftsNotFound creates a PostEftsNotFound with default headers values +func NewPostEftsNotFound() *PostEftsNotFound { + return &PostEftsNotFound{} +} + +/*PostEftsNotFound handles this case with default header values. + +Resource was not found +*/ +type PostEftsNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostEftsNotFound) Error() string { + return fmt.Sprintf("[POST /efts][%d] postEftsNotFound %+v", 404, o.Payload) +} + +func (o *PostEftsNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostEftsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostEftsUnprocessableEntity creates a PostEftsUnprocessableEntity with default headers values +func NewPostEftsUnprocessableEntity() *PostEftsUnprocessableEntity { + return &PostEftsUnprocessableEntity{} +} + +/*PostEftsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostEftsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostEftsUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /efts][%d] postEftsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostEftsUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostEftsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostEftsInternalServerError creates a PostEftsInternalServerError with default headers values +func NewPostEftsInternalServerError() *PostEftsInternalServerError { + return &PostEftsInternalServerError{} +} + +/*PostEftsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostEftsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostEftsInternalServerError) Error() string { + return fmt.Sprintf("[POST /efts][%d] postEftsInternalServerError %+v", 500, o.Payload) +} + +func (o *PostEftsInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostEftsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/eft/put_efts_parameters.go b/api/ops/v0.0.1/ops_client/eft/put_efts_parameters.go new file mode 100644 index 0000000..3406102 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/eft/put_efts_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package eft + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// NewPutEftsParams creates a new PutEftsParams object +// with the default values initialized. +func NewPutEftsParams() *PutEftsParams { + var () + return &PutEftsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPutEftsParamsWithTimeout creates a new PutEftsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPutEftsParamsWithTimeout(timeout time.Duration) *PutEftsParams { + var () + return &PutEftsParams{ + + timeout: timeout, + } +} + +// NewPutEftsParamsWithContext creates a new PutEftsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPutEftsParamsWithContext(ctx context.Context) *PutEftsParams { + var () + return &PutEftsParams{ + + Context: ctx, + } +} + +// NewPutEftsParamsWithHTTPClient creates a new PutEftsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPutEftsParamsWithHTTPClient(client *http.Client) *PutEftsParams { + var () + return &PutEftsParams{ + HTTPClient: client, + } +} + +/*PutEftsParams contains all the parameters to send to the API endpoint +for the put efts operation typically these are written to a http.Request +*/ +type PutEftsParams struct { + + /*EftRequest + A request with an array of EFT Objects + + */ + EftRequest *ops_models.EftRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the put efts params +func (o *PutEftsParams) WithTimeout(timeout time.Duration) *PutEftsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the put efts params +func (o *PutEftsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the put efts params +func (o *PutEftsParams) WithContext(ctx context.Context) *PutEftsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the put efts params +func (o *PutEftsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the put efts params +func (o *PutEftsParams) WithHTTPClient(client *http.Client) *PutEftsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the put efts params +func (o *PutEftsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithEftRequest adds the eftRequest to the put efts params +func (o *PutEftsParams) WithEftRequest(eftRequest *ops_models.EftRequest) *PutEftsParams { + o.SetEftRequest(eftRequest) + return o +} + +// SetEftRequest adds the eftRequest to the put efts params +func (o *PutEftsParams) SetEftRequest(eftRequest *ops_models.EftRequest) { + o.EftRequest = eftRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PutEftsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.EftRequest != nil { + if err := r.SetBodyParam(o.EftRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/eft/put_efts_responses.go b/api/ops/v0.0.1/ops_client/eft/put_efts_responses.go new file mode 100644 index 0000000..61ce751 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/eft/put_efts_responses.go @@ -0,0 +1,298 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package eft + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// PutEftsReader is a Reader for the PutEfts structure. +type PutEftsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PutEftsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPutEftsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPutEftsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPutEftsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPutEftsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPutEftsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPutEftsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPutEftsOK creates a PutEftsOK with default headers values +func NewPutEftsOK() *PutEftsOK { + return &PutEftsOK{} +} + +/*PutEftsOK handles this case with default header values. + +Taxnexus Response with an array of Message objects in response to a PUT +*/ +type PutEftsOK struct { + AccessControlAllowOrigin string + + Payload *ops_models.PutResponse +} + +func (o *PutEftsOK) Error() string { + return fmt.Sprintf("[PUT /efts][%d] putEftsOK %+v", 200, o.Payload) +} + +func (o *PutEftsOK) GetPayload() *ops_models.PutResponse { + return o.Payload +} + +func (o *PutEftsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.PutResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutEftsUnauthorized creates a PutEftsUnauthorized with default headers values +func NewPutEftsUnauthorized() *PutEftsUnauthorized { + return &PutEftsUnauthorized{} +} + +/*PutEftsUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PutEftsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutEftsUnauthorized) Error() string { + return fmt.Sprintf("[PUT /efts][%d] putEftsUnauthorized %+v", 401, o.Payload) +} + +func (o *PutEftsUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutEftsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutEftsForbidden creates a PutEftsForbidden with default headers values +func NewPutEftsForbidden() *PutEftsForbidden { + return &PutEftsForbidden{} +} + +/*PutEftsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PutEftsForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutEftsForbidden) Error() string { + return fmt.Sprintf("[PUT /efts][%d] putEftsForbidden %+v", 403, o.Payload) +} + +func (o *PutEftsForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutEftsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutEftsNotFound creates a PutEftsNotFound with default headers values +func NewPutEftsNotFound() *PutEftsNotFound { + return &PutEftsNotFound{} +} + +/*PutEftsNotFound handles this case with default header values. + +Resource was not found +*/ +type PutEftsNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutEftsNotFound) Error() string { + return fmt.Sprintf("[PUT /efts][%d] putEftsNotFound %+v", 404, o.Payload) +} + +func (o *PutEftsNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutEftsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutEftsUnprocessableEntity creates a PutEftsUnprocessableEntity with default headers values +func NewPutEftsUnprocessableEntity() *PutEftsUnprocessableEntity { + return &PutEftsUnprocessableEntity{} +} + +/*PutEftsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PutEftsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutEftsUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /efts][%d] putEftsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutEftsUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutEftsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutEftsInternalServerError creates a PutEftsInternalServerError with default headers values +func NewPutEftsInternalServerError() *PutEftsInternalServerError { + return &PutEftsInternalServerError{} +} + +/*PutEftsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PutEftsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutEftsInternalServerError) Error() string { + return fmt.Sprintf("[PUT /efts][%d] putEftsInternalServerError %+v", 500, o.Payload) +} + +func (o *PutEftsInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutEftsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/invoice/delete_invoice_parameters.go b/api/ops/v0.0.1/ops_client/invoice/delete_invoice_parameters.go new file mode 100644 index 0000000..01efbf4 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/invoice/delete_invoice_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package invoice + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewDeleteInvoiceParams creates a new DeleteInvoiceParams object +// with the default values initialized. +func NewDeleteInvoiceParams() *DeleteInvoiceParams { + var () + return &DeleteInvoiceParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewDeleteInvoiceParamsWithTimeout creates a new DeleteInvoiceParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewDeleteInvoiceParamsWithTimeout(timeout time.Duration) *DeleteInvoiceParams { + var () + return &DeleteInvoiceParams{ + + timeout: timeout, + } +} + +// NewDeleteInvoiceParamsWithContext creates a new DeleteInvoiceParams object +// with the default values initialized, and the ability to set a context for a request +func NewDeleteInvoiceParamsWithContext(ctx context.Context) *DeleteInvoiceParams { + var () + return &DeleteInvoiceParams{ + + Context: ctx, + } +} + +// NewDeleteInvoiceParamsWithHTTPClient creates a new DeleteInvoiceParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewDeleteInvoiceParamsWithHTTPClient(client *http.Client) *DeleteInvoiceParams { + var () + return &DeleteInvoiceParams{ + HTTPClient: client, + } +} + +/*DeleteInvoiceParams contains all the parameters to send to the API endpoint +for the delete invoice operation typically these are written to a http.Request +*/ +type DeleteInvoiceParams struct { + + /*ID + Taxnexus Id of the record to be retrieved + + */ + ID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the delete invoice params +func (o *DeleteInvoiceParams) WithTimeout(timeout time.Duration) *DeleteInvoiceParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the delete invoice params +func (o *DeleteInvoiceParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the delete invoice params +func (o *DeleteInvoiceParams) WithContext(ctx context.Context) *DeleteInvoiceParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the delete invoice params +func (o *DeleteInvoiceParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the delete invoice params +func (o *DeleteInvoiceParams) WithHTTPClient(client *http.Client) *DeleteInvoiceParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the delete invoice params +func (o *DeleteInvoiceParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the delete invoice params +func (o *DeleteInvoiceParams) WithID(id *string) *DeleteInvoiceParams { + o.SetID(id) + return o +} + +// SetID adds the id to the delete invoice params +func (o *DeleteInvoiceParams) SetID(id *string) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DeleteInvoiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ID != nil { + + // query param id + var qrID string + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/invoice/delete_invoice_responses.go b/api/ops/v0.0.1/ops_client/invoice/delete_invoice_responses.go new file mode 100644 index 0000000..0b9f29f --- /dev/null +++ b/api/ops/v0.0.1/ops_client/invoice/delete_invoice_responses.go @@ -0,0 +1,298 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package invoice + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// DeleteInvoiceReader is a Reader for the DeleteInvoice structure. +type DeleteInvoiceReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DeleteInvoiceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDeleteInvoiceOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewDeleteInvoiceUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewDeleteInvoiceForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewDeleteInvoiceNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewDeleteInvoiceUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewDeleteInvoiceInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewDeleteInvoiceOK creates a DeleteInvoiceOK with default headers values +func NewDeleteInvoiceOK() *DeleteInvoiceOK { + return &DeleteInvoiceOK{} +} + +/*DeleteInvoiceOK handles this case with default header values. + +Taxnexus Response with Message Objects with Delete Status +*/ +type DeleteInvoiceOK struct { + AccessControlAllowOrigin string + + Payload *ops_models.DeleteResponse +} + +func (o *DeleteInvoiceOK) Error() string { + return fmt.Sprintf("[DELETE /invoices][%d] deleteInvoiceOK %+v", 200, o.Payload) +} + +func (o *DeleteInvoiceOK) GetPayload() *ops_models.DeleteResponse { + return o.Payload +} + +func (o *DeleteInvoiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.DeleteResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteInvoiceUnauthorized creates a DeleteInvoiceUnauthorized with default headers values +func NewDeleteInvoiceUnauthorized() *DeleteInvoiceUnauthorized { + return &DeleteInvoiceUnauthorized{} +} + +/*DeleteInvoiceUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type DeleteInvoiceUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeleteInvoiceUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /invoices][%d] deleteInvoiceUnauthorized %+v", 401, o.Payload) +} + +func (o *DeleteInvoiceUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeleteInvoiceUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteInvoiceForbidden creates a DeleteInvoiceForbidden with default headers values +func NewDeleteInvoiceForbidden() *DeleteInvoiceForbidden { + return &DeleteInvoiceForbidden{} +} + +/*DeleteInvoiceForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type DeleteInvoiceForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeleteInvoiceForbidden) Error() string { + return fmt.Sprintf("[DELETE /invoices][%d] deleteInvoiceForbidden %+v", 403, o.Payload) +} + +func (o *DeleteInvoiceForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeleteInvoiceForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteInvoiceNotFound creates a DeleteInvoiceNotFound with default headers values +func NewDeleteInvoiceNotFound() *DeleteInvoiceNotFound { + return &DeleteInvoiceNotFound{} +} + +/*DeleteInvoiceNotFound handles this case with default header values. + +Resource was not found +*/ +type DeleteInvoiceNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeleteInvoiceNotFound) Error() string { + return fmt.Sprintf("[DELETE /invoices][%d] deleteInvoiceNotFound %+v", 404, o.Payload) +} + +func (o *DeleteInvoiceNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeleteInvoiceNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteInvoiceUnprocessableEntity creates a DeleteInvoiceUnprocessableEntity with default headers values +func NewDeleteInvoiceUnprocessableEntity() *DeleteInvoiceUnprocessableEntity { + return &DeleteInvoiceUnprocessableEntity{} +} + +/*DeleteInvoiceUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type DeleteInvoiceUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeleteInvoiceUnprocessableEntity) Error() string { + return fmt.Sprintf("[DELETE /invoices][%d] deleteInvoiceUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *DeleteInvoiceUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeleteInvoiceUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteInvoiceInternalServerError creates a DeleteInvoiceInternalServerError with default headers values +func NewDeleteInvoiceInternalServerError() *DeleteInvoiceInternalServerError { + return &DeleteInvoiceInternalServerError{} +} + +/*DeleteInvoiceInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type DeleteInvoiceInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeleteInvoiceInternalServerError) Error() string { + return fmt.Sprintf("[DELETE /invoices][%d] deleteInvoiceInternalServerError %+v", 500, o.Payload) +} + +func (o *DeleteInvoiceInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeleteInvoiceInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/invoice/get_invoices_parameters.go b/api/ops/v0.0.1/ops_client/invoice/get_invoices_parameters.go new file mode 100644 index 0000000..53d938c --- /dev/null +++ b/api/ops/v0.0.1/ops_client/invoice/get_invoices_parameters.go @@ -0,0 +1,215 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package invoice + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetInvoicesParams creates a new GetInvoicesParams object +// with the default values initialized. +func NewGetInvoicesParams() *GetInvoicesParams { + var () + return &GetInvoicesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetInvoicesParamsWithTimeout creates a new GetInvoicesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetInvoicesParamsWithTimeout(timeout time.Duration) *GetInvoicesParams { + var () + return &GetInvoicesParams{ + + timeout: timeout, + } +} + +// NewGetInvoicesParamsWithContext creates a new GetInvoicesParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetInvoicesParamsWithContext(ctx context.Context) *GetInvoicesParams { + var () + return &GetInvoicesParams{ + + Context: ctx, + } +} + +// NewGetInvoicesParamsWithHTTPClient creates a new GetInvoicesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetInvoicesParamsWithHTTPClient(client *http.Client) *GetInvoicesParams { + var () + return &GetInvoicesParams{ + HTTPClient: client, + } +} + +/*GetInvoicesParams contains all the parameters to send to the API endpoint +for the get invoices operation typically these are written to a http.Request +*/ +type GetInvoicesParams struct { + + /*InvoiceID + Taxnexus Record Id of an Invoice + + */ + InvoiceID *string + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get invoices params +func (o *GetInvoicesParams) WithTimeout(timeout time.Duration) *GetInvoicesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get invoices params +func (o *GetInvoicesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get invoices params +func (o *GetInvoicesParams) WithContext(ctx context.Context) *GetInvoicesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get invoices params +func (o *GetInvoicesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get invoices params +func (o *GetInvoicesParams) WithHTTPClient(client *http.Client) *GetInvoicesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get invoices params +func (o *GetInvoicesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithInvoiceID adds the invoiceID to the get invoices params +func (o *GetInvoicesParams) WithInvoiceID(invoiceID *string) *GetInvoicesParams { + o.SetInvoiceID(invoiceID) + return o +} + +// SetInvoiceID adds the invoiceId to the get invoices params +func (o *GetInvoicesParams) SetInvoiceID(invoiceID *string) { + o.InvoiceID = invoiceID +} + +// WithLimit adds the limit to the get invoices params +func (o *GetInvoicesParams) WithLimit(limit *int64) *GetInvoicesParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get invoices params +func (o *GetInvoicesParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get invoices params +func (o *GetInvoicesParams) WithOffset(offset *int64) *GetInvoicesParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get invoices params +func (o *GetInvoicesParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *GetInvoicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.InvoiceID != nil { + + // query param invoiceId + var qrInvoiceID string + if o.InvoiceID != nil { + qrInvoiceID = *o.InvoiceID + } + qInvoiceID := qrInvoiceID + if qInvoiceID != "" { + if err := r.SetQueryParam("invoiceId", qInvoiceID); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/invoice/get_invoices_responses.go b/api/ops/v0.0.1/ops_client/invoice/get_invoices_responses.go new file mode 100644 index 0000000..283528e --- /dev/null +++ b/api/ops/v0.0.1/ops_client/invoice/get_invoices_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package invoice + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// GetInvoicesReader is a Reader for the GetInvoices structure. +type GetInvoicesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetInvoicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetInvoicesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetInvoicesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetInvoicesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetInvoicesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetInvoicesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetInvoicesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetInvoicesOK creates a GetInvoicesOK with default headers values +func NewGetInvoicesOK() *GetInvoicesOK { + return &GetInvoicesOK{} +} + +/*GetInvoicesOK handles this case with default header values. + +Taxnexus Response with an array of Invoice (full) objects +*/ +type GetInvoicesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *ops_models.InvoiceResponse +} + +func (o *GetInvoicesOK) Error() string { + return fmt.Sprintf("[GET /invoices][%d] getInvoicesOK %+v", 200, o.Payload) +} + +func (o *GetInvoicesOK) GetPayload() *ops_models.InvoiceResponse { + return o.Payload +} + +func (o *GetInvoicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(ops_models.InvoiceResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetInvoicesUnauthorized creates a GetInvoicesUnauthorized with default headers values +func NewGetInvoicesUnauthorized() *GetInvoicesUnauthorized { + return &GetInvoicesUnauthorized{} +} + +/*GetInvoicesUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetInvoicesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetInvoicesUnauthorized) Error() string { + return fmt.Sprintf("[GET /invoices][%d] getInvoicesUnauthorized %+v", 401, o.Payload) +} + +func (o *GetInvoicesUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetInvoicesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetInvoicesForbidden creates a GetInvoicesForbidden with default headers values +func NewGetInvoicesForbidden() *GetInvoicesForbidden { + return &GetInvoicesForbidden{} +} + +/*GetInvoicesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetInvoicesForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetInvoicesForbidden) Error() string { + return fmt.Sprintf("[GET /invoices][%d] getInvoicesForbidden %+v", 403, o.Payload) +} + +func (o *GetInvoicesForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetInvoicesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetInvoicesNotFound creates a GetInvoicesNotFound with default headers values +func NewGetInvoicesNotFound() *GetInvoicesNotFound { + return &GetInvoicesNotFound{} +} + +/*GetInvoicesNotFound handles this case with default header values. + +Resource was not found +*/ +type GetInvoicesNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetInvoicesNotFound) Error() string { + return fmt.Sprintf("[GET /invoices][%d] getInvoicesNotFound %+v", 404, o.Payload) +} + +func (o *GetInvoicesNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetInvoicesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetInvoicesUnprocessableEntity creates a GetInvoicesUnprocessableEntity with default headers values +func NewGetInvoicesUnprocessableEntity() *GetInvoicesUnprocessableEntity { + return &GetInvoicesUnprocessableEntity{} +} + +/*GetInvoicesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetInvoicesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetInvoicesUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /invoices][%d] getInvoicesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetInvoicesUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetInvoicesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetInvoicesInternalServerError creates a GetInvoicesInternalServerError with default headers values +func NewGetInvoicesInternalServerError() *GetInvoicesInternalServerError { + return &GetInvoicesInternalServerError{} +} + +/*GetInvoicesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetInvoicesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetInvoicesInternalServerError) Error() string { + return fmt.Sprintf("[GET /invoices][%d] getInvoicesInternalServerError %+v", 500, o.Payload) +} + +func (o *GetInvoicesInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetInvoicesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/invoice/invoice_client.go b/api/ops/v0.0.1/ops_client/invoice/invoice_client.go new file mode 100644 index 0000000..d0a6d68 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/invoice/invoice_client.go @@ -0,0 +1,196 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package invoice + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new invoice API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for invoice API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + DeleteInvoice(params *DeleteInvoiceParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteInvoiceOK, error) + + GetInvoices(params *GetInvoicesParams, authInfo runtime.ClientAuthInfoWriter) (*GetInvoicesOK, error) + + PostInvoices(params *PostInvoicesParams, authInfo runtime.ClientAuthInfoWriter) (*PostInvoicesOK, error) + + PutInvoices(params *PutInvoicesParams, authInfo runtime.ClientAuthInfoWriter) (*PutInvoicesOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + DeleteInvoice deletes an invoice + + Delete an invoice by ID +*/ +func (a *Client) DeleteInvoice(params *DeleteInvoiceParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteInvoiceOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDeleteInvoiceParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "deleteInvoice", + Method: "DELETE", + PathPattern: "/invoices", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &DeleteInvoiceReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*DeleteInvoiceOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for deleteInvoice: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetInvoices gets a list of invoices + + Return a list of available Taxnexus Invoices +*/ +func (a *Client) GetInvoices(params *GetInvoicesParams, authInfo runtime.ClientAuthInfoWriter) (*GetInvoicesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetInvoicesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getInvoices", + Method: "GET", + PathPattern: "/invoices", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetInvoicesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetInvoicesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getInvoices: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostInvoices creates a new invoice + + Create New Invoices +*/ +func (a *Client) PostInvoices(params *PostInvoicesParams, authInfo runtime.ClientAuthInfoWriter) (*PostInvoicesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostInvoicesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postInvoices", + Method: "POST", + PathPattern: "/invoices", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostInvoicesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostInvoicesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postInvoices: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PutInvoices puts a list of invoices + + Put a list of Invoices +*/ +func (a *Client) PutInvoices(params *PutInvoicesParams, authInfo runtime.ClientAuthInfoWriter) (*PutInvoicesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPutInvoicesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "putInvoices", + Method: "PUT", + PathPattern: "/invoices", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PutInvoicesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PutInvoicesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for putInvoices: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/ops/v0.0.1/ops_client/invoice/post_invoices_parameters.go b/api/ops/v0.0.1/ops_client/invoice/post_invoices_parameters.go new file mode 100644 index 0000000..8ed1a2a --- /dev/null +++ b/api/ops/v0.0.1/ops_client/invoice/post_invoices_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package invoice + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// NewPostInvoicesParams creates a new PostInvoicesParams object +// with the default values initialized. +func NewPostInvoicesParams() *PostInvoicesParams { + var () + return &PostInvoicesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostInvoicesParamsWithTimeout creates a new PostInvoicesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostInvoicesParamsWithTimeout(timeout time.Duration) *PostInvoicesParams { + var () + return &PostInvoicesParams{ + + timeout: timeout, + } +} + +// NewPostInvoicesParamsWithContext creates a new PostInvoicesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostInvoicesParamsWithContext(ctx context.Context) *PostInvoicesParams { + var () + return &PostInvoicesParams{ + + Context: ctx, + } +} + +// NewPostInvoicesParamsWithHTTPClient creates a new PostInvoicesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostInvoicesParamsWithHTTPClient(client *http.Client) *PostInvoicesParams { + var () + return &PostInvoicesParams{ + HTTPClient: client, + } +} + +/*PostInvoicesParams contains all the parameters to send to the API endpoint +for the post invoices operation typically these are written to a http.Request +*/ +type PostInvoicesParams struct { + + /*InvoiceRequest + A request with an array of Invoice Objects + + */ + InvoiceRequest *ops_models.InvoiceRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post invoices params +func (o *PostInvoicesParams) WithTimeout(timeout time.Duration) *PostInvoicesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post invoices params +func (o *PostInvoicesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post invoices params +func (o *PostInvoicesParams) WithContext(ctx context.Context) *PostInvoicesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post invoices params +func (o *PostInvoicesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post invoices params +func (o *PostInvoicesParams) WithHTTPClient(client *http.Client) *PostInvoicesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post invoices params +func (o *PostInvoicesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithInvoiceRequest adds the invoiceRequest to the post invoices params +func (o *PostInvoicesParams) WithInvoiceRequest(invoiceRequest *ops_models.InvoiceRequest) *PostInvoicesParams { + o.SetInvoiceRequest(invoiceRequest) + return o +} + +// SetInvoiceRequest adds the invoiceRequest to the post invoices params +func (o *PostInvoicesParams) SetInvoiceRequest(invoiceRequest *ops_models.InvoiceRequest) { + o.InvoiceRequest = invoiceRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostInvoicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.InvoiceRequest != nil { + if err := r.SetBodyParam(o.InvoiceRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/invoice/post_invoices_responses.go b/api/ops/v0.0.1/ops_client/invoice/post_invoices_responses.go new file mode 100644 index 0000000..500b3d5 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/invoice/post_invoices_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package invoice + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// PostInvoicesReader is a Reader for the PostInvoices structure. +type PostInvoicesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostInvoicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostInvoicesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostInvoicesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostInvoicesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostInvoicesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostInvoicesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostInvoicesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostInvoicesOK creates a PostInvoicesOK with default headers values +func NewPostInvoicesOK() *PostInvoicesOK { + return &PostInvoicesOK{} +} + +/*PostInvoicesOK handles this case with default header values. + +Taxnexus Response with an array of Invoice (full) objects +*/ +type PostInvoicesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *ops_models.InvoiceResponse +} + +func (o *PostInvoicesOK) Error() string { + return fmt.Sprintf("[POST /invoices][%d] postInvoicesOK %+v", 200, o.Payload) +} + +func (o *PostInvoicesOK) GetPayload() *ops_models.InvoiceResponse { + return o.Payload +} + +func (o *PostInvoicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(ops_models.InvoiceResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostInvoicesUnauthorized creates a PostInvoicesUnauthorized with default headers values +func NewPostInvoicesUnauthorized() *PostInvoicesUnauthorized { + return &PostInvoicesUnauthorized{} +} + +/*PostInvoicesUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PostInvoicesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostInvoicesUnauthorized) Error() string { + return fmt.Sprintf("[POST /invoices][%d] postInvoicesUnauthorized %+v", 401, o.Payload) +} + +func (o *PostInvoicesUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostInvoicesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostInvoicesForbidden creates a PostInvoicesForbidden with default headers values +func NewPostInvoicesForbidden() *PostInvoicesForbidden { + return &PostInvoicesForbidden{} +} + +/*PostInvoicesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostInvoicesForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostInvoicesForbidden) Error() string { + return fmt.Sprintf("[POST /invoices][%d] postInvoicesForbidden %+v", 403, o.Payload) +} + +func (o *PostInvoicesForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostInvoicesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostInvoicesNotFound creates a PostInvoicesNotFound with default headers values +func NewPostInvoicesNotFound() *PostInvoicesNotFound { + return &PostInvoicesNotFound{} +} + +/*PostInvoicesNotFound handles this case with default header values. + +Resource was not found +*/ +type PostInvoicesNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostInvoicesNotFound) Error() string { + return fmt.Sprintf("[POST /invoices][%d] postInvoicesNotFound %+v", 404, o.Payload) +} + +func (o *PostInvoicesNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostInvoicesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostInvoicesUnprocessableEntity creates a PostInvoicesUnprocessableEntity with default headers values +func NewPostInvoicesUnprocessableEntity() *PostInvoicesUnprocessableEntity { + return &PostInvoicesUnprocessableEntity{} +} + +/*PostInvoicesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostInvoicesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostInvoicesUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /invoices][%d] postInvoicesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostInvoicesUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostInvoicesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostInvoicesInternalServerError creates a PostInvoicesInternalServerError with default headers values +func NewPostInvoicesInternalServerError() *PostInvoicesInternalServerError { + return &PostInvoicesInternalServerError{} +} + +/*PostInvoicesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostInvoicesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostInvoicesInternalServerError) Error() string { + return fmt.Sprintf("[POST /invoices][%d] postInvoicesInternalServerError %+v", 500, o.Payload) +} + +func (o *PostInvoicesInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostInvoicesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/invoice/put_invoices_parameters.go b/api/ops/v0.0.1/ops_client/invoice/put_invoices_parameters.go new file mode 100644 index 0000000..dd3969a --- /dev/null +++ b/api/ops/v0.0.1/ops_client/invoice/put_invoices_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package invoice + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// NewPutInvoicesParams creates a new PutInvoicesParams object +// with the default values initialized. +func NewPutInvoicesParams() *PutInvoicesParams { + var () + return &PutInvoicesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPutInvoicesParamsWithTimeout creates a new PutInvoicesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPutInvoicesParamsWithTimeout(timeout time.Duration) *PutInvoicesParams { + var () + return &PutInvoicesParams{ + + timeout: timeout, + } +} + +// NewPutInvoicesParamsWithContext creates a new PutInvoicesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPutInvoicesParamsWithContext(ctx context.Context) *PutInvoicesParams { + var () + return &PutInvoicesParams{ + + Context: ctx, + } +} + +// NewPutInvoicesParamsWithHTTPClient creates a new PutInvoicesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPutInvoicesParamsWithHTTPClient(client *http.Client) *PutInvoicesParams { + var () + return &PutInvoicesParams{ + HTTPClient: client, + } +} + +/*PutInvoicesParams contains all the parameters to send to the API endpoint +for the put invoices operation typically these are written to a http.Request +*/ +type PutInvoicesParams struct { + + /*InvoiceRequest + A request with an array of Invoice Objects + + */ + InvoiceRequest *ops_models.InvoiceRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the put invoices params +func (o *PutInvoicesParams) WithTimeout(timeout time.Duration) *PutInvoicesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the put invoices params +func (o *PutInvoicesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the put invoices params +func (o *PutInvoicesParams) WithContext(ctx context.Context) *PutInvoicesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the put invoices params +func (o *PutInvoicesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the put invoices params +func (o *PutInvoicesParams) WithHTTPClient(client *http.Client) *PutInvoicesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the put invoices params +func (o *PutInvoicesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithInvoiceRequest adds the invoiceRequest to the put invoices params +func (o *PutInvoicesParams) WithInvoiceRequest(invoiceRequest *ops_models.InvoiceRequest) *PutInvoicesParams { + o.SetInvoiceRequest(invoiceRequest) + return o +} + +// SetInvoiceRequest adds the invoiceRequest to the put invoices params +func (o *PutInvoicesParams) SetInvoiceRequest(invoiceRequest *ops_models.InvoiceRequest) { + o.InvoiceRequest = invoiceRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PutInvoicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.InvoiceRequest != nil { + if err := r.SetBodyParam(o.InvoiceRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/invoice/put_invoices_responses.go b/api/ops/v0.0.1/ops_client/invoice/put_invoices_responses.go new file mode 100644 index 0000000..96b410e --- /dev/null +++ b/api/ops/v0.0.1/ops_client/invoice/put_invoices_responses.go @@ -0,0 +1,298 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package invoice + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// PutInvoicesReader is a Reader for the PutInvoices structure. +type PutInvoicesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PutInvoicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPutInvoicesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPutInvoicesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPutInvoicesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPutInvoicesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPutInvoicesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPutInvoicesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPutInvoicesOK creates a PutInvoicesOK with default headers values +func NewPutInvoicesOK() *PutInvoicesOK { + return &PutInvoicesOK{} +} + +/*PutInvoicesOK handles this case with default header values. + +Taxnexus Response with an array of Message objects in response to a PUT +*/ +type PutInvoicesOK struct { + AccessControlAllowOrigin string + + Payload *ops_models.PutResponse +} + +func (o *PutInvoicesOK) Error() string { + return fmt.Sprintf("[PUT /invoices][%d] putInvoicesOK %+v", 200, o.Payload) +} + +func (o *PutInvoicesOK) GetPayload() *ops_models.PutResponse { + return o.Payload +} + +func (o *PutInvoicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.PutResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutInvoicesUnauthorized creates a PutInvoicesUnauthorized with default headers values +func NewPutInvoicesUnauthorized() *PutInvoicesUnauthorized { + return &PutInvoicesUnauthorized{} +} + +/*PutInvoicesUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PutInvoicesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutInvoicesUnauthorized) Error() string { + return fmt.Sprintf("[PUT /invoices][%d] putInvoicesUnauthorized %+v", 401, o.Payload) +} + +func (o *PutInvoicesUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutInvoicesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutInvoicesForbidden creates a PutInvoicesForbidden with default headers values +func NewPutInvoicesForbidden() *PutInvoicesForbidden { + return &PutInvoicesForbidden{} +} + +/*PutInvoicesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PutInvoicesForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutInvoicesForbidden) Error() string { + return fmt.Sprintf("[PUT /invoices][%d] putInvoicesForbidden %+v", 403, o.Payload) +} + +func (o *PutInvoicesForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutInvoicesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutInvoicesNotFound creates a PutInvoicesNotFound with default headers values +func NewPutInvoicesNotFound() *PutInvoicesNotFound { + return &PutInvoicesNotFound{} +} + +/*PutInvoicesNotFound handles this case with default header values. + +Resource was not found +*/ +type PutInvoicesNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutInvoicesNotFound) Error() string { + return fmt.Sprintf("[PUT /invoices][%d] putInvoicesNotFound %+v", 404, o.Payload) +} + +func (o *PutInvoicesNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutInvoicesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutInvoicesUnprocessableEntity creates a PutInvoicesUnprocessableEntity with default headers values +func NewPutInvoicesUnprocessableEntity() *PutInvoicesUnprocessableEntity { + return &PutInvoicesUnprocessableEntity{} +} + +/*PutInvoicesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PutInvoicesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutInvoicesUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /invoices][%d] putInvoicesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutInvoicesUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutInvoicesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutInvoicesInternalServerError creates a PutInvoicesInternalServerError with default headers values +func NewPutInvoicesInternalServerError() *PutInvoicesInternalServerError { + return &PutInvoicesInternalServerError{} +} + +/*PutInvoicesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PutInvoicesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutInvoicesInternalServerError) Error() string { + return fmt.Sprintf("[PUT /invoices][%d] putInvoicesInternalServerError %+v", 500, o.Payload) +} + +func (o *PutInvoicesInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutInvoicesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/ops_client.go b/api/ops/v0.0.1/ops_client/ops_client.go new file mode 100644 index 0000000..91e8529 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/ops_client.go @@ -0,0 +1,166 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_client + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_client/cash_receipt" + "github.com/taxnexus/lib/api/ops/ops_client/charge" + "github.com/taxnexus/lib/api/ops/ops_client/cors" + "github.com/taxnexus/lib/api/ops/ops_client/eft" + "github.com/taxnexus/lib/api/ops/ops_client/invoice" + "github.com/taxnexus/lib/api/ops/ops_client/order" + "github.com/taxnexus/lib/api/ops/ops_client/payment_method" + "github.com/taxnexus/lib/api/ops/ops_client/product" + "github.com/taxnexus/lib/api/ops/ops_client/purchase_order" + "github.com/taxnexus/lib/api/ops/ops_client/quote" + "github.com/taxnexus/lib/api/ops/ops_client/tax" +) + +// Default ops HTTP client. +var Default = NewHTTPClient(nil) + +const ( + // DefaultHost is the default Host + // found in Meta (info) section of spec file + DefaultHost string = "ops.fabric.tnxs.net:8080" + // DefaultBasePath is the default BasePath + // found in Meta (info) section of spec file + DefaultBasePath string = "/v1" +) + +// DefaultSchemes are the default schemes found in Meta (info) section of spec file +var DefaultSchemes = []string{"http"} + +// NewHTTPClient creates a new ops HTTP client. +func NewHTTPClient(formats strfmt.Registry) *Ops { + return NewHTTPClientWithConfig(formats, nil) +} + +// NewHTTPClientWithConfig creates a new ops HTTP client, +// using a customizable transport config. +func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *Ops { + // ensure nullable parameters have default + if cfg == nil { + cfg = DefaultTransportConfig() + } + + // create transport and client + transport := httptransport.New(cfg.Host, cfg.BasePath, cfg.Schemes) + return New(transport, formats) +} + +// New creates a new ops client +func New(transport runtime.ClientTransport, formats strfmt.Registry) *Ops { + // ensure nullable parameters have default + if formats == nil { + formats = strfmt.Default + } + + cli := new(Ops) + cli.Transport = transport + cli.CashReceipt = cash_receipt.New(transport, formats) + cli.Charge = charge.New(transport, formats) + cli.Cors = cors.New(transport, formats) + cli.Eft = eft.New(transport, formats) + cli.Invoice = invoice.New(transport, formats) + cli.Order = order.New(transport, formats) + cli.PaymentMethod = payment_method.New(transport, formats) + cli.Product = product.New(transport, formats) + cli.PurchaseOrder = purchase_order.New(transport, formats) + cli.Quote = quote.New(transport, formats) + cli.Tax = tax.New(transport, formats) + return cli +} + +// DefaultTransportConfig creates a TransportConfig with the +// default settings taken from the meta section of the spec file. +func DefaultTransportConfig() *TransportConfig { + return &TransportConfig{ + Host: DefaultHost, + BasePath: DefaultBasePath, + Schemes: DefaultSchemes, + } +} + +// TransportConfig contains the transport related info, +// found in the meta section of the spec file. +type TransportConfig struct { + Host string + BasePath string + Schemes []string +} + +// WithHost overrides the default host, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithHost(host string) *TransportConfig { + cfg.Host = host + return cfg +} + +// WithBasePath overrides the default basePath, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithBasePath(basePath string) *TransportConfig { + cfg.BasePath = basePath + return cfg +} + +// WithSchemes overrides the default schemes, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { + cfg.Schemes = schemes + return cfg +} + +// Ops is a client for ops +type Ops struct { + CashReceipt cash_receipt.ClientService + + Charge charge.ClientService + + Cors cors.ClientService + + Eft eft.ClientService + + Invoice invoice.ClientService + + Order order.ClientService + + PaymentMethod payment_method.ClientService + + Product product.ClientService + + PurchaseOrder purchase_order.ClientService + + Quote quote.ClientService + + Tax tax.ClientService + + Transport runtime.ClientTransport +} + +// SetTransport changes the transport on the client and all its subresources +func (c *Ops) SetTransport(transport runtime.ClientTransport) { + c.Transport = transport + c.CashReceipt.SetTransport(transport) + c.Charge.SetTransport(transport) + c.Cors.SetTransport(transport) + c.Eft.SetTransport(transport) + c.Invoice.SetTransport(transport) + c.Order.SetTransport(transport) + c.PaymentMethod.SetTransport(transport) + c.Product.SetTransport(transport) + c.PurchaseOrder.SetTransport(transport) + c.Quote.SetTransport(transport) + c.Tax.SetTransport(transport) +} diff --git a/api/ops/v0.0.1/ops_client/order/delete_order_parameters.go b/api/ops/v0.0.1/ops_client/order/delete_order_parameters.go new file mode 100644 index 0000000..6904997 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/order/delete_order_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package order + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewDeleteOrderParams creates a new DeleteOrderParams object +// with the default values initialized. +func NewDeleteOrderParams() *DeleteOrderParams { + var () + return &DeleteOrderParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewDeleteOrderParamsWithTimeout creates a new DeleteOrderParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewDeleteOrderParamsWithTimeout(timeout time.Duration) *DeleteOrderParams { + var () + return &DeleteOrderParams{ + + timeout: timeout, + } +} + +// NewDeleteOrderParamsWithContext creates a new DeleteOrderParams object +// with the default values initialized, and the ability to set a context for a request +func NewDeleteOrderParamsWithContext(ctx context.Context) *DeleteOrderParams { + var () + return &DeleteOrderParams{ + + Context: ctx, + } +} + +// NewDeleteOrderParamsWithHTTPClient creates a new DeleteOrderParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewDeleteOrderParamsWithHTTPClient(client *http.Client) *DeleteOrderParams { + var () + return &DeleteOrderParams{ + HTTPClient: client, + } +} + +/*DeleteOrderParams contains all the parameters to send to the API endpoint +for the delete order operation typically these are written to a http.Request +*/ +type DeleteOrderParams struct { + + /*ID + Taxnexus Id of the record to be retrieved + + */ + ID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the delete order params +func (o *DeleteOrderParams) WithTimeout(timeout time.Duration) *DeleteOrderParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the delete order params +func (o *DeleteOrderParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the delete order params +func (o *DeleteOrderParams) WithContext(ctx context.Context) *DeleteOrderParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the delete order params +func (o *DeleteOrderParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the delete order params +func (o *DeleteOrderParams) WithHTTPClient(client *http.Client) *DeleteOrderParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the delete order params +func (o *DeleteOrderParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the delete order params +func (o *DeleteOrderParams) WithID(id *string) *DeleteOrderParams { + o.SetID(id) + return o +} + +// SetID adds the id to the delete order params +func (o *DeleteOrderParams) SetID(id *string) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DeleteOrderParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ID != nil { + + // query param id + var qrID string + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/order/delete_order_responses.go b/api/ops/v0.0.1/ops_client/order/delete_order_responses.go new file mode 100644 index 0000000..6e5d25a --- /dev/null +++ b/api/ops/v0.0.1/ops_client/order/delete_order_responses.go @@ -0,0 +1,298 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package order + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// DeleteOrderReader is a Reader for the DeleteOrder structure. +type DeleteOrderReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DeleteOrderReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDeleteOrderOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewDeleteOrderUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewDeleteOrderForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewDeleteOrderNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewDeleteOrderUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewDeleteOrderInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewDeleteOrderOK creates a DeleteOrderOK with default headers values +func NewDeleteOrderOK() *DeleteOrderOK { + return &DeleteOrderOK{} +} + +/*DeleteOrderOK handles this case with default header values. + +Taxnexus Response with Message Objects with Delete Status +*/ +type DeleteOrderOK struct { + AccessControlAllowOrigin string + + Payload *ops_models.DeleteResponse +} + +func (o *DeleteOrderOK) Error() string { + return fmt.Sprintf("[DELETE /orders][%d] deleteOrderOK %+v", 200, o.Payload) +} + +func (o *DeleteOrderOK) GetPayload() *ops_models.DeleteResponse { + return o.Payload +} + +func (o *DeleteOrderOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.DeleteResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteOrderUnauthorized creates a DeleteOrderUnauthorized with default headers values +func NewDeleteOrderUnauthorized() *DeleteOrderUnauthorized { + return &DeleteOrderUnauthorized{} +} + +/*DeleteOrderUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type DeleteOrderUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeleteOrderUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /orders][%d] deleteOrderUnauthorized %+v", 401, o.Payload) +} + +func (o *DeleteOrderUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeleteOrderUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteOrderForbidden creates a DeleteOrderForbidden with default headers values +func NewDeleteOrderForbidden() *DeleteOrderForbidden { + return &DeleteOrderForbidden{} +} + +/*DeleteOrderForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type DeleteOrderForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeleteOrderForbidden) Error() string { + return fmt.Sprintf("[DELETE /orders][%d] deleteOrderForbidden %+v", 403, o.Payload) +} + +func (o *DeleteOrderForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeleteOrderForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteOrderNotFound creates a DeleteOrderNotFound with default headers values +func NewDeleteOrderNotFound() *DeleteOrderNotFound { + return &DeleteOrderNotFound{} +} + +/*DeleteOrderNotFound handles this case with default header values. + +Resource was not found +*/ +type DeleteOrderNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeleteOrderNotFound) Error() string { + return fmt.Sprintf("[DELETE /orders][%d] deleteOrderNotFound %+v", 404, o.Payload) +} + +func (o *DeleteOrderNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeleteOrderNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteOrderUnprocessableEntity creates a DeleteOrderUnprocessableEntity with default headers values +func NewDeleteOrderUnprocessableEntity() *DeleteOrderUnprocessableEntity { + return &DeleteOrderUnprocessableEntity{} +} + +/*DeleteOrderUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type DeleteOrderUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeleteOrderUnprocessableEntity) Error() string { + return fmt.Sprintf("[DELETE /orders][%d] deleteOrderUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *DeleteOrderUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeleteOrderUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteOrderInternalServerError creates a DeleteOrderInternalServerError with default headers values +func NewDeleteOrderInternalServerError() *DeleteOrderInternalServerError { + return &DeleteOrderInternalServerError{} +} + +/*DeleteOrderInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type DeleteOrderInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeleteOrderInternalServerError) Error() string { + return fmt.Sprintf("[DELETE /orders][%d] deleteOrderInternalServerError %+v", 500, o.Payload) +} + +func (o *DeleteOrderInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeleteOrderInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/order/get_orders_parameters.go b/api/ops/v0.0.1/ops_client/order/get_orders_parameters.go new file mode 100644 index 0000000..4a12915 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/order/get_orders_parameters.go @@ -0,0 +1,215 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package order + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetOrdersParams creates a new GetOrdersParams object +// with the default values initialized. +func NewGetOrdersParams() *GetOrdersParams { + var () + return &GetOrdersParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetOrdersParamsWithTimeout creates a new GetOrdersParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetOrdersParamsWithTimeout(timeout time.Duration) *GetOrdersParams { + var () + return &GetOrdersParams{ + + timeout: timeout, + } +} + +// NewGetOrdersParamsWithContext creates a new GetOrdersParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetOrdersParamsWithContext(ctx context.Context) *GetOrdersParams { + var () + return &GetOrdersParams{ + + Context: ctx, + } +} + +// NewGetOrdersParamsWithHTTPClient creates a new GetOrdersParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetOrdersParamsWithHTTPClient(client *http.Client) *GetOrdersParams { + var () + return &GetOrdersParams{ + HTTPClient: client, + } +} + +/*GetOrdersParams contains all the parameters to send to the API endpoint +for the get orders operation typically these are written to a http.Request +*/ +type GetOrdersParams struct { + + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + /*OrderID + Taxnexus Record Id of an Order + + */ + OrderID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get orders params +func (o *GetOrdersParams) WithTimeout(timeout time.Duration) *GetOrdersParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get orders params +func (o *GetOrdersParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get orders params +func (o *GetOrdersParams) WithContext(ctx context.Context) *GetOrdersParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get orders params +func (o *GetOrdersParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get orders params +func (o *GetOrdersParams) WithHTTPClient(client *http.Client) *GetOrdersParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get orders params +func (o *GetOrdersParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithLimit adds the limit to the get orders params +func (o *GetOrdersParams) WithLimit(limit *int64) *GetOrdersParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get orders params +func (o *GetOrdersParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get orders params +func (o *GetOrdersParams) WithOffset(offset *int64) *GetOrdersParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get orders params +func (o *GetOrdersParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderID adds the orderID to the get orders params +func (o *GetOrdersParams) WithOrderID(orderID *string) *GetOrdersParams { + o.SetOrderID(orderID) + return o +} + +// SetOrderID adds the orderId to the get orders params +func (o *GetOrdersParams) SetOrderID(orderID *string) { + o.OrderID = orderID +} + +// WriteToRequest writes these params to a swagger request +func (o *GetOrdersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderID != nil { + + // query param orderId + var qrOrderID string + if o.OrderID != nil { + qrOrderID = *o.OrderID + } + qOrderID := qrOrderID + if qOrderID != "" { + if err := r.SetQueryParam("orderId", qOrderID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/order/get_orders_responses.go b/api/ops/v0.0.1/ops_client/order/get_orders_responses.go new file mode 100644 index 0000000..8c82703 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/order/get_orders_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package order + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// GetOrdersReader is a Reader for the GetOrders structure. +type GetOrdersReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetOrdersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetOrdersOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetOrdersUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetOrdersForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetOrdersNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetOrdersUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetOrdersInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetOrdersOK creates a GetOrdersOK with default headers values +func NewGetOrdersOK() *GetOrdersOK { + return &GetOrdersOK{} +} + +/*GetOrdersOK handles this case with default header values. + +Taxnexus Response with an array of Order objects +*/ +type GetOrdersOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *ops_models.OrderResponse +} + +func (o *GetOrdersOK) Error() string { + return fmt.Sprintf("[GET /orders][%d] getOrdersOK %+v", 200, o.Payload) +} + +func (o *GetOrdersOK) GetPayload() *ops_models.OrderResponse { + return o.Payload +} + +func (o *GetOrdersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(ops_models.OrderResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetOrdersUnauthorized creates a GetOrdersUnauthorized with default headers values +func NewGetOrdersUnauthorized() *GetOrdersUnauthorized { + return &GetOrdersUnauthorized{} +} + +/*GetOrdersUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetOrdersUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetOrdersUnauthorized) Error() string { + return fmt.Sprintf("[GET /orders][%d] getOrdersUnauthorized %+v", 401, o.Payload) +} + +func (o *GetOrdersUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetOrdersUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetOrdersForbidden creates a GetOrdersForbidden with default headers values +func NewGetOrdersForbidden() *GetOrdersForbidden { + return &GetOrdersForbidden{} +} + +/*GetOrdersForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetOrdersForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetOrdersForbidden) Error() string { + return fmt.Sprintf("[GET /orders][%d] getOrdersForbidden %+v", 403, o.Payload) +} + +func (o *GetOrdersForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetOrdersForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetOrdersNotFound creates a GetOrdersNotFound with default headers values +func NewGetOrdersNotFound() *GetOrdersNotFound { + return &GetOrdersNotFound{} +} + +/*GetOrdersNotFound handles this case with default header values. + +Resource was not found +*/ +type GetOrdersNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetOrdersNotFound) Error() string { + return fmt.Sprintf("[GET /orders][%d] getOrdersNotFound %+v", 404, o.Payload) +} + +func (o *GetOrdersNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetOrdersNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetOrdersUnprocessableEntity creates a GetOrdersUnprocessableEntity with default headers values +func NewGetOrdersUnprocessableEntity() *GetOrdersUnprocessableEntity { + return &GetOrdersUnprocessableEntity{} +} + +/*GetOrdersUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetOrdersUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetOrdersUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /orders][%d] getOrdersUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetOrdersUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetOrdersUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetOrdersInternalServerError creates a GetOrdersInternalServerError with default headers values +func NewGetOrdersInternalServerError() *GetOrdersInternalServerError { + return &GetOrdersInternalServerError{} +} + +/*GetOrdersInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetOrdersInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetOrdersInternalServerError) Error() string { + return fmt.Sprintf("[GET /orders][%d] getOrdersInternalServerError %+v", 500, o.Payload) +} + +func (o *GetOrdersInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetOrdersInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/order/order_client.go b/api/ops/v0.0.1/ops_client/order/order_client.go new file mode 100644 index 0000000..866b463 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/order/order_client.go @@ -0,0 +1,196 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package order + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new order API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for order API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + DeleteOrder(params *DeleteOrderParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteOrderOK, error) + + GetOrders(params *GetOrdersParams, authInfo runtime.ClientAuthInfoWriter) (*GetOrdersOK, error) + + PostOrders(params *PostOrdersParams, authInfo runtime.ClientAuthInfoWriter) (*PostOrdersOK, error) + + PutOrders(params *PutOrdersParams, authInfo runtime.ClientAuthInfoWriter) (*PutOrdersOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + DeleteOrder deletes an order + + Delete an order by ID +*/ +func (a *Client) DeleteOrder(params *DeleteOrderParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteOrderOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDeleteOrderParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "deleteOrder", + Method: "DELETE", + PathPattern: "/orders", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &DeleteOrderReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*DeleteOrderOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for deleteOrder: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetOrders gets a list of orders + + Return a list of Orders +*/ +func (a *Client) GetOrders(params *GetOrdersParams, authInfo runtime.ClientAuthInfoWriter) (*GetOrdersOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetOrdersParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getOrders", + Method: "GET", + PathPattern: "/orders", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetOrdersReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetOrdersOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getOrders: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostOrders creates new orders + + Create new Orders +*/ +func (a *Client) PostOrders(params *PostOrdersParams, authInfo runtime.ClientAuthInfoWriter) (*PostOrdersOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostOrdersParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postOrders", + Method: "POST", + PathPattern: "/orders", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostOrdersReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostOrdersOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postOrders: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PutOrders creates new orders + + Create new Orders +*/ +func (a *Client) PutOrders(params *PutOrdersParams, authInfo runtime.ClientAuthInfoWriter) (*PutOrdersOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPutOrdersParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "putOrders", + Method: "PUT", + PathPattern: "/orders", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PutOrdersReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PutOrdersOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for putOrders: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/ops/v0.0.1/ops_client/order/post_orders_parameters.go b/api/ops/v0.0.1/ops_client/order/post_orders_parameters.go new file mode 100644 index 0000000..591bd22 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/order/post_orders_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package order + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// NewPostOrdersParams creates a new PostOrdersParams object +// with the default values initialized. +func NewPostOrdersParams() *PostOrdersParams { + var () + return &PostOrdersParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostOrdersParamsWithTimeout creates a new PostOrdersParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostOrdersParamsWithTimeout(timeout time.Duration) *PostOrdersParams { + var () + return &PostOrdersParams{ + + timeout: timeout, + } +} + +// NewPostOrdersParamsWithContext creates a new PostOrdersParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostOrdersParamsWithContext(ctx context.Context) *PostOrdersParams { + var () + return &PostOrdersParams{ + + Context: ctx, + } +} + +// NewPostOrdersParamsWithHTTPClient creates a new PostOrdersParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostOrdersParamsWithHTTPClient(client *http.Client) *PostOrdersParams { + var () + return &PostOrdersParams{ + HTTPClient: client, + } +} + +/*PostOrdersParams contains all the parameters to send to the API endpoint +for the post orders operation typically these are written to a http.Request +*/ +type PostOrdersParams struct { + + /*OrderRequest + A request with an array of Order Objects + + */ + OrderRequest *ops_models.OrderRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post orders params +func (o *PostOrdersParams) WithTimeout(timeout time.Duration) *PostOrdersParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post orders params +func (o *PostOrdersParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post orders params +func (o *PostOrdersParams) WithContext(ctx context.Context) *PostOrdersParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post orders params +func (o *PostOrdersParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post orders params +func (o *PostOrdersParams) WithHTTPClient(client *http.Client) *PostOrdersParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post orders params +func (o *PostOrdersParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithOrderRequest adds the orderRequest to the post orders params +func (o *PostOrdersParams) WithOrderRequest(orderRequest *ops_models.OrderRequest) *PostOrdersParams { + o.SetOrderRequest(orderRequest) + return o +} + +// SetOrderRequest adds the orderRequest to the post orders params +func (o *PostOrdersParams) SetOrderRequest(orderRequest *ops_models.OrderRequest) { + o.OrderRequest = orderRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostOrdersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.OrderRequest != nil { + if err := r.SetBodyParam(o.OrderRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/order/post_orders_responses.go b/api/ops/v0.0.1/ops_client/order/post_orders_responses.go new file mode 100644 index 0000000..ab20bda --- /dev/null +++ b/api/ops/v0.0.1/ops_client/order/post_orders_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package order + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// PostOrdersReader is a Reader for the PostOrders structure. +type PostOrdersReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostOrdersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostOrdersOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostOrdersUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostOrdersForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostOrdersNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostOrdersUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostOrdersInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostOrdersOK creates a PostOrdersOK with default headers values +func NewPostOrdersOK() *PostOrdersOK { + return &PostOrdersOK{} +} + +/*PostOrdersOK handles this case with default header values. + +Taxnexus Response with an array of Order objects +*/ +type PostOrdersOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *ops_models.OrderResponse +} + +func (o *PostOrdersOK) Error() string { + return fmt.Sprintf("[POST /orders][%d] postOrdersOK %+v", 200, o.Payload) +} + +func (o *PostOrdersOK) GetPayload() *ops_models.OrderResponse { + return o.Payload +} + +func (o *PostOrdersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(ops_models.OrderResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostOrdersUnauthorized creates a PostOrdersUnauthorized with default headers values +func NewPostOrdersUnauthorized() *PostOrdersUnauthorized { + return &PostOrdersUnauthorized{} +} + +/*PostOrdersUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PostOrdersUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostOrdersUnauthorized) Error() string { + return fmt.Sprintf("[POST /orders][%d] postOrdersUnauthorized %+v", 401, o.Payload) +} + +func (o *PostOrdersUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostOrdersUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostOrdersForbidden creates a PostOrdersForbidden with default headers values +func NewPostOrdersForbidden() *PostOrdersForbidden { + return &PostOrdersForbidden{} +} + +/*PostOrdersForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostOrdersForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostOrdersForbidden) Error() string { + return fmt.Sprintf("[POST /orders][%d] postOrdersForbidden %+v", 403, o.Payload) +} + +func (o *PostOrdersForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostOrdersForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostOrdersNotFound creates a PostOrdersNotFound with default headers values +func NewPostOrdersNotFound() *PostOrdersNotFound { + return &PostOrdersNotFound{} +} + +/*PostOrdersNotFound handles this case with default header values. + +Resource was not found +*/ +type PostOrdersNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostOrdersNotFound) Error() string { + return fmt.Sprintf("[POST /orders][%d] postOrdersNotFound %+v", 404, o.Payload) +} + +func (o *PostOrdersNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostOrdersNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostOrdersUnprocessableEntity creates a PostOrdersUnprocessableEntity with default headers values +func NewPostOrdersUnprocessableEntity() *PostOrdersUnprocessableEntity { + return &PostOrdersUnprocessableEntity{} +} + +/*PostOrdersUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostOrdersUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostOrdersUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /orders][%d] postOrdersUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostOrdersUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostOrdersUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostOrdersInternalServerError creates a PostOrdersInternalServerError with default headers values +func NewPostOrdersInternalServerError() *PostOrdersInternalServerError { + return &PostOrdersInternalServerError{} +} + +/*PostOrdersInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostOrdersInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostOrdersInternalServerError) Error() string { + return fmt.Sprintf("[POST /orders][%d] postOrdersInternalServerError %+v", 500, o.Payload) +} + +func (o *PostOrdersInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostOrdersInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/order/put_orders_parameters.go b/api/ops/v0.0.1/ops_client/order/put_orders_parameters.go new file mode 100644 index 0000000..bf71dd6 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/order/put_orders_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package order + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// NewPutOrdersParams creates a new PutOrdersParams object +// with the default values initialized. +func NewPutOrdersParams() *PutOrdersParams { + var () + return &PutOrdersParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPutOrdersParamsWithTimeout creates a new PutOrdersParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPutOrdersParamsWithTimeout(timeout time.Duration) *PutOrdersParams { + var () + return &PutOrdersParams{ + + timeout: timeout, + } +} + +// NewPutOrdersParamsWithContext creates a new PutOrdersParams object +// with the default values initialized, and the ability to set a context for a request +func NewPutOrdersParamsWithContext(ctx context.Context) *PutOrdersParams { + var () + return &PutOrdersParams{ + + Context: ctx, + } +} + +// NewPutOrdersParamsWithHTTPClient creates a new PutOrdersParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPutOrdersParamsWithHTTPClient(client *http.Client) *PutOrdersParams { + var () + return &PutOrdersParams{ + HTTPClient: client, + } +} + +/*PutOrdersParams contains all the parameters to send to the API endpoint +for the put orders operation typically these are written to a http.Request +*/ +type PutOrdersParams struct { + + /*OrderRequest + A request with an array of Order Objects + + */ + OrderRequest *ops_models.OrderRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the put orders params +func (o *PutOrdersParams) WithTimeout(timeout time.Duration) *PutOrdersParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the put orders params +func (o *PutOrdersParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the put orders params +func (o *PutOrdersParams) WithContext(ctx context.Context) *PutOrdersParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the put orders params +func (o *PutOrdersParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the put orders params +func (o *PutOrdersParams) WithHTTPClient(client *http.Client) *PutOrdersParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the put orders params +func (o *PutOrdersParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithOrderRequest adds the orderRequest to the put orders params +func (o *PutOrdersParams) WithOrderRequest(orderRequest *ops_models.OrderRequest) *PutOrdersParams { + o.SetOrderRequest(orderRequest) + return o +} + +// SetOrderRequest adds the orderRequest to the put orders params +func (o *PutOrdersParams) SetOrderRequest(orderRequest *ops_models.OrderRequest) { + o.OrderRequest = orderRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PutOrdersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.OrderRequest != nil { + if err := r.SetBodyParam(o.OrderRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/order/put_orders_responses.go b/api/ops/v0.0.1/ops_client/order/put_orders_responses.go new file mode 100644 index 0000000..e6a01a8 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/order/put_orders_responses.go @@ -0,0 +1,298 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package order + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// PutOrdersReader is a Reader for the PutOrders structure. +type PutOrdersReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PutOrdersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPutOrdersOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPutOrdersUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPutOrdersForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPutOrdersNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPutOrdersUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPutOrdersInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPutOrdersOK creates a PutOrdersOK with default headers values +func NewPutOrdersOK() *PutOrdersOK { + return &PutOrdersOK{} +} + +/*PutOrdersOK handles this case with default header values. + +Taxnexus Response with an array of Message objects in response to a PUT +*/ +type PutOrdersOK struct { + AccessControlAllowOrigin string + + Payload *ops_models.PutResponse +} + +func (o *PutOrdersOK) Error() string { + return fmt.Sprintf("[PUT /orders][%d] putOrdersOK %+v", 200, o.Payload) +} + +func (o *PutOrdersOK) GetPayload() *ops_models.PutResponse { + return o.Payload +} + +func (o *PutOrdersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.PutResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutOrdersUnauthorized creates a PutOrdersUnauthorized with default headers values +func NewPutOrdersUnauthorized() *PutOrdersUnauthorized { + return &PutOrdersUnauthorized{} +} + +/*PutOrdersUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PutOrdersUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutOrdersUnauthorized) Error() string { + return fmt.Sprintf("[PUT /orders][%d] putOrdersUnauthorized %+v", 401, o.Payload) +} + +func (o *PutOrdersUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutOrdersUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutOrdersForbidden creates a PutOrdersForbidden with default headers values +func NewPutOrdersForbidden() *PutOrdersForbidden { + return &PutOrdersForbidden{} +} + +/*PutOrdersForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PutOrdersForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutOrdersForbidden) Error() string { + return fmt.Sprintf("[PUT /orders][%d] putOrdersForbidden %+v", 403, o.Payload) +} + +func (o *PutOrdersForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutOrdersForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutOrdersNotFound creates a PutOrdersNotFound with default headers values +func NewPutOrdersNotFound() *PutOrdersNotFound { + return &PutOrdersNotFound{} +} + +/*PutOrdersNotFound handles this case with default header values. + +Resource was not found +*/ +type PutOrdersNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutOrdersNotFound) Error() string { + return fmt.Sprintf("[PUT /orders][%d] putOrdersNotFound %+v", 404, o.Payload) +} + +func (o *PutOrdersNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutOrdersNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutOrdersUnprocessableEntity creates a PutOrdersUnprocessableEntity with default headers values +func NewPutOrdersUnprocessableEntity() *PutOrdersUnprocessableEntity { + return &PutOrdersUnprocessableEntity{} +} + +/*PutOrdersUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PutOrdersUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutOrdersUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /orders][%d] putOrdersUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutOrdersUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutOrdersUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutOrdersInternalServerError creates a PutOrdersInternalServerError with default headers values +func NewPutOrdersInternalServerError() *PutOrdersInternalServerError { + return &PutOrdersInternalServerError{} +} + +/*PutOrdersInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PutOrdersInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutOrdersInternalServerError) Error() string { + return fmt.Sprintf("[PUT /orders][%d] putOrdersInternalServerError %+v", 500, o.Payload) +} + +func (o *PutOrdersInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutOrdersInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/payment_method/delete_payment_method_parameters.go b/api/ops/v0.0.1/ops_client/payment_method/delete_payment_method_parameters.go new file mode 100644 index 0000000..de6d67c --- /dev/null +++ b/api/ops/v0.0.1/ops_client/payment_method/delete_payment_method_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package payment_method + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewDeletePaymentMethodParams creates a new DeletePaymentMethodParams object +// with the default values initialized. +func NewDeletePaymentMethodParams() *DeletePaymentMethodParams { + var () + return &DeletePaymentMethodParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewDeletePaymentMethodParamsWithTimeout creates a new DeletePaymentMethodParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewDeletePaymentMethodParamsWithTimeout(timeout time.Duration) *DeletePaymentMethodParams { + var () + return &DeletePaymentMethodParams{ + + timeout: timeout, + } +} + +// NewDeletePaymentMethodParamsWithContext creates a new DeletePaymentMethodParams object +// with the default values initialized, and the ability to set a context for a request +func NewDeletePaymentMethodParamsWithContext(ctx context.Context) *DeletePaymentMethodParams { + var () + return &DeletePaymentMethodParams{ + + Context: ctx, + } +} + +// NewDeletePaymentMethodParamsWithHTTPClient creates a new DeletePaymentMethodParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewDeletePaymentMethodParamsWithHTTPClient(client *http.Client) *DeletePaymentMethodParams { + var () + return &DeletePaymentMethodParams{ + HTTPClient: client, + } +} + +/*DeletePaymentMethodParams contains all the parameters to send to the API endpoint +for the delete payment method operation typically these are written to a http.Request +*/ +type DeletePaymentMethodParams struct { + + /*PaymentMethodID + Taxnexus Record Id of a PaymentMethod + + */ + PaymentMethodID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the delete payment method params +func (o *DeletePaymentMethodParams) WithTimeout(timeout time.Duration) *DeletePaymentMethodParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the delete payment method params +func (o *DeletePaymentMethodParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the delete payment method params +func (o *DeletePaymentMethodParams) WithContext(ctx context.Context) *DeletePaymentMethodParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the delete payment method params +func (o *DeletePaymentMethodParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the delete payment method params +func (o *DeletePaymentMethodParams) WithHTTPClient(client *http.Client) *DeletePaymentMethodParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the delete payment method params +func (o *DeletePaymentMethodParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPaymentMethodID adds the paymentMethodID to the delete payment method params +func (o *DeletePaymentMethodParams) WithPaymentMethodID(paymentMethodID *string) *DeletePaymentMethodParams { + o.SetPaymentMethodID(paymentMethodID) + return o +} + +// SetPaymentMethodID adds the paymentMethodId to the delete payment method params +func (o *DeletePaymentMethodParams) SetPaymentMethodID(paymentMethodID *string) { + o.PaymentMethodID = paymentMethodID +} + +// WriteToRequest writes these params to a swagger request +func (o *DeletePaymentMethodParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.PaymentMethodID != nil { + + // query param paymentMethodId + var qrPaymentMethodID string + if o.PaymentMethodID != nil { + qrPaymentMethodID = *o.PaymentMethodID + } + qPaymentMethodID := qrPaymentMethodID + if qPaymentMethodID != "" { + if err := r.SetQueryParam("paymentMethodId", qPaymentMethodID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/payment_method/delete_payment_method_responses.go b/api/ops/v0.0.1/ops_client/payment_method/delete_payment_method_responses.go new file mode 100644 index 0000000..476293d --- /dev/null +++ b/api/ops/v0.0.1/ops_client/payment_method/delete_payment_method_responses.go @@ -0,0 +1,298 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package payment_method + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// DeletePaymentMethodReader is a Reader for the DeletePaymentMethod structure. +type DeletePaymentMethodReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DeletePaymentMethodReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDeletePaymentMethodOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewDeletePaymentMethodUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewDeletePaymentMethodForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewDeletePaymentMethodNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewDeletePaymentMethodUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewDeletePaymentMethodInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewDeletePaymentMethodOK creates a DeletePaymentMethodOK with default headers values +func NewDeletePaymentMethodOK() *DeletePaymentMethodOK { + return &DeletePaymentMethodOK{} +} + +/*DeletePaymentMethodOK handles this case with default header values. + +Taxnexus Response with Message Objects with Delete Status +*/ +type DeletePaymentMethodOK struct { + AccessControlAllowOrigin string + + Payload *ops_models.DeleteResponse +} + +func (o *DeletePaymentMethodOK) Error() string { + return fmt.Sprintf("[DELETE /paymentmethods][%d] deletePaymentMethodOK %+v", 200, o.Payload) +} + +func (o *DeletePaymentMethodOK) GetPayload() *ops_models.DeleteResponse { + return o.Payload +} + +func (o *DeletePaymentMethodOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.DeleteResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeletePaymentMethodUnauthorized creates a DeletePaymentMethodUnauthorized with default headers values +func NewDeletePaymentMethodUnauthorized() *DeletePaymentMethodUnauthorized { + return &DeletePaymentMethodUnauthorized{} +} + +/*DeletePaymentMethodUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type DeletePaymentMethodUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeletePaymentMethodUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /paymentmethods][%d] deletePaymentMethodUnauthorized %+v", 401, o.Payload) +} + +func (o *DeletePaymentMethodUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeletePaymentMethodUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeletePaymentMethodForbidden creates a DeletePaymentMethodForbidden with default headers values +func NewDeletePaymentMethodForbidden() *DeletePaymentMethodForbidden { + return &DeletePaymentMethodForbidden{} +} + +/*DeletePaymentMethodForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type DeletePaymentMethodForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeletePaymentMethodForbidden) Error() string { + return fmt.Sprintf("[DELETE /paymentmethods][%d] deletePaymentMethodForbidden %+v", 403, o.Payload) +} + +func (o *DeletePaymentMethodForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeletePaymentMethodForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeletePaymentMethodNotFound creates a DeletePaymentMethodNotFound with default headers values +func NewDeletePaymentMethodNotFound() *DeletePaymentMethodNotFound { + return &DeletePaymentMethodNotFound{} +} + +/*DeletePaymentMethodNotFound handles this case with default header values. + +Resource was not found +*/ +type DeletePaymentMethodNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeletePaymentMethodNotFound) Error() string { + return fmt.Sprintf("[DELETE /paymentmethods][%d] deletePaymentMethodNotFound %+v", 404, o.Payload) +} + +func (o *DeletePaymentMethodNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeletePaymentMethodNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeletePaymentMethodUnprocessableEntity creates a DeletePaymentMethodUnprocessableEntity with default headers values +func NewDeletePaymentMethodUnprocessableEntity() *DeletePaymentMethodUnprocessableEntity { + return &DeletePaymentMethodUnprocessableEntity{} +} + +/*DeletePaymentMethodUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type DeletePaymentMethodUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeletePaymentMethodUnprocessableEntity) Error() string { + return fmt.Sprintf("[DELETE /paymentmethods][%d] deletePaymentMethodUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *DeletePaymentMethodUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeletePaymentMethodUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeletePaymentMethodInternalServerError creates a DeletePaymentMethodInternalServerError with default headers values +func NewDeletePaymentMethodInternalServerError() *DeletePaymentMethodInternalServerError { + return &DeletePaymentMethodInternalServerError{} +} + +/*DeletePaymentMethodInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type DeletePaymentMethodInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeletePaymentMethodInternalServerError) Error() string { + return fmt.Sprintf("[DELETE /paymentmethods][%d] deletePaymentMethodInternalServerError %+v", 500, o.Payload) +} + +func (o *DeletePaymentMethodInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeletePaymentMethodInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/payment_method/get_payment_methods_parameters.go b/api/ops/v0.0.1/ops_client/payment_method/get_payment_methods_parameters.go new file mode 100644 index 0000000..d1c0992 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/payment_method/get_payment_methods_parameters.go @@ -0,0 +1,215 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package payment_method + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetPaymentMethodsParams creates a new GetPaymentMethodsParams object +// with the default values initialized. +func NewGetPaymentMethodsParams() *GetPaymentMethodsParams { + var () + return &GetPaymentMethodsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetPaymentMethodsParamsWithTimeout creates a new GetPaymentMethodsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetPaymentMethodsParamsWithTimeout(timeout time.Duration) *GetPaymentMethodsParams { + var () + return &GetPaymentMethodsParams{ + + timeout: timeout, + } +} + +// NewGetPaymentMethodsParamsWithContext creates a new GetPaymentMethodsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetPaymentMethodsParamsWithContext(ctx context.Context) *GetPaymentMethodsParams { + var () + return &GetPaymentMethodsParams{ + + Context: ctx, + } +} + +// NewGetPaymentMethodsParamsWithHTTPClient creates a new GetPaymentMethodsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetPaymentMethodsParamsWithHTTPClient(client *http.Client) *GetPaymentMethodsParams { + var () + return &GetPaymentMethodsParams{ + HTTPClient: client, + } +} + +/*GetPaymentMethodsParams contains all the parameters to send to the API endpoint +for the get payment methods operation typically these are written to a http.Request +*/ +type GetPaymentMethodsParams struct { + + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + /*PaymentMethodID + Taxnexus Record Id of a PaymentMethod + + */ + PaymentMethodID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get payment methods params +func (o *GetPaymentMethodsParams) WithTimeout(timeout time.Duration) *GetPaymentMethodsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get payment methods params +func (o *GetPaymentMethodsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get payment methods params +func (o *GetPaymentMethodsParams) WithContext(ctx context.Context) *GetPaymentMethodsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get payment methods params +func (o *GetPaymentMethodsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get payment methods params +func (o *GetPaymentMethodsParams) WithHTTPClient(client *http.Client) *GetPaymentMethodsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get payment methods params +func (o *GetPaymentMethodsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithLimit adds the limit to the get payment methods params +func (o *GetPaymentMethodsParams) WithLimit(limit *int64) *GetPaymentMethodsParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get payment methods params +func (o *GetPaymentMethodsParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get payment methods params +func (o *GetPaymentMethodsParams) WithOffset(offset *int64) *GetPaymentMethodsParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get payment methods params +func (o *GetPaymentMethodsParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithPaymentMethodID adds the paymentMethodID to the get payment methods params +func (o *GetPaymentMethodsParams) WithPaymentMethodID(paymentMethodID *string) *GetPaymentMethodsParams { + o.SetPaymentMethodID(paymentMethodID) + return o +} + +// SetPaymentMethodID adds the paymentMethodId to the get payment methods params +func (o *GetPaymentMethodsParams) SetPaymentMethodID(paymentMethodID *string) { + o.PaymentMethodID = paymentMethodID +} + +// WriteToRequest writes these params to a swagger request +func (o *GetPaymentMethodsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.PaymentMethodID != nil { + + // query param paymentMethodId + var qrPaymentMethodID string + if o.PaymentMethodID != nil { + qrPaymentMethodID = *o.PaymentMethodID + } + qPaymentMethodID := qrPaymentMethodID + if qPaymentMethodID != "" { + if err := r.SetQueryParam("paymentMethodId", qPaymentMethodID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/payment_method/get_payment_methods_responses.go b/api/ops/v0.0.1/ops_client/payment_method/get_payment_methods_responses.go new file mode 100644 index 0000000..81dea5b --- /dev/null +++ b/api/ops/v0.0.1/ops_client/payment_method/get_payment_methods_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package payment_method + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// GetPaymentMethodsReader is a Reader for the GetPaymentMethods structure. +type GetPaymentMethodsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetPaymentMethodsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetPaymentMethodsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetPaymentMethodsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetPaymentMethodsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetPaymentMethodsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetPaymentMethodsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetPaymentMethodsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetPaymentMethodsOK creates a GetPaymentMethodsOK with default headers values +func NewGetPaymentMethodsOK() *GetPaymentMethodsOK { + return &GetPaymentMethodsOK{} +} + +/*GetPaymentMethodsOK handles this case with default header values. + +Taxnexus Response with an array of Payment Method objects +*/ +type GetPaymentMethodsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *ops_models.PaymentMethodResponse +} + +func (o *GetPaymentMethodsOK) Error() string { + return fmt.Sprintf("[GET /paymentmethods][%d] getPaymentMethodsOK %+v", 200, o.Payload) +} + +func (o *GetPaymentMethodsOK) GetPayload() *ops_models.PaymentMethodResponse { + return o.Payload +} + +func (o *GetPaymentMethodsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(ops_models.PaymentMethodResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetPaymentMethodsUnauthorized creates a GetPaymentMethodsUnauthorized with default headers values +func NewGetPaymentMethodsUnauthorized() *GetPaymentMethodsUnauthorized { + return &GetPaymentMethodsUnauthorized{} +} + +/*GetPaymentMethodsUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetPaymentMethodsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetPaymentMethodsUnauthorized) Error() string { + return fmt.Sprintf("[GET /paymentmethods][%d] getPaymentMethodsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetPaymentMethodsUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetPaymentMethodsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetPaymentMethodsForbidden creates a GetPaymentMethodsForbidden with default headers values +func NewGetPaymentMethodsForbidden() *GetPaymentMethodsForbidden { + return &GetPaymentMethodsForbidden{} +} + +/*GetPaymentMethodsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetPaymentMethodsForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetPaymentMethodsForbidden) Error() string { + return fmt.Sprintf("[GET /paymentmethods][%d] getPaymentMethodsForbidden %+v", 403, o.Payload) +} + +func (o *GetPaymentMethodsForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetPaymentMethodsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetPaymentMethodsNotFound creates a GetPaymentMethodsNotFound with default headers values +func NewGetPaymentMethodsNotFound() *GetPaymentMethodsNotFound { + return &GetPaymentMethodsNotFound{} +} + +/*GetPaymentMethodsNotFound handles this case with default header values. + +Resource was not found +*/ +type GetPaymentMethodsNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetPaymentMethodsNotFound) Error() string { + return fmt.Sprintf("[GET /paymentmethods][%d] getPaymentMethodsNotFound %+v", 404, o.Payload) +} + +func (o *GetPaymentMethodsNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetPaymentMethodsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetPaymentMethodsUnprocessableEntity creates a GetPaymentMethodsUnprocessableEntity with default headers values +func NewGetPaymentMethodsUnprocessableEntity() *GetPaymentMethodsUnprocessableEntity { + return &GetPaymentMethodsUnprocessableEntity{} +} + +/*GetPaymentMethodsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetPaymentMethodsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetPaymentMethodsUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /paymentmethods][%d] getPaymentMethodsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetPaymentMethodsUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetPaymentMethodsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetPaymentMethodsInternalServerError creates a GetPaymentMethodsInternalServerError with default headers values +func NewGetPaymentMethodsInternalServerError() *GetPaymentMethodsInternalServerError { + return &GetPaymentMethodsInternalServerError{} +} + +/*GetPaymentMethodsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetPaymentMethodsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetPaymentMethodsInternalServerError) Error() string { + return fmt.Sprintf("[GET /paymentmethods][%d] getPaymentMethodsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetPaymentMethodsInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetPaymentMethodsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/payment_method/payment_method_client.go b/api/ops/v0.0.1/ops_client/payment_method/payment_method_client.go new file mode 100644 index 0000000..855f33f --- /dev/null +++ b/api/ops/v0.0.1/ops_client/payment_method/payment_method_client.go @@ -0,0 +1,196 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package payment_method + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new payment method API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for payment method API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + DeletePaymentMethod(params *DeletePaymentMethodParams, authInfo runtime.ClientAuthInfoWriter) (*DeletePaymentMethodOK, error) + + GetPaymentMethods(params *GetPaymentMethodsParams, authInfo runtime.ClientAuthInfoWriter) (*GetPaymentMethodsOK, error) + + PostPaymentMethods(params *PostPaymentMethodsParams, authInfo runtime.ClientAuthInfoWriter) (*PostPaymentMethodsOK, error) + + PutPaymentMethods(params *PutPaymentMethodsParams, authInfo runtime.ClientAuthInfoWriter) (*PutPaymentMethodsOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + DeletePaymentMethod deletes a payment method + + Delete a PaymentMethod by ID +*/ +func (a *Client) DeletePaymentMethod(params *DeletePaymentMethodParams, authInfo runtime.ClientAuthInfoWriter) (*DeletePaymentMethodOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDeletePaymentMethodParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "deletePaymentMethod", + Method: "DELETE", + PathPattern: "/paymentmethods", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &DeletePaymentMethodReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*DeletePaymentMethodOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for deletePaymentMethod: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetPaymentMethods gets a list of payment methods + + Return a list of available Taxnexus PaymentMethods +*/ +func (a *Client) GetPaymentMethods(params *GetPaymentMethodsParams, authInfo runtime.ClientAuthInfoWriter) (*GetPaymentMethodsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetPaymentMethodsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getPaymentMethods", + Method: "GET", + PathPattern: "/paymentmethods", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetPaymentMethodsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetPaymentMethodsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getPaymentMethods: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostPaymentMethods creates new payment methods + + Create New PaymentMethods +*/ +func (a *Client) PostPaymentMethods(params *PostPaymentMethodsParams, authInfo runtime.ClientAuthInfoWriter) (*PostPaymentMethodsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostPaymentMethodsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postPaymentMethods", + Method: "POST", + PathPattern: "/paymentmethods", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostPaymentMethodsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostPaymentMethodsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postPaymentMethods: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PutPaymentMethods puts a list of payment methods + + Put a list of PaymentMethods +*/ +func (a *Client) PutPaymentMethods(params *PutPaymentMethodsParams, authInfo runtime.ClientAuthInfoWriter) (*PutPaymentMethodsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPutPaymentMethodsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "putPaymentMethods", + Method: "PUT", + PathPattern: "/paymentmethods", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PutPaymentMethodsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PutPaymentMethodsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for putPaymentMethods: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/ops/v0.0.1/ops_client/payment_method/post_payment_methods_parameters.go b/api/ops/v0.0.1/ops_client/payment_method/post_payment_methods_parameters.go new file mode 100644 index 0000000..5c8c9f0 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/payment_method/post_payment_methods_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package payment_method + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// NewPostPaymentMethodsParams creates a new PostPaymentMethodsParams object +// with the default values initialized. +func NewPostPaymentMethodsParams() *PostPaymentMethodsParams { + var () + return &PostPaymentMethodsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostPaymentMethodsParamsWithTimeout creates a new PostPaymentMethodsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostPaymentMethodsParamsWithTimeout(timeout time.Duration) *PostPaymentMethodsParams { + var () + return &PostPaymentMethodsParams{ + + timeout: timeout, + } +} + +// NewPostPaymentMethodsParamsWithContext creates a new PostPaymentMethodsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostPaymentMethodsParamsWithContext(ctx context.Context) *PostPaymentMethodsParams { + var () + return &PostPaymentMethodsParams{ + + Context: ctx, + } +} + +// NewPostPaymentMethodsParamsWithHTTPClient creates a new PostPaymentMethodsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostPaymentMethodsParamsWithHTTPClient(client *http.Client) *PostPaymentMethodsParams { + var () + return &PostPaymentMethodsParams{ + HTTPClient: client, + } +} + +/*PostPaymentMethodsParams contains all the parameters to send to the API endpoint +for the post payment methods operation typically these are written to a http.Request +*/ +type PostPaymentMethodsParams struct { + + /*PaymentMethodRequest + A request with an array of Purchase Order Objects + + */ + PaymentMethodRequest *ops_models.PaymentMethodRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post payment methods params +func (o *PostPaymentMethodsParams) WithTimeout(timeout time.Duration) *PostPaymentMethodsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post payment methods params +func (o *PostPaymentMethodsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post payment methods params +func (o *PostPaymentMethodsParams) WithContext(ctx context.Context) *PostPaymentMethodsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post payment methods params +func (o *PostPaymentMethodsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post payment methods params +func (o *PostPaymentMethodsParams) WithHTTPClient(client *http.Client) *PostPaymentMethodsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post payment methods params +func (o *PostPaymentMethodsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPaymentMethodRequest adds the paymentMethodRequest to the post payment methods params +func (o *PostPaymentMethodsParams) WithPaymentMethodRequest(paymentMethodRequest *ops_models.PaymentMethodRequest) *PostPaymentMethodsParams { + o.SetPaymentMethodRequest(paymentMethodRequest) + return o +} + +// SetPaymentMethodRequest adds the paymentMethodRequest to the post payment methods params +func (o *PostPaymentMethodsParams) SetPaymentMethodRequest(paymentMethodRequest *ops_models.PaymentMethodRequest) { + o.PaymentMethodRequest = paymentMethodRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostPaymentMethodsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.PaymentMethodRequest != nil { + if err := r.SetBodyParam(o.PaymentMethodRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/payment_method/post_payment_methods_responses.go b/api/ops/v0.0.1/ops_client/payment_method/post_payment_methods_responses.go new file mode 100644 index 0000000..fd06dd8 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/payment_method/post_payment_methods_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package payment_method + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// PostPaymentMethodsReader is a Reader for the PostPaymentMethods structure. +type PostPaymentMethodsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostPaymentMethodsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostPaymentMethodsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostPaymentMethodsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostPaymentMethodsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostPaymentMethodsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostPaymentMethodsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostPaymentMethodsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostPaymentMethodsOK creates a PostPaymentMethodsOK with default headers values +func NewPostPaymentMethodsOK() *PostPaymentMethodsOK { + return &PostPaymentMethodsOK{} +} + +/*PostPaymentMethodsOK handles this case with default header values. + +Taxnexus Response with an array of Payment Method objects +*/ +type PostPaymentMethodsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *ops_models.PaymentMethodResponse +} + +func (o *PostPaymentMethodsOK) Error() string { + return fmt.Sprintf("[POST /paymentmethods][%d] postPaymentMethodsOK %+v", 200, o.Payload) +} + +func (o *PostPaymentMethodsOK) GetPayload() *ops_models.PaymentMethodResponse { + return o.Payload +} + +func (o *PostPaymentMethodsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(ops_models.PaymentMethodResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPaymentMethodsUnauthorized creates a PostPaymentMethodsUnauthorized with default headers values +func NewPostPaymentMethodsUnauthorized() *PostPaymentMethodsUnauthorized { + return &PostPaymentMethodsUnauthorized{} +} + +/*PostPaymentMethodsUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PostPaymentMethodsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostPaymentMethodsUnauthorized) Error() string { + return fmt.Sprintf("[POST /paymentmethods][%d] postPaymentMethodsUnauthorized %+v", 401, o.Payload) +} + +func (o *PostPaymentMethodsUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostPaymentMethodsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPaymentMethodsForbidden creates a PostPaymentMethodsForbidden with default headers values +func NewPostPaymentMethodsForbidden() *PostPaymentMethodsForbidden { + return &PostPaymentMethodsForbidden{} +} + +/*PostPaymentMethodsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostPaymentMethodsForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostPaymentMethodsForbidden) Error() string { + return fmt.Sprintf("[POST /paymentmethods][%d] postPaymentMethodsForbidden %+v", 403, o.Payload) +} + +func (o *PostPaymentMethodsForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostPaymentMethodsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPaymentMethodsNotFound creates a PostPaymentMethodsNotFound with default headers values +func NewPostPaymentMethodsNotFound() *PostPaymentMethodsNotFound { + return &PostPaymentMethodsNotFound{} +} + +/*PostPaymentMethodsNotFound handles this case with default header values. + +Resource was not found +*/ +type PostPaymentMethodsNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostPaymentMethodsNotFound) Error() string { + return fmt.Sprintf("[POST /paymentmethods][%d] postPaymentMethodsNotFound %+v", 404, o.Payload) +} + +func (o *PostPaymentMethodsNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostPaymentMethodsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPaymentMethodsUnprocessableEntity creates a PostPaymentMethodsUnprocessableEntity with default headers values +func NewPostPaymentMethodsUnprocessableEntity() *PostPaymentMethodsUnprocessableEntity { + return &PostPaymentMethodsUnprocessableEntity{} +} + +/*PostPaymentMethodsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostPaymentMethodsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostPaymentMethodsUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /paymentmethods][%d] postPaymentMethodsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostPaymentMethodsUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostPaymentMethodsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPaymentMethodsInternalServerError creates a PostPaymentMethodsInternalServerError with default headers values +func NewPostPaymentMethodsInternalServerError() *PostPaymentMethodsInternalServerError { + return &PostPaymentMethodsInternalServerError{} +} + +/*PostPaymentMethodsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostPaymentMethodsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostPaymentMethodsInternalServerError) Error() string { + return fmt.Sprintf("[POST /paymentmethods][%d] postPaymentMethodsInternalServerError %+v", 500, o.Payload) +} + +func (o *PostPaymentMethodsInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostPaymentMethodsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/payment_method/put_payment_methods_parameters.go b/api/ops/v0.0.1/ops_client/payment_method/put_payment_methods_parameters.go new file mode 100644 index 0000000..47261dc --- /dev/null +++ b/api/ops/v0.0.1/ops_client/payment_method/put_payment_methods_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package payment_method + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// NewPutPaymentMethodsParams creates a new PutPaymentMethodsParams object +// with the default values initialized. +func NewPutPaymentMethodsParams() *PutPaymentMethodsParams { + var () + return &PutPaymentMethodsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPutPaymentMethodsParamsWithTimeout creates a new PutPaymentMethodsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPutPaymentMethodsParamsWithTimeout(timeout time.Duration) *PutPaymentMethodsParams { + var () + return &PutPaymentMethodsParams{ + + timeout: timeout, + } +} + +// NewPutPaymentMethodsParamsWithContext creates a new PutPaymentMethodsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPutPaymentMethodsParamsWithContext(ctx context.Context) *PutPaymentMethodsParams { + var () + return &PutPaymentMethodsParams{ + + Context: ctx, + } +} + +// NewPutPaymentMethodsParamsWithHTTPClient creates a new PutPaymentMethodsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPutPaymentMethodsParamsWithHTTPClient(client *http.Client) *PutPaymentMethodsParams { + var () + return &PutPaymentMethodsParams{ + HTTPClient: client, + } +} + +/*PutPaymentMethodsParams contains all the parameters to send to the API endpoint +for the put payment methods operation typically these are written to a http.Request +*/ +type PutPaymentMethodsParams struct { + + /*PaymentMethodRequest + A request with an array of Purchase Order Objects + + */ + PaymentMethodRequest *ops_models.PaymentMethodRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the put payment methods params +func (o *PutPaymentMethodsParams) WithTimeout(timeout time.Duration) *PutPaymentMethodsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the put payment methods params +func (o *PutPaymentMethodsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the put payment methods params +func (o *PutPaymentMethodsParams) WithContext(ctx context.Context) *PutPaymentMethodsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the put payment methods params +func (o *PutPaymentMethodsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the put payment methods params +func (o *PutPaymentMethodsParams) WithHTTPClient(client *http.Client) *PutPaymentMethodsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the put payment methods params +func (o *PutPaymentMethodsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPaymentMethodRequest adds the paymentMethodRequest to the put payment methods params +func (o *PutPaymentMethodsParams) WithPaymentMethodRequest(paymentMethodRequest *ops_models.PaymentMethodRequest) *PutPaymentMethodsParams { + o.SetPaymentMethodRequest(paymentMethodRequest) + return o +} + +// SetPaymentMethodRequest adds the paymentMethodRequest to the put payment methods params +func (o *PutPaymentMethodsParams) SetPaymentMethodRequest(paymentMethodRequest *ops_models.PaymentMethodRequest) { + o.PaymentMethodRequest = paymentMethodRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PutPaymentMethodsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.PaymentMethodRequest != nil { + if err := r.SetBodyParam(o.PaymentMethodRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/payment_method/put_payment_methods_responses.go b/api/ops/v0.0.1/ops_client/payment_method/put_payment_methods_responses.go new file mode 100644 index 0000000..1f5607a --- /dev/null +++ b/api/ops/v0.0.1/ops_client/payment_method/put_payment_methods_responses.go @@ -0,0 +1,298 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package payment_method + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// PutPaymentMethodsReader is a Reader for the PutPaymentMethods structure. +type PutPaymentMethodsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PutPaymentMethodsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPutPaymentMethodsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPutPaymentMethodsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPutPaymentMethodsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPutPaymentMethodsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPutPaymentMethodsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPutPaymentMethodsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPutPaymentMethodsOK creates a PutPaymentMethodsOK with default headers values +func NewPutPaymentMethodsOK() *PutPaymentMethodsOK { + return &PutPaymentMethodsOK{} +} + +/*PutPaymentMethodsOK handles this case with default header values. + +Taxnexus Response with an array of Message objects in response to a PUT +*/ +type PutPaymentMethodsOK struct { + AccessControlAllowOrigin string + + Payload *ops_models.PutResponse +} + +func (o *PutPaymentMethodsOK) Error() string { + return fmt.Sprintf("[PUT /paymentmethods][%d] putPaymentMethodsOK %+v", 200, o.Payload) +} + +func (o *PutPaymentMethodsOK) GetPayload() *ops_models.PutResponse { + return o.Payload +} + +func (o *PutPaymentMethodsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.PutResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutPaymentMethodsUnauthorized creates a PutPaymentMethodsUnauthorized with default headers values +func NewPutPaymentMethodsUnauthorized() *PutPaymentMethodsUnauthorized { + return &PutPaymentMethodsUnauthorized{} +} + +/*PutPaymentMethodsUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PutPaymentMethodsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutPaymentMethodsUnauthorized) Error() string { + return fmt.Sprintf("[PUT /paymentmethods][%d] putPaymentMethodsUnauthorized %+v", 401, o.Payload) +} + +func (o *PutPaymentMethodsUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutPaymentMethodsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutPaymentMethodsForbidden creates a PutPaymentMethodsForbidden with default headers values +func NewPutPaymentMethodsForbidden() *PutPaymentMethodsForbidden { + return &PutPaymentMethodsForbidden{} +} + +/*PutPaymentMethodsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PutPaymentMethodsForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutPaymentMethodsForbidden) Error() string { + return fmt.Sprintf("[PUT /paymentmethods][%d] putPaymentMethodsForbidden %+v", 403, o.Payload) +} + +func (o *PutPaymentMethodsForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutPaymentMethodsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutPaymentMethodsNotFound creates a PutPaymentMethodsNotFound with default headers values +func NewPutPaymentMethodsNotFound() *PutPaymentMethodsNotFound { + return &PutPaymentMethodsNotFound{} +} + +/*PutPaymentMethodsNotFound handles this case with default header values. + +Resource was not found +*/ +type PutPaymentMethodsNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutPaymentMethodsNotFound) Error() string { + return fmt.Sprintf("[PUT /paymentmethods][%d] putPaymentMethodsNotFound %+v", 404, o.Payload) +} + +func (o *PutPaymentMethodsNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutPaymentMethodsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutPaymentMethodsUnprocessableEntity creates a PutPaymentMethodsUnprocessableEntity with default headers values +func NewPutPaymentMethodsUnprocessableEntity() *PutPaymentMethodsUnprocessableEntity { + return &PutPaymentMethodsUnprocessableEntity{} +} + +/*PutPaymentMethodsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PutPaymentMethodsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutPaymentMethodsUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /paymentmethods][%d] putPaymentMethodsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutPaymentMethodsUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutPaymentMethodsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutPaymentMethodsInternalServerError creates a PutPaymentMethodsInternalServerError with default headers values +func NewPutPaymentMethodsInternalServerError() *PutPaymentMethodsInternalServerError { + return &PutPaymentMethodsInternalServerError{} +} + +/*PutPaymentMethodsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PutPaymentMethodsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutPaymentMethodsInternalServerError) Error() string { + return fmt.Sprintf("[PUT /paymentmethods][%d] putPaymentMethodsInternalServerError %+v", 500, o.Payload) +} + +func (o *PutPaymentMethodsInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutPaymentMethodsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/product/delete_product_parameters.go b/api/ops/v0.0.1/ops_client/product/delete_product_parameters.go new file mode 100644 index 0000000..582f5ad --- /dev/null +++ b/api/ops/v0.0.1/ops_client/product/delete_product_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package product + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewDeleteProductParams creates a new DeleteProductParams object +// with the default values initialized. +func NewDeleteProductParams() *DeleteProductParams { + var () + return &DeleteProductParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewDeleteProductParamsWithTimeout creates a new DeleteProductParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewDeleteProductParamsWithTimeout(timeout time.Duration) *DeleteProductParams { + var () + return &DeleteProductParams{ + + timeout: timeout, + } +} + +// NewDeleteProductParamsWithContext creates a new DeleteProductParams object +// with the default values initialized, and the ability to set a context for a request +func NewDeleteProductParamsWithContext(ctx context.Context) *DeleteProductParams { + var () + return &DeleteProductParams{ + + Context: ctx, + } +} + +// NewDeleteProductParamsWithHTTPClient creates a new DeleteProductParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewDeleteProductParamsWithHTTPClient(client *http.Client) *DeleteProductParams { + var () + return &DeleteProductParams{ + HTTPClient: client, + } +} + +/*DeleteProductParams contains all the parameters to send to the API endpoint +for the delete product operation typically these are written to a http.Request +*/ +type DeleteProductParams struct { + + /*ProductID + Taxnexus Record Id of a Product + + */ + ProductID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the delete product params +func (o *DeleteProductParams) WithTimeout(timeout time.Duration) *DeleteProductParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the delete product params +func (o *DeleteProductParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the delete product params +func (o *DeleteProductParams) WithContext(ctx context.Context) *DeleteProductParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the delete product params +func (o *DeleteProductParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the delete product params +func (o *DeleteProductParams) WithHTTPClient(client *http.Client) *DeleteProductParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the delete product params +func (o *DeleteProductParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithProductID adds the productID to the delete product params +func (o *DeleteProductParams) WithProductID(productID *string) *DeleteProductParams { + o.SetProductID(productID) + return o +} + +// SetProductID adds the productId to the delete product params +func (o *DeleteProductParams) SetProductID(productID *string) { + o.ProductID = productID +} + +// WriteToRequest writes these params to a swagger request +func (o *DeleteProductParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ProductID != nil { + + // query param productId + var qrProductID string + if o.ProductID != nil { + qrProductID = *o.ProductID + } + qProductID := qrProductID + if qProductID != "" { + if err := r.SetQueryParam("productId", qProductID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/product/delete_product_responses.go b/api/ops/v0.0.1/ops_client/product/delete_product_responses.go new file mode 100644 index 0000000..2783ff6 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/product/delete_product_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package product + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// DeleteProductReader is a Reader for the DeleteProduct structure. +type DeleteProductReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DeleteProductReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDeleteProductOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewDeleteProductUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewDeleteProductForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewDeleteProductNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewDeleteProductUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewDeleteProductInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewDeleteProductOK creates a DeleteProductOK with default headers values +func NewDeleteProductOK() *DeleteProductOK { + return &DeleteProductOK{} +} + +/*DeleteProductOK handles this case with default header values. + +Taxnexus Response with an array of Product objects +*/ +type DeleteProductOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *ops_models.ProductResponse +} + +func (o *DeleteProductOK) Error() string { + return fmt.Sprintf("[DELETE /products][%d] deleteProductOK %+v", 200, o.Payload) +} + +func (o *DeleteProductOK) GetPayload() *ops_models.ProductResponse { + return o.Payload +} + +func (o *DeleteProductOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(ops_models.ProductResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteProductUnauthorized creates a DeleteProductUnauthorized with default headers values +func NewDeleteProductUnauthorized() *DeleteProductUnauthorized { + return &DeleteProductUnauthorized{} +} + +/*DeleteProductUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type DeleteProductUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeleteProductUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /products][%d] deleteProductUnauthorized %+v", 401, o.Payload) +} + +func (o *DeleteProductUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeleteProductUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteProductForbidden creates a DeleteProductForbidden with default headers values +func NewDeleteProductForbidden() *DeleteProductForbidden { + return &DeleteProductForbidden{} +} + +/*DeleteProductForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type DeleteProductForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeleteProductForbidden) Error() string { + return fmt.Sprintf("[DELETE /products][%d] deleteProductForbidden %+v", 403, o.Payload) +} + +func (o *DeleteProductForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeleteProductForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteProductNotFound creates a DeleteProductNotFound with default headers values +func NewDeleteProductNotFound() *DeleteProductNotFound { + return &DeleteProductNotFound{} +} + +/*DeleteProductNotFound handles this case with default header values. + +Resource was not found +*/ +type DeleteProductNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeleteProductNotFound) Error() string { + return fmt.Sprintf("[DELETE /products][%d] deleteProductNotFound %+v", 404, o.Payload) +} + +func (o *DeleteProductNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeleteProductNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteProductUnprocessableEntity creates a DeleteProductUnprocessableEntity with default headers values +func NewDeleteProductUnprocessableEntity() *DeleteProductUnprocessableEntity { + return &DeleteProductUnprocessableEntity{} +} + +/*DeleteProductUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type DeleteProductUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeleteProductUnprocessableEntity) Error() string { + return fmt.Sprintf("[DELETE /products][%d] deleteProductUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *DeleteProductUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeleteProductUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteProductInternalServerError creates a DeleteProductInternalServerError with default headers values +func NewDeleteProductInternalServerError() *DeleteProductInternalServerError { + return &DeleteProductInternalServerError{} +} + +/*DeleteProductInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type DeleteProductInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeleteProductInternalServerError) Error() string { + return fmt.Sprintf("[DELETE /products][%d] deleteProductInternalServerError %+v", 500, o.Payload) +} + +func (o *DeleteProductInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeleteProductInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/product/get_products_observable_parameters.go b/api/ops/v0.0.1/ops_client/product/get_products_observable_parameters.go new file mode 100644 index 0000000..406bdd8 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/product/get_products_observable_parameters.go @@ -0,0 +1,247 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package product + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetProductsObservableParams creates a new GetProductsObservableParams object +// with the default values initialized. +func NewGetProductsObservableParams() *GetProductsObservableParams { + var () + return &GetProductsObservableParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetProductsObservableParamsWithTimeout creates a new GetProductsObservableParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetProductsObservableParamsWithTimeout(timeout time.Duration) *GetProductsObservableParams { + var () + return &GetProductsObservableParams{ + + timeout: timeout, + } +} + +// NewGetProductsObservableParamsWithContext creates a new GetProductsObservableParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetProductsObservableParamsWithContext(ctx context.Context) *GetProductsObservableParams { + var () + return &GetProductsObservableParams{ + + Context: ctx, + } +} + +// NewGetProductsObservableParamsWithHTTPClient creates a new GetProductsObservableParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetProductsObservableParamsWithHTTPClient(client *http.Client) *GetProductsObservableParams { + var () + return &GetProductsObservableParams{ + HTTPClient: client, + } +} + +/*GetProductsObservableParams contains all the parameters to send to the API endpoint +for the get products observable operation typically these are written to a http.Request +*/ +type GetProductsObservableParams struct { + + /*Active + Retrieve active records? + + */ + Active *bool + /*ProductCode + Product Code of a Product + + */ + ProductCode *string + /*ProductID + Taxnexus Record Id of a Product + + */ + ProductID *string + /*Publish + Is this product published? + + */ + Publish *bool + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get products observable params +func (o *GetProductsObservableParams) WithTimeout(timeout time.Duration) *GetProductsObservableParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get products observable params +func (o *GetProductsObservableParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get products observable params +func (o *GetProductsObservableParams) WithContext(ctx context.Context) *GetProductsObservableParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get products observable params +func (o *GetProductsObservableParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get products observable params +func (o *GetProductsObservableParams) WithHTTPClient(client *http.Client) *GetProductsObservableParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get products observable params +func (o *GetProductsObservableParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithActive adds the active to the get products observable params +func (o *GetProductsObservableParams) WithActive(active *bool) *GetProductsObservableParams { + o.SetActive(active) + return o +} + +// SetActive adds the active to the get products observable params +func (o *GetProductsObservableParams) SetActive(active *bool) { + o.Active = active +} + +// WithProductCode adds the productCode to the get products observable params +func (o *GetProductsObservableParams) WithProductCode(productCode *string) *GetProductsObservableParams { + o.SetProductCode(productCode) + return o +} + +// SetProductCode adds the productCode to the get products observable params +func (o *GetProductsObservableParams) SetProductCode(productCode *string) { + o.ProductCode = productCode +} + +// WithProductID adds the productID to the get products observable params +func (o *GetProductsObservableParams) WithProductID(productID *string) *GetProductsObservableParams { + o.SetProductID(productID) + return o +} + +// SetProductID adds the productId to the get products observable params +func (o *GetProductsObservableParams) SetProductID(productID *string) { + o.ProductID = productID +} + +// WithPublish adds the publish to the get products observable params +func (o *GetProductsObservableParams) WithPublish(publish *bool) *GetProductsObservableParams { + o.SetPublish(publish) + return o +} + +// SetPublish adds the publish to the get products observable params +func (o *GetProductsObservableParams) SetPublish(publish *bool) { + o.Publish = publish +} + +// WriteToRequest writes these params to a swagger request +func (o *GetProductsObservableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Active != nil { + + // query param active + var qrActive bool + if o.Active != nil { + qrActive = *o.Active + } + qActive := swag.FormatBool(qrActive) + if qActive != "" { + if err := r.SetQueryParam("active", qActive); err != nil { + return err + } + } + + } + + if o.ProductCode != nil { + + // query param productCode + var qrProductCode string + if o.ProductCode != nil { + qrProductCode = *o.ProductCode + } + qProductCode := qrProductCode + if qProductCode != "" { + if err := r.SetQueryParam("productCode", qProductCode); err != nil { + return err + } + } + + } + + if o.ProductID != nil { + + // query param productId + var qrProductID string + if o.ProductID != nil { + qrProductID = *o.ProductID + } + qProductID := qrProductID + if qProductID != "" { + if err := r.SetQueryParam("productId", qProductID); err != nil { + return err + } + } + + } + + if o.Publish != nil { + + // query param publish + var qrPublish bool + if o.Publish != nil { + qrPublish = *o.Publish + } + qPublish := swag.FormatBool(qrPublish) + if qPublish != "" { + if err := r.SetQueryParam("publish", qPublish); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/product/get_products_observable_responses.go b/api/ops/v0.0.1/ops_client/product/get_products_observable_responses.go new file mode 100644 index 0000000..15e81c4 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/product/get_products_observable_responses.go @@ -0,0 +1,301 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package product + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// GetProductsObservableReader is a Reader for the GetProductsObservable structure. +type GetProductsObservableReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetProductsObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetProductsObservableOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetProductsObservableUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetProductsObservableForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetProductsObservableNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetProductsObservableUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetProductsObservableInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetProductsObservableOK creates a GetProductsObservableOK with default headers values +func NewGetProductsObservableOK() *GetProductsObservableOK { + return &GetProductsObservableOK{} +} + +/*GetProductsObservableOK handles this case with default header values. + +Simple array of products +*/ +type GetProductsObservableOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload []*ops_models.Product +} + +func (o *GetProductsObservableOK) Error() string { + return fmt.Sprintf("[GET /products/observable][%d] getProductsObservableOK %+v", 200, o.Payload) +} + +func (o *GetProductsObservableOK) GetPayload() []*ops_models.Product { + return o.Payload +} + +func (o *GetProductsObservableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetProductsObservableUnauthorized creates a GetProductsObservableUnauthorized with default headers values +func NewGetProductsObservableUnauthorized() *GetProductsObservableUnauthorized { + return &GetProductsObservableUnauthorized{} +} + +/*GetProductsObservableUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetProductsObservableUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetProductsObservableUnauthorized) Error() string { + return fmt.Sprintf("[GET /products/observable][%d] getProductsObservableUnauthorized %+v", 401, o.Payload) +} + +func (o *GetProductsObservableUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetProductsObservableUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetProductsObservableForbidden creates a GetProductsObservableForbidden with default headers values +func NewGetProductsObservableForbidden() *GetProductsObservableForbidden { + return &GetProductsObservableForbidden{} +} + +/*GetProductsObservableForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetProductsObservableForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetProductsObservableForbidden) Error() string { + return fmt.Sprintf("[GET /products/observable][%d] getProductsObservableForbidden %+v", 403, o.Payload) +} + +func (o *GetProductsObservableForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetProductsObservableForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetProductsObservableNotFound creates a GetProductsObservableNotFound with default headers values +func NewGetProductsObservableNotFound() *GetProductsObservableNotFound { + return &GetProductsObservableNotFound{} +} + +/*GetProductsObservableNotFound handles this case with default header values. + +Resource was not found +*/ +type GetProductsObservableNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetProductsObservableNotFound) Error() string { + return fmt.Sprintf("[GET /products/observable][%d] getProductsObservableNotFound %+v", 404, o.Payload) +} + +func (o *GetProductsObservableNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetProductsObservableNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetProductsObservableUnprocessableEntity creates a GetProductsObservableUnprocessableEntity with default headers values +func NewGetProductsObservableUnprocessableEntity() *GetProductsObservableUnprocessableEntity { + return &GetProductsObservableUnprocessableEntity{} +} + +/*GetProductsObservableUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetProductsObservableUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetProductsObservableUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /products/observable][%d] getProductsObservableUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetProductsObservableUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetProductsObservableUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetProductsObservableInternalServerError creates a GetProductsObservableInternalServerError with default headers values +func NewGetProductsObservableInternalServerError() *GetProductsObservableInternalServerError { + return &GetProductsObservableInternalServerError{} +} + +/*GetProductsObservableInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetProductsObservableInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetProductsObservableInternalServerError) Error() string { + return fmt.Sprintf("[GET /products/observable][%d] getProductsObservableInternalServerError %+v", 500, o.Payload) +} + +func (o *GetProductsObservableInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetProductsObservableInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/product/get_products_parameters.go b/api/ops/v0.0.1/ops_client/product/get_products_parameters.go new file mode 100644 index 0000000..0015db0 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/product/get_products_parameters.go @@ -0,0 +1,311 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package product + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetProductsParams creates a new GetProductsParams object +// with the default values initialized. +func NewGetProductsParams() *GetProductsParams { + var () + return &GetProductsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetProductsParamsWithTimeout creates a new GetProductsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetProductsParamsWithTimeout(timeout time.Duration) *GetProductsParams { + var () + return &GetProductsParams{ + + timeout: timeout, + } +} + +// NewGetProductsParamsWithContext creates a new GetProductsParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetProductsParamsWithContext(ctx context.Context) *GetProductsParams { + var () + return &GetProductsParams{ + + Context: ctx, + } +} + +// NewGetProductsParamsWithHTTPClient creates a new GetProductsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetProductsParamsWithHTTPClient(client *http.Client) *GetProductsParams { + var () + return &GetProductsParams{ + HTTPClient: client, + } +} + +/*GetProductsParams contains all the parameters to send to the API endpoint +for the get products operation typically these are written to a http.Request +*/ +type GetProductsParams struct { + + /*Active + Retrieve active records? + + */ + Active *bool + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + /*ProductCode + Product Code of a Product + + */ + ProductCode *string + /*ProductID + Taxnexus Record Id of a Product + + */ + ProductID *string + /*Publish + Is this product published? + + */ + Publish *bool + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get products params +func (o *GetProductsParams) WithTimeout(timeout time.Duration) *GetProductsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get products params +func (o *GetProductsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get products params +func (o *GetProductsParams) WithContext(ctx context.Context) *GetProductsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get products params +func (o *GetProductsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get products params +func (o *GetProductsParams) WithHTTPClient(client *http.Client) *GetProductsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get products params +func (o *GetProductsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithActive adds the active to the get products params +func (o *GetProductsParams) WithActive(active *bool) *GetProductsParams { + o.SetActive(active) + return o +} + +// SetActive adds the active to the get products params +func (o *GetProductsParams) SetActive(active *bool) { + o.Active = active +} + +// WithLimit adds the limit to the get products params +func (o *GetProductsParams) WithLimit(limit *int64) *GetProductsParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get products params +func (o *GetProductsParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get products params +func (o *GetProductsParams) WithOffset(offset *int64) *GetProductsParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get products params +func (o *GetProductsParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithProductCode adds the productCode to the get products params +func (o *GetProductsParams) WithProductCode(productCode *string) *GetProductsParams { + o.SetProductCode(productCode) + return o +} + +// SetProductCode adds the productCode to the get products params +func (o *GetProductsParams) SetProductCode(productCode *string) { + o.ProductCode = productCode +} + +// WithProductID adds the productID to the get products params +func (o *GetProductsParams) WithProductID(productID *string) *GetProductsParams { + o.SetProductID(productID) + return o +} + +// SetProductID adds the productId to the get products params +func (o *GetProductsParams) SetProductID(productID *string) { + o.ProductID = productID +} + +// WithPublish adds the publish to the get products params +func (o *GetProductsParams) WithPublish(publish *bool) *GetProductsParams { + o.SetPublish(publish) + return o +} + +// SetPublish adds the publish to the get products params +func (o *GetProductsParams) SetPublish(publish *bool) { + o.Publish = publish +} + +// WriteToRequest writes these params to a swagger request +func (o *GetProductsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Active != nil { + + // query param active + var qrActive bool + if o.Active != nil { + qrActive = *o.Active + } + qActive := swag.FormatBool(qrActive) + if qActive != "" { + if err := r.SetQueryParam("active", qActive); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.ProductCode != nil { + + // query param productCode + var qrProductCode string + if o.ProductCode != nil { + qrProductCode = *o.ProductCode + } + qProductCode := qrProductCode + if qProductCode != "" { + if err := r.SetQueryParam("productCode", qProductCode); err != nil { + return err + } + } + + } + + if o.ProductID != nil { + + // query param productId + var qrProductID string + if o.ProductID != nil { + qrProductID = *o.ProductID + } + qProductID := qrProductID + if qProductID != "" { + if err := r.SetQueryParam("productId", qProductID); err != nil { + return err + } + } + + } + + if o.Publish != nil { + + // query param publish + var qrPublish bool + if o.Publish != nil { + qrPublish = *o.Publish + } + qPublish := swag.FormatBool(qrPublish) + if qPublish != "" { + if err := r.SetQueryParam("publish", qPublish); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/product/get_products_responses.go b/api/ops/v0.0.1/ops_client/product/get_products_responses.go new file mode 100644 index 0000000..bc9dca7 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/product/get_products_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package product + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// GetProductsReader is a Reader for the GetProducts structure. +type GetProductsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetProductsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetProductsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetProductsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetProductsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetProductsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetProductsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetProductsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetProductsOK creates a GetProductsOK with default headers values +func NewGetProductsOK() *GetProductsOK { + return &GetProductsOK{} +} + +/*GetProductsOK handles this case with default header values. + +Taxnexus Response with an array of Product objects +*/ +type GetProductsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *ops_models.ProductResponse +} + +func (o *GetProductsOK) Error() string { + return fmt.Sprintf("[GET /products][%d] getProductsOK %+v", 200, o.Payload) +} + +func (o *GetProductsOK) GetPayload() *ops_models.ProductResponse { + return o.Payload +} + +func (o *GetProductsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(ops_models.ProductResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetProductsUnauthorized creates a GetProductsUnauthorized with default headers values +func NewGetProductsUnauthorized() *GetProductsUnauthorized { + return &GetProductsUnauthorized{} +} + +/*GetProductsUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetProductsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetProductsUnauthorized) Error() string { + return fmt.Sprintf("[GET /products][%d] getProductsUnauthorized %+v", 401, o.Payload) +} + +func (o *GetProductsUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetProductsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetProductsForbidden creates a GetProductsForbidden with default headers values +func NewGetProductsForbidden() *GetProductsForbidden { + return &GetProductsForbidden{} +} + +/*GetProductsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetProductsForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetProductsForbidden) Error() string { + return fmt.Sprintf("[GET /products][%d] getProductsForbidden %+v", 403, o.Payload) +} + +func (o *GetProductsForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetProductsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetProductsNotFound creates a GetProductsNotFound with default headers values +func NewGetProductsNotFound() *GetProductsNotFound { + return &GetProductsNotFound{} +} + +/*GetProductsNotFound handles this case with default header values. + +Resource was not found +*/ +type GetProductsNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetProductsNotFound) Error() string { + return fmt.Sprintf("[GET /products][%d] getProductsNotFound %+v", 404, o.Payload) +} + +func (o *GetProductsNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetProductsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetProductsUnprocessableEntity creates a GetProductsUnprocessableEntity with default headers values +func NewGetProductsUnprocessableEntity() *GetProductsUnprocessableEntity { + return &GetProductsUnprocessableEntity{} +} + +/*GetProductsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetProductsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetProductsUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /products][%d] getProductsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetProductsUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetProductsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetProductsInternalServerError creates a GetProductsInternalServerError with default headers values +func NewGetProductsInternalServerError() *GetProductsInternalServerError { + return &GetProductsInternalServerError{} +} + +/*GetProductsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetProductsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetProductsInternalServerError) Error() string { + return fmt.Sprintf("[GET /products][%d] getProductsInternalServerError %+v", 500, o.Payload) +} + +func (o *GetProductsInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetProductsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/product/post_products_parameters.go b/api/ops/v0.0.1/ops_client/product/post_products_parameters.go new file mode 100644 index 0000000..e85fbcb --- /dev/null +++ b/api/ops/v0.0.1/ops_client/product/post_products_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package product + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// NewPostProductsParams creates a new PostProductsParams object +// with the default values initialized. +func NewPostProductsParams() *PostProductsParams { + var () + return &PostProductsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostProductsParamsWithTimeout creates a new PostProductsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostProductsParamsWithTimeout(timeout time.Duration) *PostProductsParams { + var () + return &PostProductsParams{ + + timeout: timeout, + } +} + +// NewPostProductsParamsWithContext creates a new PostProductsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostProductsParamsWithContext(ctx context.Context) *PostProductsParams { + var () + return &PostProductsParams{ + + Context: ctx, + } +} + +// NewPostProductsParamsWithHTTPClient creates a new PostProductsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostProductsParamsWithHTTPClient(client *http.Client) *PostProductsParams { + var () + return &PostProductsParams{ + HTTPClient: client, + } +} + +/*PostProductsParams contains all the parameters to send to the API endpoint +for the post products operation typically these are written to a http.Request +*/ +type PostProductsParams struct { + + /*ProductRequest + A request with an array of Product Objects + + */ + ProductRequest *ops_models.ProductRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post products params +func (o *PostProductsParams) WithTimeout(timeout time.Duration) *PostProductsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post products params +func (o *PostProductsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post products params +func (o *PostProductsParams) WithContext(ctx context.Context) *PostProductsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post products params +func (o *PostProductsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post products params +func (o *PostProductsParams) WithHTTPClient(client *http.Client) *PostProductsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post products params +func (o *PostProductsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithProductRequest adds the productRequest to the post products params +func (o *PostProductsParams) WithProductRequest(productRequest *ops_models.ProductRequest) *PostProductsParams { + o.SetProductRequest(productRequest) + return o +} + +// SetProductRequest adds the productRequest to the post products params +func (o *PostProductsParams) SetProductRequest(productRequest *ops_models.ProductRequest) { + o.ProductRequest = productRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostProductsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ProductRequest != nil { + if err := r.SetBodyParam(o.ProductRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/product/post_products_responses.go b/api/ops/v0.0.1/ops_client/product/post_products_responses.go new file mode 100644 index 0000000..60dfe56 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/product/post_products_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package product + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// PostProductsReader is a Reader for the PostProducts structure. +type PostProductsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostProductsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostProductsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostProductsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostProductsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostProductsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostProductsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostProductsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostProductsOK creates a PostProductsOK with default headers values +func NewPostProductsOK() *PostProductsOK { + return &PostProductsOK{} +} + +/*PostProductsOK handles this case with default header values. + +Taxnexus Response with an array of Product objects +*/ +type PostProductsOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *ops_models.ProductResponse +} + +func (o *PostProductsOK) Error() string { + return fmt.Sprintf("[POST /products][%d] postProductsOK %+v", 200, o.Payload) +} + +func (o *PostProductsOK) GetPayload() *ops_models.ProductResponse { + return o.Payload +} + +func (o *PostProductsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(ops_models.ProductResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostProductsUnauthorized creates a PostProductsUnauthorized with default headers values +func NewPostProductsUnauthorized() *PostProductsUnauthorized { + return &PostProductsUnauthorized{} +} + +/*PostProductsUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PostProductsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostProductsUnauthorized) Error() string { + return fmt.Sprintf("[POST /products][%d] postProductsUnauthorized %+v", 401, o.Payload) +} + +func (o *PostProductsUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostProductsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostProductsForbidden creates a PostProductsForbidden with default headers values +func NewPostProductsForbidden() *PostProductsForbidden { + return &PostProductsForbidden{} +} + +/*PostProductsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostProductsForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostProductsForbidden) Error() string { + return fmt.Sprintf("[POST /products][%d] postProductsForbidden %+v", 403, o.Payload) +} + +func (o *PostProductsForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostProductsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostProductsNotFound creates a PostProductsNotFound with default headers values +func NewPostProductsNotFound() *PostProductsNotFound { + return &PostProductsNotFound{} +} + +/*PostProductsNotFound handles this case with default header values. + +Resource was not found +*/ +type PostProductsNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostProductsNotFound) Error() string { + return fmt.Sprintf("[POST /products][%d] postProductsNotFound %+v", 404, o.Payload) +} + +func (o *PostProductsNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostProductsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostProductsUnprocessableEntity creates a PostProductsUnprocessableEntity with default headers values +func NewPostProductsUnprocessableEntity() *PostProductsUnprocessableEntity { + return &PostProductsUnprocessableEntity{} +} + +/*PostProductsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostProductsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostProductsUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /products][%d] postProductsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostProductsUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostProductsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostProductsInternalServerError creates a PostProductsInternalServerError with default headers values +func NewPostProductsInternalServerError() *PostProductsInternalServerError { + return &PostProductsInternalServerError{} +} + +/*PostProductsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostProductsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostProductsInternalServerError) Error() string { + return fmt.Sprintf("[POST /products][%d] postProductsInternalServerError %+v", 500, o.Payload) +} + +func (o *PostProductsInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostProductsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/product/product_client.go b/api/ops/v0.0.1/ops_client/product/product_client.go new file mode 100644 index 0000000..0ac58f9 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/product/product_client.go @@ -0,0 +1,235 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package product + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new product API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for product API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + DeleteProduct(params *DeleteProductParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteProductOK, error) + + GetProducts(params *GetProductsParams, authInfo runtime.ClientAuthInfoWriter) (*GetProductsOK, error) + + GetProductsObservable(params *GetProductsObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetProductsObservableOK, error) + + PostProducts(params *PostProductsParams, authInfo runtime.ClientAuthInfoWriter) (*PostProductsOK, error) + + PutProducts(params *PutProductsParams, authInfo runtime.ClientAuthInfoWriter) (*PutProductsOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + DeleteProduct deletes a product + + Delete Taxnexus Product record +*/ +func (a *Client) DeleteProduct(params *DeleteProductParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteProductOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDeleteProductParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "deleteProduct", + Method: "DELETE", + PathPattern: "/products", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &DeleteProductReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*DeleteProductOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for deleteProduct: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetProducts gets a list of products + + Return a list of all available Products +*/ +func (a *Client) GetProducts(params *GetProductsParams, authInfo runtime.ClientAuthInfoWriter) (*GetProductsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetProductsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getProducts", + Method: "GET", + PathPattern: "/products", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetProductsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetProductsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getProducts: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetProductsObservable gets a list of products + + Return a simplified list of all available Products +*/ +func (a *Client) GetProductsObservable(params *GetProductsObservableParams, authInfo runtime.ClientAuthInfoWriter) (*GetProductsObservableOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetProductsObservableParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getProductsObservable", + Method: "GET", + PathPattern: "/products/observable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetProductsObservableReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetProductsObservableOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getProductsObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostProducts adds new products + + Product records to be added +*/ +func (a *Client) PostProducts(params *PostProductsParams, authInfo runtime.ClientAuthInfoWriter) (*PostProductsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostProductsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postProducts", + Method: "POST", + PathPattern: "/products", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostProductsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostProductsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postProducts: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PutProducts updates products + + Update Product records +*/ +func (a *Client) PutProducts(params *PutProductsParams, authInfo runtime.ClientAuthInfoWriter) (*PutProductsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPutProductsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "putProducts", + Method: "PUT", + PathPattern: "/products", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PutProductsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PutProductsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for putProducts: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/ops/v0.0.1/ops_client/product/put_products_parameters.go b/api/ops/v0.0.1/ops_client/product/put_products_parameters.go new file mode 100644 index 0000000..aecd505 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/product/put_products_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package product + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// NewPutProductsParams creates a new PutProductsParams object +// with the default values initialized. +func NewPutProductsParams() *PutProductsParams { + var () + return &PutProductsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPutProductsParamsWithTimeout creates a new PutProductsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPutProductsParamsWithTimeout(timeout time.Duration) *PutProductsParams { + var () + return &PutProductsParams{ + + timeout: timeout, + } +} + +// NewPutProductsParamsWithContext creates a new PutProductsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPutProductsParamsWithContext(ctx context.Context) *PutProductsParams { + var () + return &PutProductsParams{ + + Context: ctx, + } +} + +// NewPutProductsParamsWithHTTPClient creates a new PutProductsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPutProductsParamsWithHTTPClient(client *http.Client) *PutProductsParams { + var () + return &PutProductsParams{ + HTTPClient: client, + } +} + +/*PutProductsParams contains all the parameters to send to the API endpoint +for the put products operation typically these are written to a http.Request +*/ +type PutProductsParams struct { + + /*ProductRequest + A request with an array of Product Objects + + */ + ProductRequest *ops_models.ProductRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the put products params +func (o *PutProductsParams) WithTimeout(timeout time.Duration) *PutProductsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the put products params +func (o *PutProductsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the put products params +func (o *PutProductsParams) WithContext(ctx context.Context) *PutProductsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the put products params +func (o *PutProductsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the put products params +func (o *PutProductsParams) WithHTTPClient(client *http.Client) *PutProductsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the put products params +func (o *PutProductsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithProductRequest adds the productRequest to the put products params +func (o *PutProductsParams) WithProductRequest(productRequest *ops_models.ProductRequest) *PutProductsParams { + o.SetProductRequest(productRequest) + return o +} + +// SetProductRequest adds the productRequest to the put products params +func (o *PutProductsParams) SetProductRequest(productRequest *ops_models.ProductRequest) { + o.ProductRequest = productRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PutProductsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ProductRequest != nil { + if err := r.SetBodyParam(o.ProductRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/product/put_products_responses.go b/api/ops/v0.0.1/ops_client/product/put_products_responses.go new file mode 100644 index 0000000..ded87f1 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/product/put_products_responses.go @@ -0,0 +1,298 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package product + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// PutProductsReader is a Reader for the PutProducts structure. +type PutProductsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PutProductsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPutProductsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPutProductsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPutProductsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPutProductsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPutProductsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPutProductsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPutProductsOK creates a PutProductsOK with default headers values +func NewPutProductsOK() *PutProductsOK { + return &PutProductsOK{} +} + +/*PutProductsOK handles this case with default header values. + +Taxnexus Response with an array of Message objects in response to a PUT +*/ +type PutProductsOK struct { + AccessControlAllowOrigin string + + Payload *ops_models.PutResponse +} + +func (o *PutProductsOK) Error() string { + return fmt.Sprintf("[PUT /products][%d] putProductsOK %+v", 200, o.Payload) +} + +func (o *PutProductsOK) GetPayload() *ops_models.PutResponse { + return o.Payload +} + +func (o *PutProductsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.PutResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutProductsUnauthorized creates a PutProductsUnauthorized with default headers values +func NewPutProductsUnauthorized() *PutProductsUnauthorized { + return &PutProductsUnauthorized{} +} + +/*PutProductsUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PutProductsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutProductsUnauthorized) Error() string { + return fmt.Sprintf("[PUT /products][%d] putProductsUnauthorized %+v", 401, o.Payload) +} + +func (o *PutProductsUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutProductsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutProductsForbidden creates a PutProductsForbidden with default headers values +func NewPutProductsForbidden() *PutProductsForbidden { + return &PutProductsForbidden{} +} + +/*PutProductsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PutProductsForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutProductsForbidden) Error() string { + return fmt.Sprintf("[PUT /products][%d] putProductsForbidden %+v", 403, o.Payload) +} + +func (o *PutProductsForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutProductsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutProductsNotFound creates a PutProductsNotFound with default headers values +func NewPutProductsNotFound() *PutProductsNotFound { + return &PutProductsNotFound{} +} + +/*PutProductsNotFound handles this case with default header values. + +Resource was not found +*/ +type PutProductsNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutProductsNotFound) Error() string { + return fmt.Sprintf("[PUT /products][%d] putProductsNotFound %+v", 404, o.Payload) +} + +func (o *PutProductsNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutProductsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutProductsUnprocessableEntity creates a PutProductsUnprocessableEntity with default headers values +func NewPutProductsUnprocessableEntity() *PutProductsUnprocessableEntity { + return &PutProductsUnprocessableEntity{} +} + +/*PutProductsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PutProductsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutProductsUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /products][%d] putProductsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutProductsUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutProductsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutProductsInternalServerError creates a PutProductsInternalServerError with default headers values +func NewPutProductsInternalServerError() *PutProductsInternalServerError { + return &PutProductsInternalServerError{} +} + +/*PutProductsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PutProductsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutProductsInternalServerError) Error() string { + return fmt.Sprintf("[PUT /products][%d] putProductsInternalServerError %+v", 500, o.Payload) +} + +func (o *PutProductsInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutProductsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/purchase_order/delete_purchase_order_parameters.go b/api/ops/v0.0.1/ops_client/purchase_order/delete_purchase_order_parameters.go new file mode 100644 index 0000000..6bd32f6 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/purchase_order/delete_purchase_order_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package purchase_order + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewDeletePurchaseOrderParams creates a new DeletePurchaseOrderParams object +// with the default values initialized. +func NewDeletePurchaseOrderParams() *DeletePurchaseOrderParams { + var () + return &DeletePurchaseOrderParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewDeletePurchaseOrderParamsWithTimeout creates a new DeletePurchaseOrderParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewDeletePurchaseOrderParamsWithTimeout(timeout time.Duration) *DeletePurchaseOrderParams { + var () + return &DeletePurchaseOrderParams{ + + timeout: timeout, + } +} + +// NewDeletePurchaseOrderParamsWithContext creates a new DeletePurchaseOrderParams object +// with the default values initialized, and the ability to set a context for a request +func NewDeletePurchaseOrderParamsWithContext(ctx context.Context) *DeletePurchaseOrderParams { + var () + return &DeletePurchaseOrderParams{ + + Context: ctx, + } +} + +// NewDeletePurchaseOrderParamsWithHTTPClient creates a new DeletePurchaseOrderParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewDeletePurchaseOrderParamsWithHTTPClient(client *http.Client) *DeletePurchaseOrderParams { + var () + return &DeletePurchaseOrderParams{ + HTTPClient: client, + } +} + +/*DeletePurchaseOrderParams contains all the parameters to send to the API endpoint +for the delete purchase order operation typically these are written to a http.Request +*/ +type DeletePurchaseOrderParams struct { + + /*ID + Taxnexus Id of the record to be retrieved + + */ + ID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the delete purchase order params +func (o *DeletePurchaseOrderParams) WithTimeout(timeout time.Duration) *DeletePurchaseOrderParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the delete purchase order params +func (o *DeletePurchaseOrderParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the delete purchase order params +func (o *DeletePurchaseOrderParams) WithContext(ctx context.Context) *DeletePurchaseOrderParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the delete purchase order params +func (o *DeletePurchaseOrderParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the delete purchase order params +func (o *DeletePurchaseOrderParams) WithHTTPClient(client *http.Client) *DeletePurchaseOrderParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the delete purchase order params +func (o *DeletePurchaseOrderParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the delete purchase order params +func (o *DeletePurchaseOrderParams) WithID(id *string) *DeletePurchaseOrderParams { + o.SetID(id) + return o +} + +// SetID adds the id to the delete purchase order params +func (o *DeletePurchaseOrderParams) SetID(id *string) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DeletePurchaseOrderParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ID != nil { + + // query param id + var qrID string + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/purchase_order/delete_purchase_order_responses.go b/api/ops/v0.0.1/ops_client/purchase_order/delete_purchase_order_responses.go new file mode 100644 index 0000000..5a49d88 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/purchase_order/delete_purchase_order_responses.go @@ -0,0 +1,298 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package purchase_order + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// DeletePurchaseOrderReader is a Reader for the DeletePurchaseOrder structure. +type DeletePurchaseOrderReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DeletePurchaseOrderReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDeletePurchaseOrderOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewDeletePurchaseOrderUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewDeletePurchaseOrderForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewDeletePurchaseOrderNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewDeletePurchaseOrderUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewDeletePurchaseOrderInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewDeletePurchaseOrderOK creates a DeletePurchaseOrderOK with default headers values +func NewDeletePurchaseOrderOK() *DeletePurchaseOrderOK { + return &DeletePurchaseOrderOK{} +} + +/*DeletePurchaseOrderOK handles this case with default header values. + +Taxnexus Response with Message Objects with Delete Status +*/ +type DeletePurchaseOrderOK struct { + AccessControlAllowOrigin string + + Payload *ops_models.DeleteResponse +} + +func (o *DeletePurchaseOrderOK) Error() string { + return fmt.Sprintf("[DELETE /pos][%d] deletePurchaseOrderOK %+v", 200, o.Payload) +} + +func (o *DeletePurchaseOrderOK) GetPayload() *ops_models.DeleteResponse { + return o.Payload +} + +func (o *DeletePurchaseOrderOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.DeleteResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeletePurchaseOrderUnauthorized creates a DeletePurchaseOrderUnauthorized with default headers values +func NewDeletePurchaseOrderUnauthorized() *DeletePurchaseOrderUnauthorized { + return &DeletePurchaseOrderUnauthorized{} +} + +/*DeletePurchaseOrderUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type DeletePurchaseOrderUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeletePurchaseOrderUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /pos][%d] deletePurchaseOrderUnauthorized %+v", 401, o.Payload) +} + +func (o *DeletePurchaseOrderUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeletePurchaseOrderUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeletePurchaseOrderForbidden creates a DeletePurchaseOrderForbidden with default headers values +func NewDeletePurchaseOrderForbidden() *DeletePurchaseOrderForbidden { + return &DeletePurchaseOrderForbidden{} +} + +/*DeletePurchaseOrderForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type DeletePurchaseOrderForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeletePurchaseOrderForbidden) Error() string { + return fmt.Sprintf("[DELETE /pos][%d] deletePurchaseOrderForbidden %+v", 403, o.Payload) +} + +func (o *DeletePurchaseOrderForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeletePurchaseOrderForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeletePurchaseOrderNotFound creates a DeletePurchaseOrderNotFound with default headers values +func NewDeletePurchaseOrderNotFound() *DeletePurchaseOrderNotFound { + return &DeletePurchaseOrderNotFound{} +} + +/*DeletePurchaseOrderNotFound handles this case with default header values. + +Resource was not found +*/ +type DeletePurchaseOrderNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeletePurchaseOrderNotFound) Error() string { + return fmt.Sprintf("[DELETE /pos][%d] deletePurchaseOrderNotFound %+v", 404, o.Payload) +} + +func (o *DeletePurchaseOrderNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeletePurchaseOrderNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeletePurchaseOrderUnprocessableEntity creates a DeletePurchaseOrderUnprocessableEntity with default headers values +func NewDeletePurchaseOrderUnprocessableEntity() *DeletePurchaseOrderUnprocessableEntity { + return &DeletePurchaseOrderUnprocessableEntity{} +} + +/*DeletePurchaseOrderUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type DeletePurchaseOrderUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeletePurchaseOrderUnprocessableEntity) Error() string { + return fmt.Sprintf("[DELETE /pos][%d] deletePurchaseOrderUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *DeletePurchaseOrderUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeletePurchaseOrderUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeletePurchaseOrderInternalServerError creates a DeletePurchaseOrderInternalServerError with default headers values +func NewDeletePurchaseOrderInternalServerError() *DeletePurchaseOrderInternalServerError { + return &DeletePurchaseOrderInternalServerError{} +} + +/*DeletePurchaseOrderInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type DeletePurchaseOrderInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeletePurchaseOrderInternalServerError) Error() string { + return fmt.Sprintf("[DELETE /pos][%d] deletePurchaseOrderInternalServerError %+v", 500, o.Payload) +} + +func (o *DeletePurchaseOrderInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeletePurchaseOrderInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/purchase_order/get_purchase_orders_parameters.go b/api/ops/v0.0.1/ops_client/purchase_order/get_purchase_orders_parameters.go new file mode 100644 index 0000000..78b7416 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/purchase_order/get_purchase_orders_parameters.go @@ -0,0 +1,215 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package purchase_order + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetPurchaseOrdersParams creates a new GetPurchaseOrdersParams object +// with the default values initialized. +func NewGetPurchaseOrdersParams() *GetPurchaseOrdersParams { + var () + return &GetPurchaseOrdersParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetPurchaseOrdersParamsWithTimeout creates a new GetPurchaseOrdersParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetPurchaseOrdersParamsWithTimeout(timeout time.Duration) *GetPurchaseOrdersParams { + var () + return &GetPurchaseOrdersParams{ + + timeout: timeout, + } +} + +// NewGetPurchaseOrdersParamsWithContext creates a new GetPurchaseOrdersParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetPurchaseOrdersParamsWithContext(ctx context.Context) *GetPurchaseOrdersParams { + var () + return &GetPurchaseOrdersParams{ + + Context: ctx, + } +} + +// NewGetPurchaseOrdersParamsWithHTTPClient creates a new GetPurchaseOrdersParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetPurchaseOrdersParamsWithHTTPClient(client *http.Client) *GetPurchaseOrdersParams { + var () + return &GetPurchaseOrdersParams{ + HTTPClient: client, + } +} + +/*GetPurchaseOrdersParams contains all the parameters to send to the API endpoint +for the get purchase orders operation typically these are written to a http.Request +*/ +type GetPurchaseOrdersParams struct { + + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + /*PurchaseOrderID + Taxnexus Record Id of a Company + + */ + PurchaseOrderID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get purchase orders params +func (o *GetPurchaseOrdersParams) WithTimeout(timeout time.Duration) *GetPurchaseOrdersParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get purchase orders params +func (o *GetPurchaseOrdersParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get purchase orders params +func (o *GetPurchaseOrdersParams) WithContext(ctx context.Context) *GetPurchaseOrdersParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get purchase orders params +func (o *GetPurchaseOrdersParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get purchase orders params +func (o *GetPurchaseOrdersParams) WithHTTPClient(client *http.Client) *GetPurchaseOrdersParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get purchase orders params +func (o *GetPurchaseOrdersParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithLimit adds the limit to the get purchase orders params +func (o *GetPurchaseOrdersParams) WithLimit(limit *int64) *GetPurchaseOrdersParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get purchase orders params +func (o *GetPurchaseOrdersParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get purchase orders params +func (o *GetPurchaseOrdersParams) WithOffset(offset *int64) *GetPurchaseOrdersParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get purchase orders params +func (o *GetPurchaseOrdersParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithPurchaseOrderID adds the purchaseOrderID to the get purchase orders params +func (o *GetPurchaseOrdersParams) WithPurchaseOrderID(purchaseOrderID *string) *GetPurchaseOrdersParams { + o.SetPurchaseOrderID(purchaseOrderID) + return o +} + +// SetPurchaseOrderID adds the purchaseOrderId to the get purchase orders params +func (o *GetPurchaseOrdersParams) SetPurchaseOrderID(purchaseOrderID *string) { + o.PurchaseOrderID = purchaseOrderID +} + +// WriteToRequest writes these params to a swagger request +func (o *GetPurchaseOrdersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.PurchaseOrderID != nil { + + // query param purchaseOrderId + var qrPurchaseOrderID string + if o.PurchaseOrderID != nil { + qrPurchaseOrderID = *o.PurchaseOrderID + } + qPurchaseOrderID := qrPurchaseOrderID + if qPurchaseOrderID != "" { + if err := r.SetQueryParam("purchaseOrderId", qPurchaseOrderID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/purchase_order/get_purchase_orders_responses.go b/api/ops/v0.0.1/ops_client/purchase_order/get_purchase_orders_responses.go new file mode 100644 index 0000000..a544e08 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/purchase_order/get_purchase_orders_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package purchase_order + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// GetPurchaseOrdersReader is a Reader for the GetPurchaseOrders structure. +type GetPurchaseOrdersReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetPurchaseOrdersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetPurchaseOrdersOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetPurchaseOrdersUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetPurchaseOrdersForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetPurchaseOrdersNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetPurchaseOrdersUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetPurchaseOrdersInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetPurchaseOrdersOK creates a GetPurchaseOrdersOK with default headers values +func NewGetPurchaseOrdersOK() *GetPurchaseOrdersOK { + return &GetPurchaseOrdersOK{} +} + +/*GetPurchaseOrdersOK handles this case with default header values. + +Taxnexus Response with an array of Purchase Order objects +*/ +type GetPurchaseOrdersOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *ops_models.PurchaseOrderResponse +} + +func (o *GetPurchaseOrdersOK) Error() string { + return fmt.Sprintf("[GET /pos][%d] getPurchaseOrdersOK %+v", 200, o.Payload) +} + +func (o *GetPurchaseOrdersOK) GetPayload() *ops_models.PurchaseOrderResponse { + return o.Payload +} + +func (o *GetPurchaseOrdersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(ops_models.PurchaseOrderResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetPurchaseOrdersUnauthorized creates a GetPurchaseOrdersUnauthorized with default headers values +func NewGetPurchaseOrdersUnauthorized() *GetPurchaseOrdersUnauthorized { + return &GetPurchaseOrdersUnauthorized{} +} + +/*GetPurchaseOrdersUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetPurchaseOrdersUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetPurchaseOrdersUnauthorized) Error() string { + return fmt.Sprintf("[GET /pos][%d] getPurchaseOrdersUnauthorized %+v", 401, o.Payload) +} + +func (o *GetPurchaseOrdersUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetPurchaseOrdersUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetPurchaseOrdersForbidden creates a GetPurchaseOrdersForbidden with default headers values +func NewGetPurchaseOrdersForbidden() *GetPurchaseOrdersForbidden { + return &GetPurchaseOrdersForbidden{} +} + +/*GetPurchaseOrdersForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetPurchaseOrdersForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetPurchaseOrdersForbidden) Error() string { + return fmt.Sprintf("[GET /pos][%d] getPurchaseOrdersForbidden %+v", 403, o.Payload) +} + +func (o *GetPurchaseOrdersForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetPurchaseOrdersForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetPurchaseOrdersNotFound creates a GetPurchaseOrdersNotFound with default headers values +func NewGetPurchaseOrdersNotFound() *GetPurchaseOrdersNotFound { + return &GetPurchaseOrdersNotFound{} +} + +/*GetPurchaseOrdersNotFound handles this case with default header values. + +Resource was not found +*/ +type GetPurchaseOrdersNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetPurchaseOrdersNotFound) Error() string { + return fmt.Sprintf("[GET /pos][%d] getPurchaseOrdersNotFound %+v", 404, o.Payload) +} + +func (o *GetPurchaseOrdersNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetPurchaseOrdersNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetPurchaseOrdersUnprocessableEntity creates a GetPurchaseOrdersUnprocessableEntity with default headers values +func NewGetPurchaseOrdersUnprocessableEntity() *GetPurchaseOrdersUnprocessableEntity { + return &GetPurchaseOrdersUnprocessableEntity{} +} + +/*GetPurchaseOrdersUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetPurchaseOrdersUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetPurchaseOrdersUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /pos][%d] getPurchaseOrdersUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetPurchaseOrdersUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetPurchaseOrdersUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetPurchaseOrdersInternalServerError creates a GetPurchaseOrdersInternalServerError with default headers values +func NewGetPurchaseOrdersInternalServerError() *GetPurchaseOrdersInternalServerError { + return &GetPurchaseOrdersInternalServerError{} +} + +/*GetPurchaseOrdersInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetPurchaseOrdersInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetPurchaseOrdersInternalServerError) Error() string { + return fmt.Sprintf("[GET /pos][%d] getPurchaseOrdersInternalServerError %+v", 500, o.Payload) +} + +func (o *GetPurchaseOrdersInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetPurchaseOrdersInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/purchase_order/post_purchase_orders_parameters.go b/api/ops/v0.0.1/ops_client/purchase_order/post_purchase_orders_parameters.go new file mode 100644 index 0000000..0b35f97 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/purchase_order/post_purchase_orders_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package purchase_order + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// NewPostPurchaseOrdersParams creates a new PostPurchaseOrdersParams object +// with the default values initialized. +func NewPostPurchaseOrdersParams() *PostPurchaseOrdersParams { + var () + return &PostPurchaseOrdersParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostPurchaseOrdersParamsWithTimeout creates a new PostPurchaseOrdersParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostPurchaseOrdersParamsWithTimeout(timeout time.Duration) *PostPurchaseOrdersParams { + var () + return &PostPurchaseOrdersParams{ + + timeout: timeout, + } +} + +// NewPostPurchaseOrdersParamsWithContext creates a new PostPurchaseOrdersParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostPurchaseOrdersParamsWithContext(ctx context.Context) *PostPurchaseOrdersParams { + var () + return &PostPurchaseOrdersParams{ + + Context: ctx, + } +} + +// NewPostPurchaseOrdersParamsWithHTTPClient creates a new PostPurchaseOrdersParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostPurchaseOrdersParamsWithHTTPClient(client *http.Client) *PostPurchaseOrdersParams { + var () + return &PostPurchaseOrdersParams{ + HTTPClient: client, + } +} + +/*PostPurchaseOrdersParams contains all the parameters to send to the API endpoint +for the post purchase orders operation typically these are written to a http.Request +*/ +type PostPurchaseOrdersParams struct { + + /*PurchaseOrderRequest + A request with an array of Purchase Order Objects + + */ + PurchaseOrderRequest *ops_models.PurchaseOrderRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post purchase orders params +func (o *PostPurchaseOrdersParams) WithTimeout(timeout time.Duration) *PostPurchaseOrdersParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post purchase orders params +func (o *PostPurchaseOrdersParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post purchase orders params +func (o *PostPurchaseOrdersParams) WithContext(ctx context.Context) *PostPurchaseOrdersParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post purchase orders params +func (o *PostPurchaseOrdersParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post purchase orders params +func (o *PostPurchaseOrdersParams) WithHTTPClient(client *http.Client) *PostPurchaseOrdersParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post purchase orders params +func (o *PostPurchaseOrdersParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPurchaseOrderRequest adds the purchaseOrderRequest to the post purchase orders params +func (o *PostPurchaseOrdersParams) WithPurchaseOrderRequest(purchaseOrderRequest *ops_models.PurchaseOrderRequest) *PostPurchaseOrdersParams { + o.SetPurchaseOrderRequest(purchaseOrderRequest) + return o +} + +// SetPurchaseOrderRequest adds the purchaseOrderRequest to the post purchase orders params +func (o *PostPurchaseOrdersParams) SetPurchaseOrderRequest(purchaseOrderRequest *ops_models.PurchaseOrderRequest) { + o.PurchaseOrderRequest = purchaseOrderRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostPurchaseOrdersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.PurchaseOrderRequest != nil { + if err := r.SetBodyParam(o.PurchaseOrderRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/purchase_order/post_purchase_orders_responses.go b/api/ops/v0.0.1/ops_client/purchase_order/post_purchase_orders_responses.go new file mode 100644 index 0000000..00e7517 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/purchase_order/post_purchase_orders_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package purchase_order + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// PostPurchaseOrdersReader is a Reader for the PostPurchaseOrders structure. +type PostPurchaseOrdersReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostPurchaseOrdersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostPurchaseOrdersOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostPurchaseOrdersUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostPurchaseOrdersForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostPurchaseOrdersNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostPurchaseOrdersUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostPurchaseOrdersInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostPurchaseOrdersOK creates a PostPurchaseOrdersOK with default headers values +func NewPostPurchaseOrdersOK() *PostPurchaseOrdersOK { + return &PostPurchaseOrdersOK{} +} + +/*PostPurchaseOrdersOK handles this case with default header values. + +Taxnexus Response with an array of Purchase Order objects +*/ +type PostPurchaseOrdersOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *ops_models.PurchaseOrderResponse +} + +func (o *PostPurchaseOrdersOK) Error() string { + return fmt.Sprintf("[POST /pos][%d] postPurchaseOrdersOK %+v", 200, o.Payload) +} + +func (o *PostPurchaseOrdersOK) GetPayload() *ops_models.PurchaseOrderResponse { + return o.Payload +} + +func (o *PostPurchaseOrdersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(ops_models.PurchaseOrderResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPurchaseOrdersUnauthorized creates a PostPurchaseOrdersUnauthorized with default headers values +func NewPostPurchaseOrdersUnauthorized() *PostPurchaseOrdersUnauthorized { + return &PostPurchaseOrdersUnauthorized{} +} + +/*PostPurchaseOrdersUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PostPurchaseOrdersUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostPurchaseOrdersUnauthorized) Error() string { + return fmt.Sprintf("[POST /pos][%d] postPurchaseOrdersUnauthorized %+v", 401, o.Payload) +} + +func (o *PostPurchaseOrdersUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostPurchaseOrdersUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPurchaseOrdersForbidden creates a PostPurchaseOrdersForbidden with default headers values +func NewPostPurchaseOrdersForbidden() *PostPurchaseOrdersForbidden { + return &PostPurchaseOrdersForbidden{} +} + +/*PostPurchaseOrdersForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostPurchaseOrdersForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostPurchaseOrdersForbidden) Error() string { + return fmt.Sprintf("[POST /pos][%d] postPurchaseOrdersForbidden %+v", 403, o.Payload) +} + +func (o *PostPurchaseOrdersForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostPurchaseOrdersForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPurchaseOrdersNotFound creates a PostPurchaseOrdersNotFound with default headers values +func NewPostPurchaseOrdersNotFound() *PostPurchaseOrdersNotFound { + return &PostPurchaseOrdersNotFound{} +} + +/*PostPurchaseOrdersNotFound handles this case with default header values. + +Resource was not found +*/ +type PostPurchaseOrdersNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostPurchaseOrdersNotFound) Error() string { + return fmt.Sprintf("[POST /pos][%d] postPurchaseOrdersNotFound %+v", 404, o.Payload) +} + +func (o *PostPurchaseOrdersNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostPurchaseOrdersNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPurchaseOrdersUnprocessableEntity creates a PostPurchaseOrdersUnprocessableEntity with default headers values +func NewPostPurchaseOrdersUnprocessableEntity() *PostPurchaseOrdersUnprocessableEntity { + return &PostPurchaseOrdersUnprocessableEntity{} +} + +/*PostPurchaseOrdersUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostPurchaseOrdersUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostPurchaseOrdersUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /pos][%d] postPurchaseOrdersUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostPurchaseOrdersUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostPurchaseOrdersUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPurchaseOrdersInternalServerError creates a PostPurchaseOrdersInternalServerError with default headers values +func NewPostPurchaseOrdersInternalServerError() *PostPurchaseOrdersInternalServerError { + return &PostPurchaseOrdersInternalServerError{} +} + +/*PostPurchaseOrdersInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostPurchaseOrdersInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostPurchaseOrdersInternalServerError) Error() string { + return fmt.Sprintf("[POST /pos][%d] postPurchaseOrdersInternalServerError %+v", 500, o.Payload) +} + +func (o *PostPurchaseOrdersInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostPurchaseOrdersInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/purchase_order/purchase_order_client.go b/api/ops/v0.0.1/ops_client/purchase_order/purchase_order_client.go new file mode 100644 index 0000000..2825b1d --- /dev/null +++ b/api/ops/v0.0.1/ops_client/purchase_order/purchase_order_client.go @@ -0,0 +1,196 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package purchase_order + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new purchase order API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for purchase order API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + DeletePurchaseOrder(params *DeletePurchaseOrderParams, authInfo runtime.ClientAuthInfoWriter) (*DeletePurchaseOrderOK, error) + + GetPurchaseOrders(params *GetPurchaseOrdersParams, authInfo runtime.ClientAuthInfoWriter) (*GetPurchaseOrdersOK, error) + + PostPurchaseOrders(params *PostPurchaseOrdersParams, authInfo runtime.ClientAuthInfoWriter) (*PostPurchaseOrdersOK, error) + + PutPurchaseOrders(params *PutPurchaseOrdersParams, authInfo runtime.ClientAuthInfoWriter) (*PutPurchaseOrdersOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + DeletePurchaseOrder deletes a p o + + Delete a PO by ID +*/ +func (a *Client) DeletePurchaseOrder(params *DeletePurchaseOrderParams, authInfo runtime.ClientAuthInfoWriter) (*DeletePurchaseOrderOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDeletePurchaseOrderParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "deletePurchaseOrder", + Method: "DELETE", + PathPattern: "/pos", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &DeletePurchaseOrderReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*DeletePurchaseOrderOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for deletePurchaseOrder: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetPurchaseOrders gets a list of purchase orders + + Return a list of available Purchase Orders +*/ +func (a *Client) GetPurchaseOrders(params *GetPurchaseOrdersParams, authInfo runtime.ClientAuthInfoWriter) (*GetPurchaseOrdersOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetPurchaseOrdersParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getPurchaseOrders", + Method: "GET", + PathPattern: "/pos", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetPurchaseOrdersReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetPurchaseOrdersOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getPurchaseOrders: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostPurchaseOrders creates a new purchase order + + Create New Purchase Order +*/ +func (a *Client) PostPurchaseOrders(params *PostPurchaseOrdersParams, authInfo runtime.ClientAuthInfoWriter) (*PostPurchaseOrdersOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostPurchaseOrdersParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postPurchaseOrders", + Method: "POST", + PathPattern: "/pos", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostPurchaseOrdersReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostPurchaseOrdersOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postPurchaseOrders: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PutPurchaseOrders upserts a list of purchase order + + Upsert a list of Purchase Order +*/ +func (a *Client) PutPurchaseOrders(params *PutPurchaseOrdersParams, authInfo runtime.ClientAuthInfoWriter) (*PutPurchaseOrdersOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPutPurchaseOrdersParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "putPurchaseOrders", + Method: "PUT", + PathPattern: "/pos", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PutPurchaseOrdersReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PutPurchaseOrdersOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for putPurchaseOrders: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/ops/v0.0.1/ops_client/purchase_order/put_purchase_orders_parameters.go b/api/ops/v0.0.1/ops_client/purchase_order/put_purchase_orders_parameters.go new file mode 100644 index 0000000..b776f80 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/purchase_order/put_purchase_orders_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package purchase_order + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// NewPutPurchaseOrdersParams creates a new PutPurchaseOrdersParams object +// with the default values initialized. +func NewPutPurchaseOrdersParams() *PutPurchaseOrdersParams { + var () + return &PutPurchaseOrdersParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPutPurchaseOrdersParamsWithTimeout creates a new PutPurchaseOrdersParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPutPurchaseOrdersParamsWithTimeout(timeout time.Duration) *PutPurchaseOrdersParams { + var () + return &PutPurchaseOrdersParams{ + + timeout: timeout, + } +} + +// NewPutPurchaseOrdersParamsWithContext creates a new PutPurchaseOrdersParams object +// with the default values initialized, and the ability to set a context for a request +func NewPutPurchaseOrdersParamsWithContext(ctx context.Context) *PutPurchaseOrdersParams { + var () + return &PutPurchaseOrdersParams{ + + Context: ctx, + } +} + +// NewPutPurchaseOrdersParamsWithHTTPClient creates a new PutPurchaseOrdersParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPutPurchaseOrdersParamsWithHTTPClient(client *http.Client) *PutPurchaseOrdersParams { + var () + return &PutPurchaseOrdersParams{ + HTTPClient: client, + } +} + +/*PutPurchaseOrdersParams contains all the parameters to send to the API endpoint +for the put purchase orders operation typically these are written to a http.Request +*/ +type PutPurchaseOrdersParams struct { + + /*PurchaseOrderRequest + A request with an array of Purchase Order Objects + + */ + PurchaseOrderRequest *ops_models.PurchaseOrderRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the put purchase orders params +func (o *PutPurchaseOrdersParams) WithTimeout(timeout time.Duration) *PutPurchaseOrdersParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the put purchase orders params +func (o *PutPurchaseOrdersParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the put purchase orders params +func (o *PutPurchaseOrdersParams) WithContext(ctx context.Context) *PutPurchaseOrdersParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the put purchase orders params +func (o *PutPurchaseOrdersParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the put purchase orders params +func (o *PutPurchaseOrdersParams) WithHTTPClient(client *http.Client) *PutPurchaseOrdersParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the put purchase orders params +func (o *PutPurchaseOrdersParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPurchaseOrderRequest adds the purchaseOrderRequest to the put purchase orders params +func (o *PutPurchaseOrdersParams) WithPurchaseOrderRequest(purchaseOrderRequest *ops_models.PurchaseOrderRequest) *PutPurchaseOrdersParams { + o.SetPurchaseOrderRequest(purchaseOrderRequest) + return o +} + +// SetPurchaseOrderRequest adds the purchaseOrderRequest to the put purchase orders params +func (o *PutPurchaseOrdersParams) SetPurchaseOrderRequest(purchaseOrderRequest *ops_models.PurchaseOrderRequest) { + o.PurchaseOrderRequest = purchaseOrderRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PutPurchaseOrdersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.PurchaseOrderRequest != nil { + if err := r.SetBodyParam(o.PurchaseOrderRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/purchase_order/put_purchase_orders_responses.go b/api/ops/v0.0.1/ops_client/purchase_order/put_purchase_orders_responses.go new file mode 100644 index 0000000..1d71aea --- /dev/null +++ b/api/ops/v0.0.1/ops_client/purchase_order/put_purchase_orders_responses.go @@ -0,0 +1,298 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package purchase_order + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// PutPurchaseOrdersReader is a Reader for the PutPurchaseOrders structure. +type PutPurchaseOrdersReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PutPurchaseOrdersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPutPurchaseOrdersOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPutPurchaseOrdersUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPutPurchaseOrdersForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPutPurchaseOrdersNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPutPurchaseOrdersUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPutPurchaseOrdersInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPutPurchaseOrdersOK creates a PutPurchaseOrdersOK with default headers values +func NewPutPurchaseOrdersOK() *PutPurchaseOrdersOK { + return &PutPurchaseOrdersOK{} +} + +/*PutPurchaseOrdersOK handles this case with default header values. + +Taxnexus Response with an array of Message objects in response to a PUT +*/ +type PutPurchaseOrdersOK struct { + AccessControlAllowOrigin string + + Payload *ops_models.PutResponse +} + +func (o *PutPurchaseOrdersOK) Error() string { + return fmt.Sprintf("[PUT /pos][%d] putPurchaseOrdersOK %+v", 200, o.Payload) +} + +func (o *PutPurchaseOrdersOK) GetPayload() *ops_models.PutResponse { + return o.Payload +} + +func (o *PutPurchaseOrdersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.PutResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutPurchaseOrdersUnauthorized creates a PutPurchaseOrdersUnauthorized with default headers values +func NewPutPurchaseOrdersUnauthorized() *PutPurchaseOrdersUnauthorized { + return &PutPurchaseOrdersUnauthorized{} +} + +/*PutPurchaseOrdersUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PutPurchaseOrdersUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutPurchaseOrdersUnauthorized) Error() string { + return fmt.Sprintf("[PUT /pos][%d] putPurchaseOrdersUnauthorized %+v", 401, o.Payload) +} + +func (o *PutPurchaseOrdersUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutPurchaseOrdersUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutPurchaseOrdersForbidden creates a PutPurchaseOrdersForbidden with default headers values +func NewPutPurchaseOrdersForbidden() *PutPurchaseOrdersForbidden { + return &PutPurchaseOrdersForbidden{} +} + +/*PutPurchaseOrdersForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PutPurchaseOrdersForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutPurchaseOrdersForbidden) Error() string { + return fmt.Sprintf("[PUT /pos][%d] putPurchaseOrdersForbidden %+v", 403, o.Payload) +} + +func (o *PutPurchaseOrdersForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutPurchaseOrdersForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutPurchaseOrdersNotFound creates a PutPurchaseOrdersNotFound with default headers values +func NewPutPurchaseOrdersNotFound() *PutPurchaseOrdersNotFound { + return &PutPurchaseOrdersNotFound{} +} + +/*PutPurchaseOrdersNotFound handles this case with default header values. + +Resource was not found +*/ +type PutPurchaseOrdersNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutPurchaseOrdersNotFound) Error() string { + return fmt.Sprintf("[PUT /pos][%d] putPurchaseOrdersNotFound %+v", 404, o.Payload) +} + +func (o *PutPurchaseOrdersNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutPurchaseOrdersNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutPurchaseOrdersUnprocessableEntity creates a PutPurchaseOrdersUnprocessableEntity with default headers values +func NewPutPurchaseOrdersUnprocessableEntity() *PutPurchaseOrdersUnprocessableEntity { + return &PutPurchaseOrdersUnprocessableEntity{} +} + +/*PutPurchaseOrdersUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PutPurchaseOrdersUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutPurchaseOrdersUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /pos][%d] putPurchaseOrdersUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutPurchaseOrdersUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutPurchaseOrdersUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutPurchaseOrdersInternalServerError creates a PutPurchaseOrdersInternalServerError with default headers values +func NewPutPurchaseOrdersInternalServerError() *PutPurchaseOrdersInternalServerError { + return &PutPurchaseOrdersInternalServerError{} +} + +/*PutPurchaseOrdersInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PutPurchaseOrdersInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutPurchaseOrdersInternalServerError) Error() string { + return fmt.Sprintf("[PUT /pos][%d] putPurchaseOrdersInternalServerError %+v", 500, o.Payload) +} + +func (o *PutPurchaseOrdersInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutPurchaseOrdersInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/quote/delete_quote_parameters.go b/api/ops/v0.0.1/ops_client/quote/delete_quote_parameters.go new file mode 100644 index 0000000..d8a5f25 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/quote/delete_quote_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package quote + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewDeleteQuoteParams creates a new DeleteQuoteParams object +// with the default values initialized. +func NewDeleteQuoteParams() *DeleteQuoteParams { + var () + return &DeleteQuoteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewDeleteQuoteParamsWithTimeout creates a new DeleteQuoteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewDeleteQuoteParamsWithTimeout(timeout time.Duration) *DeleteQuoteParams { + var () + return &DeleteQuoteParams{ + + timeout: timeout, + } +} + +// NewDeleteQuoteParamsWithContext creates a new DeleteQuoteParams object +// with the default values initialized, and the ability to set a context for a request +func NewDeleteQuoteParamsWithContext(ctx context.Context) *DeleteQuoteParams { + var () + return &DeleteQuoteParams{ + + Context: ctx, + } +} + +// NewDeleteQuoteParamsWithHTTPClient creates a new DeleteQuoteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewDeleteQuoteParamsWithHTTPClient(client *http.Client) *DeleteQuoteParams { + var () + return &DeleteQuoteParams{ + HTTPClient: client, + } +} + +/*DeleteQuoteParams contains all the parameters to send to the API endpoint +for the delete quote operation typically these are written to a http.Request +*/ +type DeleteQuoteParams struct { + + /*ID + Taxnexus Id of the record to be retrieved + + */ + ID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the delete quote params +func (o *DeleteQuoteParams) WithTimeout(timeout time.Duration) *DeleteQuoteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the delete quote params +func (o *DeleteQuoteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the delete quote params +func (o *DeleteQuoteParams) WithContext(ctx context.Context) *DeleteQuoteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the delete quote params +func (o *DeleteQuoteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the delete quote params +func (o *DeleteQuoteParams) WithHTTPClient(client *http.Client) *DeleteQuoteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the delete quote params +func (o *DeleteQuoteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the delete quote params +func (o *DeleteQuoteParams) WithID(id *string) *DeleteQuoteParams { + o.SetID(id) + return o +} + +// SetID adds the id to the delete quote params +func (o *DeleteQuoteParams) SetID(id *string) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *DeleteQuoteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ID != nil { + + // query param id + var qrID string + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/quote/delete_quote_responses.go b/api/ops/v0.0.1/ops_client/quote/delete_quote_responses.go new file mode 100644 index 0000000..3934ef4 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/quote/delete_quote_responses.go @@ -0,0 +1,298 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package quote + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// DeleteQuoteReader is a Reader for the DeleteQuote structure. +type DeleteQuoteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DeleteQuoteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDeleteQuoteOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewDeleteQuoteUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewDeleteQuoteForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewDeleteQuoteNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewDeleteQuoteUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewDeleteQuoteInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewDeleteQuoteOK creates a DeleteQuoteOK with default headers values +func NewDeleteQuoteOK() *DeleteQuoteOK { + return &DeleteQuoteOK{} +} + +/*DeleteQuoteOK handles this case with default header values. + +Taxnexus Response with Message Objects with Delete Status +*/ +type DeleteQuoteOK struct { + AccessControlAllowOrigin string + + Payload *ops_models.DeleteResponse +} + +func (o *DeleteQuoteOK) Error() string { + return fmt.Sprintf("[DELETE /quotes][%d] deleteQuoteOK %+v", 200, o.Payload) +} + +func (o *DeleteQuoteOK) GetPayload() *ops_models.DeleteResponse { + return o.Payload +} + +func (o *DeleteQuoteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.DeleteResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteQuoteUnauthorized creates a DeleteQuoteUnauthorized with default headers values +func NewDeleteQuoteUnauthorized() *DeleteQuoteUnauthorized { + return &DeleteQuoteUnauthorized{} +} + +/*DeleteQuoteUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type DeleteQuoteUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeleteQuoteUnauthorized) Error() string { + return fmt.Sprintf("[DELETE /quotes][%d] deleteQuoteUnauthorized %+v", 401, o.Payload) +} + +func (o *DeleteQuoteUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeleteQuoteUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteQuoteForbidden creates a DeleteQuoteForbidden with default headers values +func NewDeleteQuoteForbidden() *DeleteQuoteForbidden { + return &DeleteQuoteForbidden{} +} + +/*DeleteQuoteForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type DeleteQuoteForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeleteQuoteForbidden) Error() string { + return fmt.Sprintf("[DELETE /quotes][%d] deleteQuoteForbidden %+v", 403, o.Payload) +} + +func (o *DeleteQuoteForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeleteQuoteForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteQuoteNotFound creates a DeleteQuoteNotFound with default headers values +func NewDeleteQuoteNotFound() *DeleteQuoteNotFound { + return &DeleteQuoteNotFound{} +} + +/*DeleteQuoteNotFound handles this case with default header values. + +Resource was not found +*/ +type DeleteQuoteNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeleteQuoteNotFound) Error() string { + return fmt.Sprintf("[DELETE /quotes][%d] deleteQuoteNotFound %+v", 404, o.Payload) +} + +func (o *DeleteQuoteNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeleteQuoteNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteQuoteUnprocessableEntity creates a DeleteQuoteUnprocessableEntity with default headers values +func NewDeleteQuoteUnprocessableEntity() *DeleteQuoteUnprocessableEntity { + return &DeleteQuoteUnprocessableEntity{} +} + +/*DeleteQuoteUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type DeleteQuoteUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeleteQuoteUnprocessableEntity) Error() string { + return fmt.Sprintf("[DELETE /quotes][%d] deleteQuoteUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *DeleteQuoteUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeleteQuoteUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteQuoteInternalServerError creates a DeleteQuoteInternalServerError with default headers values +func NewDeleteQuoteInternalServerError() *DeleteQuoteInternalServerError { + return &DeleteQuoteInternalServerError{} +} + +/*DeleteQuoteInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type DeleteQuoteInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *DeleteQuoteInternalServerError) Error() string { + return fmt.Sprintf("[DELETE /quotes][%d] deleteQuoteInternalServerError %+v", 500, o.Payload) +} + +func (o *DeleteQuoteInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *DeleteQuoteInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/quote/get_quotes_parameters.go b/api/ops/v0.0.1/ops_client/quote/get_quotes_parameters.go new file mode 100644 index 0000000..50dc362 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/quote/get_quotes_parameters.go @@ -0,0 +1,215 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package quote + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewGetQuotesParams creates a new GetQuotesParams object +// with the default values initialized. +func NewGetQuotesParams() *GetQuotesParams { + var () + return &GetQuotesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetQuotesParamsWithTimeout creates a new GetQuotesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetQuotesParamsWithTimeout(timeout time.Duration) *GetQuotesParams { + var () + return &GetQuotesParams{ + + timeout: timeout, + } +} + +// NewGetQuotesParamsWithContext creates a new GetQuotesParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetQuotesParamsWithContext(ctx context.Context) *GetQuotesParams { + var () + return &GetQuotesParams{ + + Context: ctx, + } +} + +// NewGetQuotesParamsWithHTTPClient creates a new GetQuotesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetQuotesParamsWithHTTPClient(client *http.Client) *GetQuotesParams { + var () + return &GetQuotesParams{ + HTTPClient: client, + } +} + +/*GetQuotesParams contains all the parameters to send to the API endpoint +for the get quotes operation typically these are written to a http.Request +*/ +type GetQuotesParams struct { + + /*Limit + How many objects to return at one time + + */ + Limit *int64 + /*Offset + How many objects to skip? (default 0) + + */ + Offset *int64 + /*QuoteID + Taxnexus Record Id of a Quote + + */ + QuoteID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get quotes params +func (o *GetQuotesParams) WithTimeout(timeout time.Duration) *GetQuotesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get quotes params +func (o *GetQuotesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get quotes params +func (o *GetQuotesParams) WithContext(ctx context.Context) *GetQuotesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get quotes params +func (o *GetQuotesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get quotes params +func (o *GetQuotesParams) WithHTTPClient(client *http.Client) *GetQuotesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get quotes params +func (o *GetQuotesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithLimit adds the limit to the get quotes params +func (o *GetQuotesParams) WithLimit(limit *int64) *GetQuotesParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the get quotes params +func (o *GetQuotesParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the get quotes params +func (o *GetQuotesParams) WithOffset(offset *int64) *GetQuotesParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the get quotes params +func (o *GetQuotesParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithQuoteID adds the quoteID to the get quotes params +func (o *GetQuotesParams) WithQuoteID(quoteID *string) *GetQuotesParams { + o.SetQuoteID(quoteID) + return o +} + +// SetQuoteID adds the quoteId to the get quotes params +func (o *GetQuotesParams) SetQuoteID(quoteID *string) { + o.QuoteID = quoteID +} + +// WriteToRequest writes these params to a swagger request +func (o *GetQuotesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.QuoteID != nil { + + // query param quoteId + var qrQuoteID string + if o.QuoteID != nil { + qrQuoteID = *o.QuoteID + } + qQuoteID := qrQuoteID + if qQuoteID != "" { + if err := r.SetQueryParam("quoteId", qQuoteID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/quote/get_quotes_responses.go b/api/ops/v0.0.1/ops_client/quote/get_quotes_responses.go new file mode 100644 index 0000000..4f384e1 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/quote/get_quotes_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package quote + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// GetQuotesReader is a Reader for the GetQuotes structure. +type GetQuotesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetQuotesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetQuotesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetQuotesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetQuotesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetQuotesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetQuotesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetQuotesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetQuotesOK creates a GetQuotesOK with default headers values +func NewGetQuotesOK() *GetQuotesOK { + return &GetQuotesOK{} +} + +/*GetQuotesOK handles this case with default header values. + +Taxnexus Response with an array of Quote objects +*/ +type GetQuotesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *ops_models.QuoteResponse +} + +func (o *GetQuotesOK) Error() string { + return fmt.Sprintf("[GET /quotes][%d] getQuotesOK %+v", 200, o.Payload) +} + +func (o *GetQuotesOK) GetPayload() *ops_models.QuoteResponse { + return o.Payload +} + +func (o *GetQuotesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(ops_models.QuoteResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetQuotesUnauthorized creates a GetQuotesUnauthorized with default headers values +func NewGetQuotesUnauthorized() *GetQuotesUnauthorized { + return &GetQuotesUnauthorized{} +} + +/*GetQuotesUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type GetQuotesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetQuotesUnauthorized) Error() string { + return fmt.Sprintf("[GET /quotes][%d] getQuotesUnauthorized %+v", 401, o.Payload) +} + +func (o *GetQuotesUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetQuotesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetQuotesForbidden creates a GetQuotesForbidden with default headers values +func NewGetQuotesForbidden() *GetQuotesForbidden { + return &GetQuotesForbidden{} +} + +/*GetQuotesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetQuotesForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetQuotesForbidden) Error() string { + return fmt.Sprintf("[GET /quotes][%d] getQuotesForbidden %+v", 403, o.Payload) +} + +func (o *GetQuotesForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetQuotesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetQuotesNotFound creates a GetQuotesNotFound with default headers values +func NewGetQuotesNotFound() *GetQuotesNotFound { + return &GetQuotesNotFound{} +} + +/*GetQuotesNotFound handles this case with default header values. + +Resource was not found +*/ +type GetQuotesNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetQuotesNotFound) Error() string { + return fmt.Sprintf("[GET /quotes][%d] getQuotesNotFound %+v", 404, o.Payload) +} + +func (o *GetQuotesNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetQuotesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetQuotesUnprocessableEntity creates a GetQuotesUnprocessableEntity with default headers values +func NewGetQuotesUnprocessableEntity() *GetQuotesUnprocessableEntity { + return &GetQuotesUnprocessableEntity{} +} + +/*GetQuotesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetQuotesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetQuotesUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /quotes][%d] getQuotesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetQuotesUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetQuotesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetQuotesInternalServerError creates a GetQuotesInternalServerError with default headers values +func NewGetQuotesInternalServerError() *GetQuotesInternalServerError { + return &GetQuotesInternalServerError{} +} + +/*GetQuotesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetQuotesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *GetQuotesInternalServerError) Error() string { + return fmt.Sprintf("[GET /quotes][%d] getQuotesInternalServerError %+v", 500, o.Payload) +} + +func (o *GetQuotesInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *GetQuotesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/quote/post_quotes_parameters.go b/api/ops/v0.0.1/ops_client/quote/post_quotes_parameters.go new file mode 100644 index 0000000..f5bafe3 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/quote/post_quotes_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package quote + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// NewPostQuotesParams creates a new PostQuotesParams object +// with the default values initialized. +func NewPostQuotesParams() *PostQuotesParams { + var () + return &PostQuotesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostQuotesParamsWithTimeout creates a new PostQuotesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostQuotesParamsWithTimeout(timeout time.Duration) *PostQuotesParams { + var () + return &PostQuotesParams{ + + timeout: timeout, + } +} + +// NewPostQuotesParamsWithContext creates a new PostQuotesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostQuotesParamsWithContext(ctx context.Context) *PostQuotesParams { + var () + return &PostQuotesParams{ + + Context: ctx, + } +} + +// NewPostQuotesParamsWithHTTPClient creates a new PostQuotesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostQuotesParamsWithHTTPClient(client *http.Client) *PostQuotesParams { + var () + return &PostQuotesParams{ + HTTPClient: client, + } +} + +/*PostQuotesParams contains all the parameters to send to the API endpoint +for the post quotes operation typically these are written to a http.Request +*/ +type PostQuotesParams struct { + + /*QuoteRequest + A request with an array of Quote Objects + + */ + QuoteRequest *ops_models.QuoteRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post quotes params +func (o *PostQuotesParams) WithTimeout(timeout time.Duration) *PostQuotesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post quotes params +func (o *PostQuotesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post quotes params +func (o *PostQuotesParams) WithContext(ctx context.Context) *PostQuotesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post quotes params +func (o *PostQuotesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post quotes params +func (o *PostQuotesParams) WithHTTPClient(client *http.Client) *PostQuotesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post quotes params +func (o *PostQuotesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithQuoteRequest adds the quoteRequest to the post quotes params +func (o *PostQuotesParams) WithQuoteRequest(quoteRequest *ops_models.QuoteRequest) *PostQuotesParams { + o.SetQuoteRequest(quoteRequest) + return o +} + +// SetQuoteRequest adds the quoteRequest to the post quotes params +func (o *PostQuotesParams) SetQuoteRequest(quoteRequest *ops_models.QuoteRequest) { + o.QuoteRequest = quoteRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostQuotesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.QuoteRequest != nil { + if err := r.SetBodyParam(o.QuoteRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/quote/post_quotes_responses.go b/api/ops/v0.0.1/ops_client/quote/post_quotes_responses.go new file mode 100644 index 0000000..5b3240a --- /dev/null +++ b/api/ops/v0.0.1/ops_client/quote/post_quotes_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package quote + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// PostQuotesReader is a Reader for the PostQuotes structure. +type PostQuotesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostQuotesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostQuotesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostQuotesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostQuotesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostQuotesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostQuotesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostQuotesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostQuotesOK creates a PostQuotesOK with default headers values +func NewPostQuotesOK() *PostQuotesOK { + return &PostQuotesOK{} +} + +/*PostQuotesOK handles this case with default header values. + +Taxnexus Response with an array of Quote objects +*/ +type PostQuotesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *ops_models.QuoteResponse +} + +func (o *PostQuotesOK) Error() string { + return fmt.Sprintf("[POST /quotes][%d] postQuotesOK %+v", 200, o.Payload) +} + +func (o *PostQuotesOK) GetPayload() *ops_models.QuoteResponse { + return o.Payload +} + +func (o *PostQuotesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(ops_models.QuoteResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostQuotesUnauthorized creates a PostQuotesUnauthorized with default headers values +func NewPostQuotesUnauthorized() *PostQuotesUnauthorized { + return &PostQuotesUnauthorized{} +} + +/*PostQuotesUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PostQuotesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostQuotesUnauthorized) Error() string { + return fmt.Sprintf("[POST /quotes][%d] postQuotesUnauthorized %+v", 401, o.Payload) +} + +func (o *PostQuotesUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostQuotesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostQuotesForbidden creates a PostQuotesForbidden with default headers values +func NewPostQuotesForbidden() *PostQuotesForbidden { + return &PostQuotesForbidden{} +} + +/*PostQuotesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostQuotesForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostQuotesForbidden) Error() string { + return fmt.Sprintf("[POST /quotes][%d] postQuotesForbidden %+v", 403, o.Payload) +} + +func (o *PostQuotesForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostQuotesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostQuotesNotFound creates a PostQuotesNotFound with default headers values +func NewPostQuotesNotFound() *PostQuotesNotFound { + return &PostQuotesNotFound{} +} + +/*PostQuotesNotFound handles this case with default header values. + +Resource was not found +*/ +type PostQuotesNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostQuotesNotFound) Error() string { + return fmt.Sprintf("[POST /quotes][%d] postQuotesNotFound %+v", 404, o.Payload) +} + +func (o *PostQuotesNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostQuotesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostQuotesUnprocessableEntity creates a PostQuotesUnprocessableEntity with default headers values +func NewPostQuotesUnprocessableEntity() *PostQuotesUnprocessableEntity { + return &PostQuotesUnprocessableEntity{} +} + +/*PostQuotesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostQuotesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostQuotesUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /quotes][%d] postQuotesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostQuotesUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostQuotesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostQuotesInternalServerError creates a PostQuotesInternalServerError with default headers values +func NewPostQuotesInternalServerError() *PostQuotesInternalServerError { + return &PostQuotesInternalServerError{} +} + +/*PostQuotesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostQuotesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostQuotesInternalServerError) Error() string { + return fmt.Sprintf("[POST /quotes][%d] postQuotesInternalServerError %+v", 500, o.Payload) +} + +func (o *PostQuotesInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostQuotesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/quote/put_quotes_parameters.go b/api/ops/v0.0.1/ops_client/quote/put_quotes_parameters.go new file mode 100644 index 0000000..ad980f9 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/quote/put_quotes_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package quote + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// NewPutQuotesParams creates a new PutQuotesParams object +// with the default values initialized. +func NewPutQuotesParams() *PutQuotesParams { + var () + return &PutQuotesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPutQuotesParamsWithTimeout creates a new PutQuotesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPutQuotesParamsWithTimeout(timeout time.Duration) *PutQuotesParams { + var () + return &PutQuotesParams{ + + timeout: timeout, + } +} + +// NewPutQuotesParamsWithContext creates a new PutQuotesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPutQuotesParamsWithContext(ctx context.Context) *PutQuotesParams { + var () + return &PutQuotesParams{ + + Context: ctx, + } +} + +// NewPutQuotesParamsWithHTTPClient creates a new PutQuotesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPutQuotesParamsWithHTTPClient(client *http.Client) *PutQuotesParams { + var () + return &PutQuotesParams{ + HTTPClient: client, + } +} + +/*PutQuotesParams contains all the parameters to send to the API endpoint +for the put quotes operation typically these are written to a http.Request +*/ +type PutQuotesParams struct { + + /*QuoteRequest + A request with an array of Quote Objects + + */ + QuoteRequest *ops_models.QuoteRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the put quotes params +func (o *PutQuotesParams) WithTimeout(timeout time.Duration) *PutQuotesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the put quotes params +func (o *PutQuotesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the put quotes params +func (o *PutQuotesParams) WithContext(ctx context.Context) *PutQuotesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the put quotes params +func (o *PutQuotesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the put quotes params +func (o *PutQuotesParams) WithHTTPClient(client *http.Client) *PutQuotesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the put quotes params +func (o *PutQuotesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithQuoteRequest adds the quoteRequest to the put quotes params +func (o *PutQuotesParams) WithQuoteRequest(quoteRequest *ops_models.QuoteRequest) *PutQuotesParams { + o.SetQuoteRequest(quoteRequest) + return o +} + +// SetQuoteRequest adds the quoteRequest to the put quotes params +func (o *PutQuotesParams) SetQuoteRequest(quoteRequest *ops_models.QuoteRequest) { + o.QuoteRequest = quoteRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PutQuotesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.QuoteRequest != nil { + if err := r.SetBodyParam(o.QuoteRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/quote/put_quotes_responses.go b/api/ops/v0.0.1/ops_client/quote/put_quotes_responses.go new file mode 100644 index 0000000..b5385e5 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/quote/put_quotes_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package quote + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// PutQuotesReader is a Reader for the PutQuotes structure. +type PutQuotesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PutQuotesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPutQuotesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPutQuotesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPutQuotesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPutQuotesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPutQuotesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPutQuotesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPutQuotesOK creates a PutQuotesOK with default headers values +func NewPutQuotesOK() *PutQuotesOK { + return &PutQuotesOK{} +} + +/*PutQuotesOK handles this case with default header values. + +Taxnexus Response with an array of Quote objects +*/ +type PutQuotesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *ops_models.QuoteResponse +} + +func (o *PutQuotesOK) Error() string { + return fmt.Sprintf("[PUT /quotes][%d] putQuotesOK %+v", 200, o.Payload) +} + +func (o *PutQuotesOK) GetPayload() *ops_models.QuoteResponse { + return o.Payload +} + +func (o *PutQuotesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(ops_models.QuoteResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutQuotesUnauthorized creates a PutQuotesUnauthorized with default headers values +func NewPutQuotesUnauthorized() *PutQuotesUnauthorized { + return &PutQuotesUnauthorized{} +} + +/*PutQuotesUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PutQuotesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutQuotesUnauthorized) Error() string { + return fmt.Sprintf("[PUT /quotes][%d] putQuotesUnauthorized %+v", 401, o.Payload) +} + +func (o *PutQuotesUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutQuotesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutQuotesForbidden creates a PutQuotesForbidden with default headers values +func NewPutQuotesForbidden() *PutQuotesForbidden { + return &PutQuotesForbidden{} +} + +/*PutQuotesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PutQuotesForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutQuotesForbidden) Error() string { + return fmt.Sprintf("[PUT /quotes][%d] putQuotesForbidden %+v", 403, o.Payload) +} + +func (o *PutQuotesForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutQuotesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutQuotesNotFound creates a PutQuotesNotFound with default headers values +func NewPutQuotesNotFound() *PutQuotesNotFound { + return &PutQuotesNotFound{} +} + +/*PutQuotesNotFound handles this case with default header values. + +Resource was not found +*/ +type PutQuotesNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutQuotesNotFound) Error() string { + return fmt.Sprintf("[PUT /quotes][%d] putQuotesNotFound %+v", 404, o.Payload) +} + +func (o *PutQuotesNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutQuotesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutQuotesUnprocessableEntity creates a PutQuotesUnprocessableEntity with default headers values +func NewPutQuotesUnprocessableEntity() *PutQuotesUnprocessableEntity { + return &PutQuotesUnprocessableEntity{} +} + +/*PutQuotesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PutQuotesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutQuotesUnprocessableEntity) Error() string { + return fmt.Sprintf("[PUT /quotes][%d] putQuotesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PutQuotesUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutQuotesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPutQuotesInternalServerError creates a PutQuotesInternalServerError with default headers values +func NewPutQuotesInternalServerError() *PutQuotesInternalServerError { + return &PutQuotesInternalServerError{} +} + +/*PutQuotesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PutQuotesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PutQuotesInternalServerError) Error() string { + return fmt.Sprintf("[PUT /quotes][%d] putQuotesInternalServerError %+v", 500, o.Payload) +} + +func (o *PutQuotesInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PutQuotesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/quote/quote_client.go b/api/ops/v0.0.1/ops_client/quote/quote_client.go new file mode 100644 index 0000000..6da6e36 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/quote/quote_client.go @@ -0,0 +1,196 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package quote + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new quote API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for quote API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + DeleteQuote(params *DeleteQuoteParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteQuoteOK, error) + + GetQuotes(params *GetQuotesParams, authInfo runtime.ClientAuthInfoWriter) (*GetQuotesOK, error) + + PostQuotes(params *PostQuotesParams, authInfo runtime.ClientAuthInfoWriter) (*PostQuotesOK, error) + + PutQuotes(params *PutQuotesParams, authInfo runtime.ClientAuthInfoWriter) (*PutQuotesOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + DeleteQuote deletes a quote + + Delete quote by ID +*/ +func (a *Client) DeleteQuote(params *DeleteQuoteParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteQuoteOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDeleteQuoteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "deleteQuote", + Method: "DELETE", + PathPattern: "/quotes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &DeleteQuoteReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*DeleteQuoteOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for deleteQuote: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + GetQuotes gets a list of invoices + + Return a list of available quotes +*/ +func (a *Client) GetQuotes(params *GetQuotesParams, authInfo runtime.ClientAuthInfoWriter) (*GetQuotesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetQuotesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getQuotes", + Method: "GET", + PathPattern: "/quotes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetQuotesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetQuotesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getQuotes: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostQuotes creates a new quotes + + Create New Quotes +*/ +func (a *Client) PostQuotes(params *PostQuotesParams, authInfo runtime.ClientAuthInfoWriter) (*PostQuotesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostQuotesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postQuotes", + Method: "POST", + PathPattern: "/quotes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostQuotesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostQuotesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postQuotes: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PutQuotes puts a list of quotes + + Put a list of Quotes +*/ +func (a *Client) PutQuotes(params *PutQuotesParams, authInfo runtime.ClientAuthInfoWriter) (*PutQuotesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPutQuotesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "putQuotes", + Method: "PUT", + PathPattern: "/quotes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PutQuotesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PutQuotesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for putQuotes: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/ops/v0.0.1/ops_client/tax/post_taxes_invoices_parameters.go b/api/ops/v0.0.1/ops_client/tax/post_taxes_invoices_parameters.go new file mode 100644 index 0000000..a35cfd1 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/tax/post_taxes_invoices_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tax + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// NewPostTaxesInvoicesParams creates a new PostTaxesInvoicesParams object +// with the default values initialized. +func NewPostTaxesInvoicesParams() *PostTaxesInvoicesParams { + var () + return &PostTaxesInvoicesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostTaxesInvoicesParamsWithTimeout creates a new PostTaxesInvoicesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostTaxesInvoicesParamsWithTimeout(timeout time.Duration) *PostTaxesInvoicesParams { + var () + return &PostTaxesInvoicesParams{ + + timeout: timeout, + } +} + +// NewPostTaxesInvoicesParamsWithContext creates a new PostTaxesInvoicesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostTaxesInvoicesParamsWithContext(ctx context.Context) *PostTaxesInvoicesParams { + var () + return &PostTaxesInvoicesParams{ + + Context: ctx, + } +} + +// NewPostTaxesInvoicesParamsWithHTTPClient creates a new PostTaxesInvoicesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostTaxesInvoicesParamsWithHTTPClient(client *http.Client) *PostTaxesInvoicesParams { + var () + return &PostTaxesInvoicesParams{ + HTTPClient: client, + } +} + +/*PostTaxesInvoicesParams contains all the parameters to send to the API endpoint +for the post taxes invoices operation typically these are written to a http.Request +*/ +type PostTaxesInvoicesParams struct { + + /*InvoiceRequest + A request with an array of Invoice Objects + + */ + InvoiceRequest *ops_models.InvoiceRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post taxes invoices params +func (o *PostTaxesInvoicesParams) WithTimeout(timeout time.Duration) *PostTaxesInvoicesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post taxes invoices params +func (o *PostTaxesInvoicesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post taxes invoices params +func (o *PostTaxesInvoicesParams) WithContext(ctx context.Context) *PostTaxesInvoicesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post taxes invoices params +func (o *PostTaxesInvoicesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post taxes invoices params +func (o *PostTaxesInvoicesParams) WithHTTPClient(client *http.Client) *PostTaxesInvoicesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post taxes invoices params +func (o *PostTaxesInvoicesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithInvoiceRequest adds the invoiceRequest to the post taxes invoices params +func (o *PostTaxesInvoicesParams) WithInvoiceRequest(invoiceRequest *ops_models.InvoiceRequest) *PostTaxesInvoicesParams { + o.SetInvoiceRequest(invoiceRequest) + return o +} + +// SetInvoiceRequest adds the invoiceRequest to the post taxes invoices params +func (o *PostTaxesInvoicesParams) SetInvoiceRequest(invoiceRequest *ops_models.InvoiceRequest) { + o.InvoiceRequest = invoiceRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostTaxesInvoicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.InvoiceRequest != nil { + if err := r.SetBodyParam(o.InvoiceRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/tax/post_taxes_invoices_responses.go b/api/ops/v0.0.1/ops_client/tax/post_taxes_invoices_responses.go new file mode 100644 index 0000000..bf00671 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/tax/post_taxes_invoices_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tax + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// PostTaxesInvoicesReader is a Reader for the PostTaxesInvoices structure. +type PostTaxesInvoicesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostTaxesInvoicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostTaxesInvoicesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostTaxesInvoicesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostTaxesInvoicesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostTaxesInvoicesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostTaxesInvoicesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostTaxesInvoicesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostTaxesInvoicesOK creates a PostTaxesInvoicesOK with default headers values +func NewPostTaxesInvoicesOK() *PostTaxesInvoicesOK { + return &PostTaxesInvoicesOK{} +} + +/*PostTaxesInvoicesOK handles this case with default header values. + +Taxnexus Response with Tax Transaction Objects +*/ +type PostTaxesInvoicesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *ops_models.TaxTransactionResponse +} + +func (o *PostTaxesInvoicesOK) Error() string { + return fmt.Sprintf("[POST /taxes/invoices][%d] postTaxesInvoicesOK %+v", 200, o.Payload) +} + +func (o *PostTaxesInvoicesOK) GetPayload() *ops_models.TaxTransactionResponse { + return o.Payload +} + +func (o *PostTaxesInvoicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(ops_models.TaxTransactionResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxesInvoicesUnauthorized creates a PostTaxesInvoicesUnauthorized with default headers values +func NewPostTaxesInvoicesUnauthorized() *PostTaxesInvoicesUnauthorized { + return &PostTaxesInvoicesUnauthorized{} +} + +/*PostTaxesInvoicesUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PostTaxesInvoicesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostTaxesInvoicesUnauthorized) Error() string { + return fmt.Sprintf("[POST /taxes/invoices][%d] postTaxesInvoicesUnauthorized %+v", 401, o.Payload) +} + +func (o *PostTaxesInvoicesUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostTaxesInvoicesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxesInvoicesForbidden creates a PostTaxesInvoicesForbidden with default headers values +func NewPostTaxesInvoicesForbidden() *PostTaxesInvoicesForbidden { + return &PostTaxesInvoicesForbidden{} +} + +/*PostTaxesInvoicesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostTaxesInvoicesForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostTaxesInvoicesForbidden) Error() string { + return fmt.Sprintf("[POST /taxes/invoices][%d] postTaxesInvoicesForbidden %+v", 403, o.Payload) +} + +func (o *PostTaxesInvoicesForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostTaxesInvoicesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxesInvoicesNotFound creates a PostTaxesInvoicesNotFound with default headers values +func NewPostTaxesInvoicesNotFound() *PostTaxesInvoicesNotFound { + return &PostTaxesInvoicesNotFound{} +} + +/*PostTaxesInvoicesNotFound handles this case with default header values. + +Resource was not found +*/ +type PostTaxesInvoicesNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostTaxesInvoicesNotFound) Error() string { + return fmt.Sprintf("[POST /taxes/invoices][%d] postTaxesInvoicesNotFound %+v", 404, o.Payload) +} + +func (o *PostTaxesInvoicesNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostTaxesInvoicesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxesInvoicesUnprocessableEntity creates a PostTaxesInvoicesUnprocessableEntity with default headers values +func NewPostTaxesInvoicesUnprocessableEntity() *PostTaxesInvoicesUnprocessableEntity { + return &PostTaxesInvoicesUnprocessableEntity{} +} + +/*PostTaxesInvoicesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostTaxesInvoicesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostTaxesInvoicesUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /taxes/invoices][%d] postTaxesInvoicesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostTaxesInvoicesUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostTaxesInvoicesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxesInvoicesInternalServerError creates a PostTaxesInvoicesInternalServerError with default headers values +func NewPostTaxesInvoicesInternalServerError() *PostTaxesInvoicesInternalServerError { + return &PostTaxesInvoicesInternalServerError{} +} + +/*PostTaxesInvoicesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostTaxesInvoicesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostTaxesInvoicesInternalServerError) Error() string { + return fmt.Sprintf("[POST /taxes/invoices][%d] postTaxesInvoicesInternalServerError %+v", 500, o.Payload) +} + +func (o *PostTaxesInvoicesInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostTaxesInvoicesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/tax/post_taxes_orders_parameters.go b/api/ops/v0.0.1/ops_client/tax/post_taxes_orders_parameters.go new file mode 100644 index 0000000..75ffa08 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/tax/post_taxes_orders_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tax + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// NewPostTaxesOrdersParams creates a new PostTaxesOrdersParams object +// with the default values initialized. +func NewPostTaxesOrdersParams() *PostTaxesOrdersParams { + var () + return &PostTaxesOrdersParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostTaxesOrdersParamsWithTimeout creates a new PostTaxesOrdersParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostTaxesOrdersParamsWithTimeout(timeout time.Duration) *PostTaxesOrdersParams { + var () + return &PostTaxesOrdersParams{ + + timeout: timeout, + } +} + +// NewPostTaxesOrdersParamsWithContext creates a new PostTaxesOrdersParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostTaxesOrdersParamsWithContext(ctx context.Context) *PostTaxesOrdersParams { + var () + return &PostTaxesOrdersParams{ + + Context: ctx, + } +} + +// NewPostTaxesOrdersParamsWithHTTPClient creates a new PostTaxesOrdersParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostTaxesOrdersParamsWithHTTPClient(client *http.Client) *PostTaxesOrdersParams { + var () + return &PostTaxesOrdersParams{ + HTTPClient: client, + } +} + +/*PostTaxesOrdersParams contains all the parameters to send to the API endpoint +for the post taxes orders operation typically these are written to a http.Request +*/ +type PostTaxesOrdersParams struct { + + /*OrderRequest + A request with an array of Order Objects + + */ + OrderRequest *ops_models.OrderRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post taxes orders params +func (o *PostTaxesOrdersParams) WithTimeout(timeout time.Duration) *PostTaxesOrdersParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post taxes orders params +func (o *PostTaxesOrdersParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post taxes orders params +func (o *PostTaxesOrdersParams) WithContext(ctx context.Context) *PostTaxesOrdersParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post taxes orders params +func (o *PostTaxesOrdersParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post taxes orders params +func (o *PostTaxesOrdersParams) WithHTTPClient(client *http.Client) *PostTaxesOrdersParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post taxes orders params +func (o *PostTaxesOrdersParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithOrderRequest adds the orderRequest to the post taxes orders params +func (o *PostTaxesOrdersParams) WithOrderRequest(orderRequest *ops_models.OrderRequest) *PostTaxesOrdersParams { + o.SetOrderRequest(orderRequest) + return o +} + +// SetOrderRequest adds the orderRequest to the post taxes orders params +func (o *PostTaxesOrdersParams) SetOrderRequest(orderRequest *ops_models.OrderRequest) { + o.OrderRequest = orderRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostTaxesOrdersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.OrderRequest != nil { + if err := r.SetBodyParam(o.OrderRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/tax/post_taxes_orders_responses.go b/api/ops/v0.0.1/ops_client/tax/post_taxes_orders_responses.go new file mode 100644 index 0000000..a728488 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/tax/post_taxes_orders_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tax + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// PostTaxesOrdersReader is a Reader for the PostTaxesOrders structure. +type PostTaxesOrdersReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostTaxesOrdersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostTaxesOrdersOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostTaxesOrdersUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostTaxesOrdersForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostTaxesOrdersNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostTaxesOrdersUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostTaxesOrdersInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostTaxesOrdersOK creates a PostTaxesOrdersOK with default headers values +func NewPostTaxesOrdersOK() *PostTaxesOrdersOK { + return &PostTaxesOrdersOK{} +} + +/*PostTaxesOrdersOK handles this case with default header values. + +Taxnexus Response with Tax Transaction Objects +*/ +type PostTaxesOrdersOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *ops_models.TaxTransactionResponse +} + +func (o *PostTaxesOrdersOK) Error() string { + return fmt.Sprintf("[POST /taxes/orders][%d] postTaxesOrdersOK %+v", 200, o.Payload) +} + +func (o *PostTaxesOrdersOK) GetPayload() *ops_models.TaxTransactionResponse { + return o.Payload +} + +func (o *PostTaxesOrdersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(ops_models.TaxTransactionResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxesOrdersUnauthorized creates a PostTaxesOrdersUnauthorized with default headers values +func NewPostTaxesOrdersUnauthorized() *PostTaxesOrdersUnauthorized { + return &PostTaxesOrdersUnauthorized{} +} + +/*PostTaxesOrdersUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PostTaxesOrdersUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostTaxesOrdersUnauthorized) Error() string { + return fmt.Sprintf("[POST /taxes/orders][%d] postTaxesOrdersUnauthorized %+v", 401, o.Payload) +} + +func (o *PostTaxesOrdersUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostTaxesOrdersUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxesOrdersForbidden creates a PostTaxesOrdersForbidden with default headers values +func NewPostTaxesOrdersForbidden() *PostTaxesOrdersForbidden { + return &PostTaxesOrdersForbidden{} +} + +/*PostTaxesOrdersForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostTaxesOrdersForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostTaxesOrdersForbidden) Error() string { + return fmt.Sprintf("[POST /taxes/orders][%d] postTaxesOrdersForbidden %+v", 403, o.Payload) +} + +func (o *PostTaxesOrdersForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostTaxesOrdersForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxesOrdersNotFound creates a PostTaxesOrdersNotFound with default headers values +func NewPostTaxesOrdersNotFound() *PostTaxesOrdersNotFound { + return &PostTaxesOrdersNotFound{} +} + +/*PostTaxesOrdersNotFound handles this case with default header values. + +Resource was not found +*/ +type PostTaxesOrdersNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostTaxesOrdersNotFound) Error() string { + return fmt.Sprintf("[POST /taxes/orders][%d] postTaxesOrdersNotFound %+v", 404, o.Payload) +} + +func (o *PostTaxesOrdersNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostTaxesOrdersNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxesOrdersUnprocessableEntity creates a PostTaxesOrdersUnprocessableEntity with default headers values +func NewPostTaxesOrdersUnprocessableEntity() *PostTaxesOrdersUnprocessableEntity { + return &PostTaxesOrdersUnprocessableEntity{} +} + +/*PostTaxesOrdersUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostTaxesOrdersUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostTaxesOrdersUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /taxes/orders][%d] postTaxesOrdersUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostTaxesOrdersUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostTaxesOrdersUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxesOrdersInternalServerError creates a PostTaxesOrdersInternalServerError with default headers values +func NewPostTaxesOrdersInternalServerError() *PostTaxesOrdersInternalServerError { + return &PostTaxesOrdersInternalServerError{} +} + +/*PostTaxesOrdersInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostTaxesOrdersInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostTaxesOrdersInternalServerError) Error() string { + return fmt.Sprintf("[POST /taxes/orders][%d] postTaxesOrdersInternalServerError %+v", 500, o.Payload) +} + +func (o *PostTaxesOrdersInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostTaxesOrdersInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/tax/post_taxes_pos_parameters.go b/api/ops/v0.0.1/ops_client/tax/post_taxes_pos_parameters.go new file mode 100644 index 0000000..cda5253 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/tax/post_taxes_pos_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tax + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// NewPostTaxesPosParams creates a new PostTaxesPosParams object +// with the default values initialized. +func NewPostTaxesPosParams() *PostTaxesPosParams { + var () + return &PostTaxesPosParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostTaxesPosParamsWithTimeout creates a new PostTaxesPosParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostTaxesPosParamsWithTimeout(timeout time.Duration) *PostTaxesPosParams { + var () + return &PostTaxesPosParams{ + + timeout: timeout, + } +} + +// NewPostTaxesPosParamsWithContext creates a new PostTaxesPosParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostTaxesPosParamsWithContext(ctx context.Context) *PostTaxesPosParams { + var () + return &PostTaxesPosParams{ + + Context: ctx, + } +} + +// NewPostTaxesPosParamsWithHTTPClient creates a new PostTaxesPosParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostTaxesPosParamsWithHTTPClient(client *http.Client) *PostTaxesPosParams { + var () + return &PostTaxesPosParams{ + HTTPClient: client, + } +} + +/*PostTaxesPosParams contains all the parameters to send to the API endpoint +for the post taxes pos operation typically these are written to a http.Request +*/ +type PostTaxesPosParams struct { + + /*PurchaseOrderRequest + A request with an array of Purchase Order Objects + + */ + PurchaseOrderRequest *ops_models.PurchaseOrderRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post taxes pos params +func (o *PostTaxesPosParams) WithTimeout(timeout time.Duration) *PostTaxesPosParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post taxes pos params +func (o *PostTaxesPosParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post taxes pos params +func (o *PostTaxesPosParams) WithContext(ctx context.Context) *PostTaxesPosParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post taxes pos params +func (o *PostTaxesPosParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post taxes pos params +func (o *PostTaxesPosParams) WithHTTPClient(client *http.Client) *PostTaxesPosParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post taxes pos params +func (o *PostTaxesPosParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPurchaseOrderRequest adds the purchaseOrderRequest to the post taxes pos params +func (o *PostTaxesPosParams) WithPurchaseOrderRequest(purchaseOrderRequest *ops_models.PurchaseOrderRequest) *PostTaxesPosParams { + o.SetPurchaseOrderRequest(purchaseOrderRequest) + return o +} + +// SetPurchaseOrderRequest adds the purchaseOrderRequest to the post taxes pos params +func (o *PostTaxesPosParams) SetPurchaseOrderRequest(purchaseOrderRequest *ops_models.PurchaseOrderRequest) { + o.PurchaseOrderRequest = purchaseOrderRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostTaxesPosParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.PurchaseOrderRequest != nil { + if err := r.SetBodyParam(o.PurchaseOrderRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/tax/post_taxes_pos_responses.go b/api/ops/v0.0.1/ops_client/tax/post_taxes_pos_responses.go new file mode 100644 index 0000000..16872ba --- /dev/null +++ b/api/ops/v0.0.1/ops_client/tax/post_taxes_pos_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tax + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// PostTaxesPosReader is a Reader for the PostTaxesPos structure. +type PostTaxesPosReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostTaxesPosReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostTaxesPosOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostTaxesPosUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostTaxesPosForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostTaxesPosNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostTaxesPosUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostTaxesPosInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostTaxesPosOK creates a PostTaxesPosOK with default headers values +func NewPostTaxesPosOK() *PostTaxesPosOK { + return &PostTaxesPosOK{} +} + +/*PostTaxesPosOK handles this case with default header values. + +Taxnexus Response with Tax Transaction Objects +*/ +type PostTaxesPosOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *ops_models.TaxTransactionResponse +} + +func (o *PostTaxesPosOK) Error() string { + return fmt.Sprintf("[POST /taxes/pos][%d] postTaxesPosOK %+v", 200, o.Payload) +} + +func (o *PostTaxesPosOK) GetPayload() *ops_models.TaxTransactionResponse { + return o.Payload +} + +func (o *PostTaxesPosOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(ops_models.TaxTransactionResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxesPosUnauthorized creates a PostTaxesPosUnauthorized with default headers values +func NewPostTaxesPosUnauthorized() *PostTaxesPosUnauthorized { + return &PostTaxesPosUnauthorized{} +} + +/*PostTaxesPosUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PostTaxesPosUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostTaxesPosUnauthorized) Error() string { + return fmt.Sprintf("[POST /taxes/pos][%d] postTaxesPosUnauthorized %+v", 401, o.Payload) +} + +func (o *PostTaxesPosUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostTaxesPosUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxesPosForbidden creates a PostTaxesPosForbidden with default headers values +func NewPostTaxesPosForbidden() *PostTaxesPosForbidden { + return &PostTaxesPosForbidden{} +} + +/*PostTaxesPosForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostTaxesPosForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostTaxesPosForbidden) Error() string { + return fmt.Sprintf("[POST /taxes/pos][%d] postTaxesPosForbidden %+v", 403, o.Payload) +} + +func (o *PostTaxesPosForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostTaxesPosForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxesPosNotFound creates a PostTaxesPosNotFound with default headers values +func NewPostTaxesPosNotFound() *PostTaxesPosNotFound { + return &PostTaxesPosNotFound{} +} + +/*PostTaxesPosNotFound handles this case with default header values. + +Resource was not found +*/ +type PostTaxesPosNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostTaxesPosNotFound) Error() string { + return fmt.Sprintf("[POST /taxes/pos][%d] postTaxesPosNotFound %+v", 404, o.Payload) +} + +func (o *PostTaxesPosNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostTaxesPosNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxesPosUnprocessableEntity creates a PostTaxesPosUnprocessableEntity with default headers values +func NewPostTaxesPosUnprocessableEntity() *PostTaxesPosUnprocessableEntity { + return &PostTaxesPosUnprocessableEntity{} +} + +/*PostTaxesPosUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostTaxesPosUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostTaxesPosUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /taxes/pos][%d] postTaxesPosUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostTaxesPosUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostTaxesPosUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxesPosInternalServerError creates a PostTaxesPosInternalServerError with default headers values +func NewPostTaxesPosInternalServerError() *PostTaxesPosInternalServerError { + return &PostTaxesPosInternalServerError{} +} + +/*PostTaxesPosInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostTaxesPosInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostTaxesPosInternalServerError) Error() string { + return fmt.Sprintf("[POST /taxes/pos][%d] postTaxesPosInternalServerError %+v", 500, o.Payload) +} + +func (o *PostTaxesPosInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostTaxesPosInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/tax/post_taxes_quotes_parameters.go b/api/ops/v0.0.1/ops_client/tax/post_taxes_quotes_parameters.go new file mode 100644 index 0000000..9c4493f --- /dev/null +++ b/api/ops/v0.0.1/ops_client/tax/post_taxes_quotes_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tax + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// NewPostTaxesQuotesParams creates a new PostTaxesQuotesParams object +// with the default values initialized. +func NewPostTaxesQuotesParams() *PostTaxesQuotesParams { + var () + return &PostTaxesQuotesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostTaxesQuotesParamsWithTimeout creates a new PostTaxesQuotesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostTaxesQuotesParamsWithTimeout(timeout time.Duration) *PostTaxesQuotesParams { + var () + return &PostTaxesQuotesParams{ + + timeout: timeout, + } +} + +// NewPostTaxesQuotesParamsWithContext creates a new PostTaxesQuotesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostTaxesQuotesParamsWithContext(ctx context.Context) *PostTaxesQuotesParams { + var () + return &PostTaxesQuotesParams{ + + Context: ctx, + } +} + +// NewPostTaxesQuotesParamsWithHTTPClient creates a new PostTaxesQuotesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostTaxesQuotesParamsWithHTTPClient(client *http.Client) *PostTaxesQuotesParams { + var () + return &PostTaxesQuotesParams{ + HTTPClient: client, + } +} + +/*PostTaxesQuotesParams contains all the parameters to send to the API endpoint +for the post taxes quotes operation typically these are written to a http.Request +*/ +type PostTaxesQuotesParams struct { + + /*QuoteRequest + A request with an array of Quote Objects + + */ + QuoteRequest *ops_models.QuoteRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post taxes quotes params +func (o *PostTaxesQuotesParams) WithTimeout(timeout time.Duration) *PostTaxesQuotesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post taxes quotes params +func (o *PostTaxesQuotesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post taxes quotes params +func (o *PostTaxesQuotesParams) WithContext(ctx context.Context) *PostTaxesQuotesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post taxes quotes params +func (o *PostTaxesQuotesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post taxes quotes params +func (o *PostTaxesQuotesParams) WithHTTPClient(client *http.Client) *PostTaxesQuotesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post taxes quotes params +func (o *PostTaxesQuotesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithQuoteRequest adds the quoteRequest to the post taxes quotes params +func (o *PostTaxesQuotesParams) WithQuoteRequest(quoteRequest *ops_models.QuoteRequest) *PostTaxesQuotesParams { + o.SetQuoteRequest(quoteRequest) + return o +} + +// SetQuoteRequest adds the quoteRequest to the post taxes quotes params +func (o *PostTaxesQuotesParams) SetQuoteRequest(quoteRequest *ops_models.QuoteRequest) { + o.QuoteRequest = quoteRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostTaxesQuotesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.QuoteRequest != nil { + if err := r.SetBodyParam(o.QuoteRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/ops/v0.0.1/ops_client/tax/post_taxes_quotes_responses.go b/api/ops/v0.0.1/ops_client/tax/post_taxes_quotes_responses.go new file mode 100644 index 0000000..ccad158 --- /dev/null +++ b/api/ops/v0.0.1/ops_client/tax/post_taxes_quotes_responses.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tax + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/ops/ops_models" +) + +// PostTaxesQuotesReader is a Reader for the PostTaxesQuotes structure. +type PostTaxesQuotesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostTaxesQuotesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostTaxesQuotesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostTaxesQuotesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostTaxesQuotesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostTaxesQuotesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostTaxesQuotesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostTaxesQuotesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostTaxesQuotesOK creates a PostTaxesQuotesOK with default headers values +func NewPostTaxesQuotesOK() *PostTaxesQuotesOK { + return &PostTaxesQuotesOK{} +} + +/*PostTaxesQuotesOK handles this case with default header values. + +Taxnexus Response with Tax Transaction Objects +*/ +type PostTaxesQuotesOK struct { + AccessControlAllowOrigin string + + CacheControl string + + Payload *ops_models.TaxTransactionResponse +} + +func (o *PostTaxesQuotesOK) Error() string { + return fmt.Sprintf("[POST /taxes/quotes][%d] postTaxesQuotesOK %+v", 200, o.Payload) +} + +func (o *PostTaxesQuotesOK) GetPayload() *ops_models.TaxTransactionResponse { + return o.Payload +} + +func (o *PostTaxesQuotesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + o.Payload = new(ops_models.TaxTransactionResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxesQuotesUnauthorized creates a PostTaxesQuotesUnauthorized with default headers values +func NewPostTaxesQuotesUnauthorized() *PostTaxesQuotesUnauthorized { + return &PostTaxesQuotesUnauthorized{} +} + +/*PostTaxesQuotesUnauthorized handles this case with default header values. + +Access unauthorized, invalid API-KEY was used +*/ +type PostTaxesQuotesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostTaxesQuotesUnauthorized) Error() string { + return fmt.Sprintf("[POST /taxes/quotes][%d] postTaxesQuotesUnauthorized %+v", 401, o.Payload) +} + +func (o *PostTaxesQuotesUnauthorized) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostTaxesQuotesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxesQuotesForbidden creates a PostTaxesQuotesForbidden with default headers values +func NewPostTaxesQuotesForbidden() *PostTaxesQuotesForbidden { + return &PostTaxesQuotesForbidden{} +} + +/*PostTaxesQuotesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostTaxesQuotesForbidden struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostTaxesQuotesForbidden) Error() string { + return fmt.Sprintf("[POST /taxes/quotes][%d] postTaxesQuotesForbidden %+v", 403, o.Payload) +} + +func (o *PostTaxesQuotesForbidden) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostTaxesQuotesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxesQuotesNotFound creates a PostTaxesQuotesNotFound with default headers values +func NewPostTaxesQuotesNotFound() *PostTaxesQuotesNotFound { + return &PostTaxesQuotesNotFound{} +} + +/*PostTaxesQuotesNotFound handles this case with default header values. + +Resource was not found +*/ +type PostTaxesQuotesNotFound struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostTaxesQuotesNotFound) Error() string { + return fmt.Sprintf("[POST /taxes/quotes][%d] postTaxesQuotesNotFound %+v", 404, o.Payload) +} + +func (o *PostTaxesQuotesNotFound) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostTaxesQuotesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxesQuotesUnprocessableEntity creates a PostTaxesQuotesUnprocessableEntity with default headers values +func NewPostTaxesQuotesUnprocessableEntity() *PostTaxesQuotesUnprocessableEntity { + return &PostTaxesQuotesUnprocessableEntity{} +} + +/*PostTaxesQuotesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostTaxesQuotesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostTaxesQuotesUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /taxes/quotes][%d] postTaxesQuotesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostTaxesQuotesUnprocessableEntity) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostTaxesQuotesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostTaxesQuotesInternalServerError creates a PostTaxesQuotesInternalServerError with default headers values +func NewPostTaxesQuotesInternalServerError() *PostTaxesQuotesInternalServerError { + return &PostTaxesQuotesInternalServerError{} +} + +/*PostTaxesQuotesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostTaxesQuotesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *ops_models.Error +} + +func (o *PostTaxesQuotesInternalServerError) Error() string { + return fmt.Sprintf("[POST /taxes/quotes][%d] postTaxesQuotesInternalServerError %+v", 500, o.Payload) +} + +func (o *PostTaxesQuotesInternalServerError) GetPayload() *ops_models.Error { + return o.Payload +} + +func (o *PostTaxesQuotesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(ops_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/ops/v0.0.1/ops_client/tax/tax_client.go b/api/ops/v0.0.1/ops_client/tax/tax_client.go new file mode 100644 index 0000000..df5726f --- /dev/null +++ b/api/ops/v0.0.1/ops_client/tax/tax_client.go @@ -0,0 +1,196 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package tax + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new tax API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for tax API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + PostTaxesInvoices(params *PostTaxesInvoicesParams, authInfo runtime.ClientAuthInfoWriter) (*PostTaxesInvoicesOK, error) + + PostTaxesOrders(params *PostTaxesOrdersParams, authInfo runtime.ClientAuthInfoWriter) (*PostTaxesOrdersOK, error) + + PostTaxesPos(params *PostTaxesPosParams, authInfo runtime.ClientAuthInfoWriter) (*PostTaxesPosOK, error) + + PostTaxesQuotes(params *PostTaxesQuotesParams, authInfo runtime.ClientAuthInfoWriter) (*PostTaxesQuotesOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + PostTaxesInvoices rates a list of invoices + + Rate a list of invoices +*/ +func (a *Client) PostTaxesInvoices(params *PostTaxesInvoicesParams, authInfo runtime.ClientAuthInfoWriter) (*PostTaxesInvoicesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostTaxesInvoicesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postTaxesInvoices", + Method: "POST", + PathPattern: "/taxes/invoices", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostTaxesInvoicesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostTaxesInvoicesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postTaxesInvoices: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostTaxesOrders rates a list of orders + + Rate a list of invoices +*/ +func (a *Client) PostTaxesOrders(params *PostTaxesOrdersParams, authInfo runtime.ClientAuthInfoWriter) (*PostTaxesOrdersOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostTaxesOrdersParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postTaxesOrders", + Method: "POST", + PathPattern: "/taxes/orders", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostTaxesOrdersReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostTaxesOrdersOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postTaxesOrders: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostTaxesPos rates a list of purchase orders + + Rate a list of purchase orders +*/ +func (a *Client) PostTaxesPos(params *PostTaxesPosParams, authInfo runtime.ClientAuthInfoWriter) (*PostTaxesPosOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostTaxesPosParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postTaxesPos", + Method: "POST", + PathPattern: "/taxes/pos", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostTaxesPosReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostTaxesPosOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postTaxesPos: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + PostTaxesQuotes rates a list of quotes + + Rate a list of quotes +*/ +func (a *Client) PostTaxesQuotes(params *PostTaxesQuotesParams, authInfo runtime.ClientAuthInfoWriter) (*PostTaxesQuotesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostTaxesQuotesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postTaxesQuotes", + Method: "POST", + PathPattern: "/taxes/quotes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostTaxesQuotesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostTaxesQuotesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postTaxesQuotes: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/ops/v0.0.1/ops_models/address.go b/api/ops/v0.0.1/ops_models/address.go new file mode 100644 index 0000000..79f5113 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/address.go @@ -0,0 +1,65 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Address address +// +// swagger:model Address +type Address struct { + + // City + City string `json:"City,omitempty"` + + // Country full name + Country string `json:"Country,omitempty"` + + // Country Code + CountryCode string `json:"CountryCode,omitempty"` + + // Postal Code + PostalCode string `json:"PostalCode,omitempty"` + + // State full name + State string `json:"State,omitempty"` + + // State Code + StateCode string `json:"StateCode,omitempty"` + + // Street number and name + Street string `json:"Street,omitempty"` +} + +// Validate validates this address +func (m *Address) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Address) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Address) UnmarshalBinary(b []byte) error { + var res Address + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/cash_receipt.go b/api/ops/v0.0.1/ops_models/cash_receipt.go new file mode 100644 index 0000000..8c561d6 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/cash_receipt.go @@ -0,0 +1,161 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// CashReceipt cash receipt +// +// swagger:model CashReceipt +type CashReceipt struct { + + // Account Name + AccountID string `json:"AccountID,omitempty"` + + // Amount + Amount float64 `json:"Amount,omitempty"` + + // Applied Amount + AppliedAmount float64 `json:"AppliedAmount,omitempty"` + + // Attempt Number + AttemptNumber float64 `json:"AttemptNumber,omitempty"` + + // Audit Trail Message + AuditMessage string `json:"AuditMessage,omitempty"` + + // Autopay? + AutoPay bool `json:"AutoPay,omitempty"` + + // Billing Contact + BillingContactID string `json:"BillingContactID,omitempty"` + + // Journal Date + CashReceiptDate string `json:"CashReceiptDate,omitempty"` + + // Journal Date + CashReceiptNumber string `json:"CashReceiptNumber,omitempty"` + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Memo + Description string `json:"Description,omitempty"` + + // Gateway + Gateway string `json:"Gateway,omitempty"` + + // Gateway Key + GatewayKey string `json:"GatewayKey,omitempty"` + + // Gateway Message + GatewayMessage string `json:"GatewayMessage,omitempty"` + + // GatewayTxn? + GatewayTransaction bool `json:"GatewayTransaction,omitempty"` + + // Salesforce Record Id + ID string `json:"ID,omitempty"` + + // Is Valid? + IsValid bool `json:"IsValid,omitempty"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Partner Account + PartnerAccountID string `json:"PartnerAccountID,omitempty"` + + // Payment Method + PaymentMethodID string `json:"PaymentMethodID,omitempty"` + + // Payment Number + PaymentNumber string `json:"PaymentNumber,omitempty"` + + // Pending? + Pending bool `json:"Pending,omitempty"` + + // Period + PeriodID string `json:"PeriodID,omitempty"` + + // Posted to external system? + Posted bool `json:"Posted,omitempty"` + + // Processed + Processed bool `json:"Processed,omitempty"` + + // Processing + Processing bool `json:"Processing,omitempty"` + + // Record Type + RecordTypeID string `json:"RecordTypeID,omitempty"` + + // Reference + Ref string `json:"Ref,omitempty"` + + // Reference Number + ReferenceNumber string `json:"ReferenceNumber,omitempty"` + + // Rejected? + Rejected bool `json:"Rejected,omitempty"` + + // Source Payment Method + Source string `json:"Source,omitempty"` + + // Payment Status + Status string `json:"Status,omitempty"` + + // ID of the Tenant that owns this object + TenantID string `json:"TenantID,omitempty"` + + // Type + Type string `json:"Type,omitempty"` + + // Unapplied Amount + UnappliedAmount float64 `json:"UnappliedAmount,omitempty"` + + // Valid Payment? + ValidPayment bool `json:"ValidPayment,omitempty"` + + // Xero Credit Note Id + XeroID string `json:"XeroID,omitempty"` +} + +// Validate validates this cash receipt +func (m *CashReceipt) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *CashReceipt) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CashReceipt) UnmarshalBinary(b []byte) error { + var res CashReceipt + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/cash_receipt_request.go b/api/ops/v0.0.1/ops_models/cash_receipt_request.go new file mode 100644 index 0000000..51aa858 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/cash_receipt_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// CashReceiptRequest cash receipt request +// +// swagger:model CashReceiptRequest +type CashReceiptRequest struct { + + // data + Data []*CashReceipt `json:"Data"` +} + +// Validate validates this cash receipt request +func (m *CashReceiptRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *CashReceiptRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *CashReceiptRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CashReceiptRequest) UnmarshalBinary(b []byte) error { + var res CashReceiptRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/cash_receipt_response.go b/api/ops/v0.0.1/ops_models/cash_receipt_response.go new file mode 100644 index 0000000..37baef8 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/cash_receipt_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// CashReceiptResponse An array of Account objects with Contacts +// +// swagger:model CashReceiptResponse +type CashReceiptResponse struct { + + // data + Data []*CashReceipt `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this cash receipt response +func (m *CashReceiptResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *CashReceiptResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *CashReceiptResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *CashReceiptResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CashReceiptResponse) UnmarshalBinary(b []byte) error { + var res CashReceiptResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/charge.go b/api/ops/v0.0.1/ops_models/charge.go new file mode 100644 index 0000000..eb6a46f --- /dev/null +++ b/api/ops/v0.0.1/ops_models/charge.go @@ -0,0 +1,107 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Charge charge +// +// swagger:model Charge +type Charge struct { + + // Account + AccountID string `json:"AccountID,omitempty"` + + // Amount + Amount float64 `json:"Amount,omitempty"` + + // Billing Contact ID + BillingContactID string `json:"BillingContactID,omitempty"` + + // Contract + ContractID string `json:"ContractID,omitempty"` + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Description + Description string `json:"Description,omitempty"` + + // Email Message + EmailMessage string `json:"EmailMessage,omitempty"` + + // External Message + ExternalMessage string `json:"ExternalMessage,omitempty"` + + // Salesforce Record Id + ID string `json:"ID,omitempty"` + + // Journal Date + JournalDate string `json:"JournalDate,omitempty"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Partner Account + PartnerAccountID string `json:"PartnerAccountID,omitempty"` + + // Payment Terms + PaymentTerms string `json:"PaymentTerms,omitempty"` + + // Period + PeriodID string `json:"PeriodID,omitempty"` + + // Posted to external system? + Posted bool `json:"Posted,omitempty"` + + // Product + ProductID string `json:"ProductID,omitempty"` + + // Quantity + Quantity float64 `json:"Quantity,omitempty"` + + // ID of the Tenant that owns this object + TenantID string `json:"TenantID,omitempty"` + + // Unit Price + UnitPrice float64 `json:"UnitPrice,omitempty"` +} + +// Validate validates this charge +func (m *Charge) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Charge) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Charge) UnmarshalBinary(b []byte) error { + var res Charge + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/charge_request.go b/api/ops/v0.0.1/ops_models/charge_request.go new file mode 100644 index 0000000..df1c8a8 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/charge_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ChargeRequest charge request +// +// swagger:model ChargeRequest +type ChargeRequest struct { + + // data + Data []*Charge `json:"Data"` +} + +// Validate validates this charge request +func (m *ChargeRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ChargeRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ChargeRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ChargeRequest) UnmarshalBinary(b []byte) error { + var res ChargeRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/charge_response.go b/api/ops/v0.0.1/ops_models/charge_response.go new file mode 100644 index 0000000..760e69e --- /dev/null +++ b/api/ops/v0.0.1/ops_models/charge_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ChargeResponse An array of ChargeObject objects +// +// swagger:model ChargeResponse +type ChargeResponse struct { + + // data + Data []*Charge `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this charge response +func (m *ChargeResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ChargeResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ChargeResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ChargeResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ChargeResponse) UnmarshalBinary(b []byte) error { + var res ChargeResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/contract.go b/api/ops/v0.0.1/ops_models/contract.go new file mode 100644 index 0000000..12f3cd4 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/contract.go @@ -0,0 +1,98 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Contract contract +// +// swagger:model Contract +type Contract struct { + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Description + Description string `json:"Description,omitempty"` + + // Contract End Date + EndDate string `json:"EndDate,omitempty"` + + // Hourly Rate + HourlyRate float64 `json:"HourlyRate,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // Is Active? + IsActive bool `json:"IsActive,omitempty"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Contract Name + Name string `json:"Name,omitempty"` + + // UUID Reference the master record that owns this item + ParentFK string `json:"ParentFK,omitempty"` + + // Payment Terms + PaymentTerms string `json:"PaymentTerms,omitempty"` + + // Price Book + PriceBookID string `json:"PriceBookID,omitempty"` + + // Source System identifier for this record, if any + Ref string `json:"Ref,omitempty"` + + // Contract Start Date + StartDate string `json:"StartDate,omitempty"` + + // Status + Status string `json:"Status,omitempty"` + + // ID of the Tenant that owns this object + TenantID string `json:"TenantID,omitempty"` + + // Contract Type + Type string `json:"Type,omitempty"` +} + +// Validate validates this contract +func (m *Contract) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Contract) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Contract) UnmarshalBinary(b []byte) error { + var res Contract + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/credit_card.go b/api/ops/v0.0.1/ops_models/credit_card.go new file mode 100644 index 0000000..7403b95 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/credit_card.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// CreditCard credit card +// +// swagger:model CreditCard +type CreditCard struct { + + // Active + Active bool `json:"Active,omitempty"` + + // Billing City + BillingCity string `json:"BillingCity,omitempty"` + + // Billing Postal Code + BillingPostalcode string `json:"BillingPostalcode,omitempty"` + + // Billing State + BillingState string `json:"BillingState,omitempty"` + + // Billing Street + BillingStreet string `json:"BillingStreet,omitempty"` + + // CC Type + CCType string `json:"CCType,omitempty"` + + // CC Number + CcNumber string `json:"CcNumber,omitempty"` + + // Company + CompanyID string `json:"CompanyID,omitempty"` + + // Exp Month + ExpMonth string `json:"ExpMonth,omitempty"` + + // Exp Year + ExpYear string `json:"ExpYear,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // CC Name + Name string `json:"Name,omitempty"` + + // Source System identifier for this record, if any + Ref string `json:"Ref,omitempty"` + + // ID of the Tenant that owns this object + TenantID string `json:"TenantID,omitempty"` +} + +// Validate validates this credit card +func (m *CreditCard) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *CreditCard) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CreditCard) UnmarshalBinary(b []byte) error { + var res CreditCard + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/delete_response.go b/api/ops/v0.0.1/ops_models/delete_response.go new file mode 100644 index 0000000..dc356b3 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/delete_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// DeleteResponse delete response +// +// swagger:model DeleteResponse +type DeleteResponse struct { + + // data + Data []*Message `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this delete response +func (m *DeleteResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DeleteResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *DeleteResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *DeleteResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DeleteResponse) UnmarshalBinary(b []byte) error { + var res DeleteResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/eft.go b/api/ops/v0.0.1/ops_models/eft.go new file mode 100644 index 0000000..554ed55 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/eft.go @@ -0,0 +1,156 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Eft A group of Electronic Fund Transfer Items posted to a payment gateway +// +// swagger:model Eft +type Eft struct { + + // Account + AccountID string `json:"AccountID,omitempty"` + + // Amount + Amount float64 `json:"Amount,omitempty"` + + // Attempt Number + AttemptNumber float64 `json:"AttemptNumber,omitempty"` + + // Backend + BackendID string `json:"BackendID,omitempty"` + + // Billing Run + BillingRunID string `json:"BillingRunID,omitempty"` + + // Cash Receipt + CashReceiptID string `json:"CashReceiptID,omitempty"` + + // Created By + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Executed At + Executed string `json:"Executed,omitempty"` + + // Fee + Fee float64 `json:"Fee,omitempty"` + + // Gateway + Gateway string `json:"Gateway,omitempty"` + + // Gateway Key + GatewayKey string `json:"GatewayKey,omitempty"` + + // Gateway Message + GatewayMessage string `json:"GatewayMessage,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // The items associated with this EFT + Items []*EftItem `json:"Items"` + + // Journal Date + JournalDate string `json:"JournalDate,omitempty"` + + // Last Modified By + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Parent Foreign Key + ParentFK string `json:"ParentFK,omitempty"` + + // Payment Method + PaymentMethodID string `json:"PaymentMethodID,omitempty"` + + // External Reference + Ref string `json:"Ref,omitempty"` + + // Status + Status string `json:"Status,omitempty"` + + // ID of the Tenant that owns this object + TenantID string `json:"TenantID,omitempty"` + + // Transaction ID + TransactionID string `json:"TransactionID,omitempty"` + + // UUID + UUID string `json:"UUID,omitempty"` +} + +// Validate validates this eft +func (m *Eft) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Eft) validateItems(formats strfmt.Registry) error { + + if swag.IsZero(m.Items) { // not required + return nil + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Eft) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Eft) UnmarshalBinary(b []byte) error { + var res Eft + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/eft_item.go b/api/ops/v0.0.1/ops_models/eft_item.go new file mode 100644 index 0000000..db2b4ad --- /dev/null +++ b/api/ops/v0.0.1/ops_models/eft_item.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// EftItem An invoice reference that is batched in a single Eft +// +// swagger:model EftItem +type EftItem struct { + + // Amount + Amount float64 `json:"Amount,omitempty"` + + // Created By + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // EFT + EftID string `json:"EftID,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // Invoice + InvoiceID string `json:"InvoiceID,omitempty"` + + // Last Modified By + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // ID of the Tenant that owns this object + TenantID string `json:"TenantID,omitempty"` +} + +// Validate validates this eft item +func (m *EftItem) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *EftItem) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *EftItem) UnmarshalBinary(b []byte) error { + var res EftItem + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/eft_request.go b/api/ops/v0.0.1/ops_models/eft_request.go new file mode 100644 index 0000000..4cd5445 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/eft_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// EftRequest eft request +// +// swagger:model EftRequest +type EftRequest struct { + + // data + Data []*Eft `json:"Data"` +} + +// Validate validates this eft request +func (m *EftRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *EftRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *EftRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *EftRequest) UnmarshalBinary(b []byte) error { + var res EftRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/eft_response.go b/api/ops/v0.0.1/ops_models/eft_response.go new file mode 100644 index 0000000..be69d93 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/eft_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// EftResponse eft response +// +// swagger:model EftResponse +type EftResponse struct { + + // data + Data []*Eft `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this eft response +func (m *EftResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *EftResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *EftResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *EftResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *EftResponse) UnmarshalBinary(b []byte) error { + var res EftResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/error.go b/api/ops/v0.0.1/ops_models/error.go new file mode 100644 index 0000000..108c7cb --- /dev/null +++ b/api/ops/v0.0.1/ops_models/error.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Error error +// +// swagger:model Error +type Error struct { + + // code + Code int64 `json:"code,omitempty"` + + // fields + Fields string `json:"fields,omitempty"` + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this error +func (m *Error) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Error) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Error) UnmarshalBinary(b []byte) error { + var res Error + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/invalid_error.go b/api/ops/v0.0.1/ops_models/invalid_error.go new file mode 100644 index 0000000..0a01f18 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/invalid_error.go @@ -0,0 +1,104 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// InvalidError invalid error +// +// swagger:model InvalidError +type InvalidError struct { + Error + + // details + Details []string `json:"details"` +} + +// UnmarshalJSON unmarshals this object from a JSON structure +func (m *InvalidError) UnmarshalJSON(raw []byte) error { + // AO0 + var aO0 Error + if err := swag.ReadJSON(raw, &aO0); err != nil { + return err + } + m.Error = aO0 + + // AO1 + var dataAO1 struct { + Details []string `json:"details"` + } + if err := swag.ReadJSON(raw, &dataAO1); err != nil { + return err + } + + m.Details = dataAO1.Details + + return nil +} + +// MarshalJSON marshals this object to a JSON structure +func (m InvalidError) MarshalJSON() ([]byte, error) { + _parts := make([][]byte, 0, 2) + + aO0, err := swag.WriteJSON(m.Error) + if err != nil { + return nil, err + } + _parts = append(_parts, aO0) + var dataAO1 struct { + Details []string `json:"details"` + } + + dataAO1.Details = m.Details + + jsonDataAO1, errAO1 := swag.WriteJSON(dataAO1) + if errAO1 != nil { + return nil, errAO1 + } + _parts = append(_parts, jsonDataAO1) + return swag.ConcatJSON(_parts...), nil +} + +// Validate validates this invalid error +func (m *InvalidError) Validate(formats strfmt.Registry) error { + var res []error + + // validation for a type composition with Error + if err := m.Error.Validate(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// MarshalBinary interface implementation +func (m *InvalidError) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *InvalidError) UnmarshalBinary(b []byte) error { + var res InvalidError + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/invoice.go b/api/ops/v0.0.1/ops_models/invoice.go new file mode 100644 index 0000000..0a94dd3 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/invoice.go @@ -0,0 +1,474 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Invoice invoice +// +// swagger:model Invoice +type Invoice struct { + + // Account ID + AccountID string `json:"AccountID,omitempty"` + + // Advance? + Advance bool `json:"Advance,omitempty"` + + // Invoice Amount + Amount float64 `json:"Amount,omitempty"` + + // Amount Adjustment + AmountAdjustment float64 `json:"AmountAdjustment,omitempty"` + + // Amount Due + AmountDue float64 `json:"AmountDue,omitempty"` + + // Amount Paid + AmountPaid float64 `json:"AmountPaid,omitempty"` + + // Audit Trail Message + AuditMessage string `json:"AuditMessage,omitempty"` + + // billing address + BillingAddress *Address `json:"BillingAddress,omitempty"` + + // Billing Contact ID + BillingContactID string `json:"BillingContactID,omitempty"` + + // Billing Run + BillingRunID string `json:"BillingRunID,omitempty"` + + // business address + BusinessAddress *Address `json:"BusinessAddress,omitempty"` + + // The amount of Deferred Tax incurred with this invoice + BusinessTax float64 `json:"BusinessTax,omitempty"` + + // Cannabis Tax + CannabisTax float64 `json:"CannabisTax,omitempty"` + + // Contract + ContractID string `json:"ContractID,omitempty"` + + // The ID of the Coordinate used to rate this item + CoordinateID string `json:"CoordinateID,omitempty"` + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Customer ID + CustomerID string `json:"CustomerID,omitempty"` + + // Date Issued + DateIssued string `json:"DateIssued,omitempty"` + + // Days Due + DaysDue int64 `json:"DaysDue,omitempty"` + + // Deposit Amount + DepositAmount float64 `json:"DepositAmount,omitempty"` + + // Description + Description string `json:"Description,omitempty"` + + // Discount + Discount float64 `json:"Discount,omitempty"` + + // Invoice Total from source system + EstimatedAmount float64 `json:"EstimatedAmount,omitempty"` + + // Invoice Total from source system + EstimatedBusinessTax float64 `json:"EstimatedBusinessTax,omitempty"` + + // Invoice Total from source system + EstimatedCOGS float64 `json:"EstimatedCOGS,omitempty"` + + // Cannabis Tax from source system + EstimatedCannabisTax float64 `json:"EstimatedCannabisTax,omitempty"` + + // Cannabis Tax from source system + EstimatedDiscount float64 `json:"EstimatedDiscount,omitempty"` + + // Sales Tax from source system + EstimatedSalesTax float64 `json:"EstimatedSalesTax,omitempty"` + + // Invoice Subtotal from source system + EstimatedSubtotal float64 `json:"EstimatedSubtotal,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // ID of the Ingest which created this Invoice + IngestID string `json:"IngestID,omitempty"` + + // Invoice Date + InvoiceDate string `json:"InvoiceDate,omitempty"` + + // Invoice Number + InvoiceNumber string `json:"InvoiceNumber,omitempty"` + + // Is International? + IsInternational bool `json:"IsInternational,omitempty"` + + // Is Valid? + IsValid bool `json:"IsValid,omitempty"` + + // Issued Account Balance + IssuedAccountBalance float64 `json:"IssuedAccountBalance,omitempty"` + + // Issued Amount Due + IssuedAmountDue float64 `json:"IssuedAmountDue,omitempty"` + + // Issued By + IssuedByID string `json:"IssuedByID,omitempty"` + + // The items associated with this Invoice + Items []*InvoiceItem `json:"Items"` + + // ID of the Job which created this Invoice + JobID string `json:"JobID,omitempty"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Minimum Payment Due + MinimumPaymentDue float64 `json:"MinimumPaymentDue,omitempty"` + + // Monthly Amount + MonthlyAmount float64 `json:"MonthlyAmount,omitempty"` + + // Opportunity + OpportunityID string `json:"OpportunityID,omitempty"` + + // Order + OrderID string `json:"OrderID,omitempty"` + + // Overdue0 + OverDue0 float64 `json:"OverDue0,omitempty"` + + // Overdue 120 Days Amount + OverDue120 float64 `json:"OverDue120,omitempty"` + + // Overdue 30 Days Amount + OverDue30 float64 `json:"OverDue30,omitempty"` + + // Overdue 45 Days Amount + OverDue45 float64 `json:"OverDue45,omitempty"` + + // Overdue 60 Days Amount + OverDue60 float64 `json:"OverDue60,omitempty"` + + // Overdue 90 Days Amount + OverDue90 float64 `json:"OverDue90,omitempty"` + + // UUID Reference the master record that owns this item + ParentFK string `json:"ParentFK,omitempty"` + + // Partner Account + PartnerAccountID string `json:"PartnerAccountID,omitempty"` + + // Payment Due + PaymentDue string `json:"PaymentDue,omitempty"` + + // Payment Method + PaymentMethod string `json:"PaymentMethod,omitempty"` + + // Payment Method + PaymentMethodID string `json:"PaymentMethodID,omitempty"` + + // Payment Terms + PaymentTerms string `json:"PaymentTerms,omitempty"` + + // Period + PeriodID string `json:"PeriodID,omitempty"` + + // The Taxnexus Geocode of the Place used for Situs + PlaceGeocode string `json:"PlaceGeocode,omitempty"` + + // Posted to external system? + Posted bool `json:"Posted,omitempty"` + + // Prior Account Balance + PriorAccountBalance float64 `json:"PriorAccountBalance,omitempty"` + + // Prior Adjustments + PriorAdjustments float64 `json:"PriorAdjustments,omitempty"` + + // Prior Invoice Amount + PriorInvoiceAmount float64 `json:"PriorInvoiceAmount,omitempty"` + + // Prior Invoice Date + PriorInvoiceDate string `json:"PriorInvoiceDate,omitempty"` + + // Prior Invoice + PriorInvoiceID string `json:"PriorInvoiceID,omitempty"` + + // Prior Payment Amount + PriorPaymentAmount float64 `json:"PriorPaymentAmount,omitempty"` + + // Prior Payment Date + PriorPaymentDate string `json:"PriorPaymentDate,omitempty"` + + // Prior Payment + PriorPaymentID string `json:"PriorPaymentID,omitempty"` + + // Prior Payment Memo + PriorPaymentMemo string `json:"PriorPaymentMemo,omitempty"` + + // Prorated? + Prorated bool `json:"Prorated,omitempty"` + + // Prorated Days + ProtratedDays float64 `json:"ProtratedDays,omitempty"` + + // Purchase Amount + PurchaseAmount float64 `json:"PurchaseAmount,omitempty"` + + // Quote + QuoteID string `json:"QuoteID,omitempty"` + + // The ID of the Rating Engine that rated this invoice + RatingEngineID string `json:"RatingEngineID,omitempty"` + + // Source System identifier for this record, if any + Ref string `json:"Ref,omitempty"` + + // Reference + Reference string `json:"Reference,omitempty"` + + // Sales Regulation Type (Medicinal or Recreational) + SalesRegulation string `json:"SalesRegulation,omitempty"` + + // Sales Tax + SalesTax float64 `json:"SalesTax,omitempty"` + + // Scheduled Payment Date + ScheduledPaymentDate string `json:"ScheduledPaymentDate,omitempty"` + + // Service Term + ServiceTerm string `json:"ServiceTerm,omitempty"` + + // shipping address + ShippingAddress *Address `json:"ShippingAddress,omitempty"` + + // Shipping & Handling + ShippingHandling float64 `json:"ShippingHandling,omitempty"` + + // Status + Status string `json:"Status,omitempty"` + + // Subtotal + Subtotal float64 `json:"Subtotal,omitempty"` + + // The taxes associated with this Invoice + TaxTransactions []*TaxTransaction `json:"TaxTransactions"` + + // Telecom Tax + TelecomTax float64 `json:"TelecomTax,omitempty"` + + // Template + TemplateID string `json:"TemplateID,omitempty"` + + // ID of the Tenant that owns this object + TenantID string `json:"TenantID,omitempty"` + + // total + Total *Total `json:"Total,omitempty"` + + // Type + Type string `json:"Type,omitempty"` +} + +// Validate validates this invoice +func (m *Invoice) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBillingAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateBusinessAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateShippingAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTaxTransactions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTotal(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Invoice) validateBillingAddress(formats strfmt.Registry) error { + + if swag.IsZero(m.BillingAddress) { // not required + return nil + } + + if m.BillingAddress != nil { + if err := m.BillingAddress.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("BillingAddress") + } + return err + } + } + + return nil +} + +func (m *Invoice) validateBusinessAddress(formats strfmt.Registry) error { + + if swag.IsZero(m.BusinessAddress) { // not required + return nil + } + + if m.BusinessAddress != nil { + if err := m.BusinessAddress.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("BusinessAddress") + } + return err + } + } + + return nil +} + +func (m *Invoice) validateItems(formats strfmt.Registry) error { + + if swag.IsZero(m.Items) { // not required + return nil + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *Invoice) validateShippingAddress(formats strfmt.Registry) error { + + if swag.IsZero(m.ShippingAddress) { // not required + return nil + } + + if m.ShippingAddress != nil { + if err := m.ShippingAddress.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ShippingAddress") + } + return err + } + } + + return nil +} + +func (m *Invoice) validateTaxTransactions(formats strfmt.Registry) error { + + if swag.IsZero(m.TaxTransactions) { // not required + return nil + } + + for i := 0; i < len(m.TaxTransactions); i++ { + if swag.IsZero(m.TaxTransactions[i]) { // not required + continue + } + + if m.TaxTransactions[i] != nil { + if err := m.TaxTransactions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("TaxTransactions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *Invoice) validateTotal(formats strfmt.Registry) error { + + if swag.IsZero(m.Total) { // not required + return nil + } + + if m.Total != nil { + if err := m.Total.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Total") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Invoice) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Invoice) UnmarshalBinary(b []byte) error { + var res Invoice + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/invoice_basic.go b/api/ops/v0.0.1/ops_models/invoice_basic.go new file mode 100644 index 0000000..d99ab78 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/invoice_basic.go @@ -0,0 +1,244 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// InvoiceBasic invoice basic +// +// swagger:model InvoiceBasic +type InvoiceBasic struct { + + // Account Identifier from Source System + AccountID string `json:"AccountID,omitempty"` + + // Invoice Amount + Amount float64 `json:"Amount,omitempty"` + + // Amount Due + AmountDue float64 `json:"AmountDue,omitempty"` + + // business address + BusinessAddress *Address `json:"BusinessAddress,omitempty"` + + // OEM Customer Identifier + CustomerID string `json:"CustomerID,omitempty"` + + // Invoice Total from source system + EstimatedAmount float64 `json:"EstimatedAmount,omitempty"` + + // Business tax from source system + EstimatedBusinessTax float64 `json:"EstimatedBusinessTax,omitempty"` + + // Cost of Goods Sold from source system + EstimatedCOGS float64 `json:"EstimatedCOGS,omitempty"` + + // Cannabis Tax from source system + EstimatedCannabisTax float64 `json:"EstimatedCannabisTax,omitempty"` + + // Cannabis Tax from source system + EstimatedDiscount float64 `json:"EstimatedDiscount,omitempty"` + + // Sales Tax from source system + EstimatedSalesTax float64 `json:"EstimatedSalesTax,omitempty"` + + // Invoice Subtotal from source system + EstimatedSubtotal float64 `json:"EstimatedSubtotal,omitempty"` + + // Taxnexus ID + ID string `json:"ID,omitempty"` + + // ID of the Ingest which created this Invoice + IngestID string `json:"IngestID,omitempty"` + + // Invoice Date; should be date only or correct time zone if in time notation + InvoiceDate string `json:"InvoiceDate,omitempty"` + + // Source System Customer-Facing Invoice Number; ignored in tax calculation + InvoiceNumber string `json:"InvoiceNumber,omitempty"` + + // The items associated with this Invoice + Items []*ItemBasic `json:"Items"` + + // ID of the Job which created this Invoice + JobID string `json:"JobID,omitempty"` + + // UUID Reference the master record that owns this item + ParentFK string `json:"ParentFK,omitempty"` + + // Taxnexus Period ID + PeriodID string `json:"PeriodID,omitempty"` + + // The Taxnexus Geocode of the Place used for Situs + PlaceGeocode string `json:"PlaceGeocode,omitempty"` + + // Source System identifier for this record, if any + Ref string `json:"Ref,omitempty"` + + // Sales Regulation Type + SalesRegulation string `json:"SalesRegulation,omitempty"` + + // Shipping and Handling fees for this document + ShippingHandling float64 `json:"ShippingHandling,omitempty"` + + // Status used by for Billing Balances; ignored in tax calculation + Status string `json:"Status,omitempty"` + + // Subtotal of items + Subtotal float64 `json:"Subtotal,omitempty"` + + // The Tax Transactions "Source System identifier for this record, if any; copied to invoiceitemid in Tax Transaction result records" + TaxTransactions []*TaxTransaction `json:"TaxTransactions"` + + // ID of the Tenant that owns this object + TenantID string `json:"TenantID,omitempty"` + + // total + Total *Total `json:"Total,omitempty"` + + // Invoice Type + Type string `json:"Type,omitempty"` +} + +// Validate validates this invoice basic +func (m *InvoiceBasic) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBusinessAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTaxTransactions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTotal(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *InvoiceBasic) validateBusinessAddress(formats strfmt.Registry) error { + + if swag.IsZero(m.BusinessAddress) { // not required + return nil + } + + if m.BusinessAddress != nil { + if err := m.BusinessAddress.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("BusinessAddress") + } + return err + } + } + + return nil +} + +func (m *InvoiceBasic) validateItems(formats strfmt.Registry) error { + + if swag.IsZero(m.Items) { // not required + return nil + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *InvoiceBasic) validateTaxTransactions(formats strfmt.Registry) error { + + if swag.IsZero(m.TaxTransactions) { // not required + return nil + } + + for i := 0; i < len(m.TaxTransactions); i++ { + if swag.IsZero(m.TaxTransactions[i]) { // not required + continue + } + + if m.TaxTransactions[i] != nil { + if err := m.TaxTransactions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("TaxTransactions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *InvoiceBasic) validateTotal(formats strfmt.Registry) error { + + if swag.IsZero(m.Total) { // not required + return nil + } + + if m.Total != nil { + if err := m.Total.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Total") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *InvoiceBasic) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *InvoiceBasic) UnmarshalBinary(b []byte) error { + var res InvoiceBasic + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/invoice_item.go b/api/ops/v0.0.1/ops_models/invoice_item.go new file mode 100644 index 0000000..175d499 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/invoice_item.go @@ -0,0 +1,131 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// InvoiceItem invoice item +// +// swagger:model InvoiceItem +type InvoiceItem struct { + + // Cost of Goods Sold + COGS float64 `json:"COGS,omitempty"` + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Line Item Description + Description string `json:"Description,omitempty"` + + // Family + Family string `json:"Family,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // Invoice + InvoiceID string `json:"InvoiceID,omitempty"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // List Price + ListPrice float64 `json:"ListPrice,omitempty"` + + // Quantity + MRCInterval int64 `json:"MRCInterval,omitempty"` + + // Order Item + OrderItemID string `json:"OrderItemID,omitempty"` + + // UUID Reference the master record that owns this item + ParentFK string `json:"ParentFK,omitempty"` + + // Product Code + ProductCode string `json:"ProductCode,omitempty"` + + // Product + ProductID string `json:"ProductID,omitempty"` + + // Quantity + Quantity float64 `json:"Quantity,omitempty"` + + // Quote Line Item + QuoteItemID string `json:"QuoteItemID,omitempty"` + + // Source System identifier for this record, if any + Ref string `json:"Ref,omitempty"` + + // Rejected Quantity + RejectedQuantity float64 `json:"RejectedQuantity,omitempty"` + + // SKU + SKU string `json:"SKU,omitempty"` + + // Shipped Quantity + ShippedQuantity float64 `json:"ShippedQuantity,omitempty"` + + // Shipping & Handling + ShippingHandling float64 `json:"ShippingHandling,omitempty"` + + // Subscription + SubscriptionID string `json:"SubscriptionID,omitempty"` + + // Subtotal + Subtotal float64 `json:"Subtotal,omitempty"` + + // Taxnexus Code + TaxnexusCode string `json:"TaxnexusCode,omitempty"` + + // ID of the Tenant that owns this object + TenantID string `json:"TenantID,omitempty"` + + // Total Price + TotalPrice float64 `json:"TotalPrice,omitempty"` + + // Unit Price + UnitPrice float64 `json:"UnitPrice,omitempty"` + + // The Unit of Measure for this item + Units string `json:"Units,omitempty"` +} + +// Validate validates this invoice item +func (m *InvoiceItem) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *InvoiceItem) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *InvoiceItem) UnmarshalBinary(b []byte) error { + var res InvoiceItem + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/invoice_request.go b/api/ops/v0.0.1/ops_models/invoice_request.go new file mode 100644 index 0000000..3009214 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/invoice_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// InvoiceRequest invoice request +// +// swagger:model InvoiceRequest +type InvoiceRequest struct { + + // data + Data []*InvoiceBasic `json:"Data"` +} + +// Validate validates this invoice request +func (m *InvoiceRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *InvoiceRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *InvoiceRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *InvoiceRequest) UnmarshalBinary(b []byte) error { + var res InvoiceRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/invoice_response.go b/api/ops/v0.0.1/ops_models/invoice_response.go new file mode 100644 index 0000000..53bd3dc --- /dev/null +++ b/api/ops/v0.0.1/ops_models/invoice_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// InvoiceResponse invoice response +// +// swagger:model InvoiceResponse +type InvoiceResponse struct { + + // data + Data []*Invoice `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this invoice response +func (m *InvoiceResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *InvoiceResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *InvoiceResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *InvoiceResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *InvoiceResponse) UnmarshalBinary(b []byte) error { + var res InvoiceResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/item_basic.go b/api/ops/v0.0.1/ops_models/item_basic.go new file mode 100644 index 0000000..c280393 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/item_basic.go @@ -0,0 +1,83 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ItemBasic item basic +// +// swagger:model ItemBasic +type ItemBasic struct { + + // Cost of Goods Sold + COGS float64 `json:"COGS,omitempty"` + + // Line Item Description + Description string `json:"Description,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // Monthly Recurring Charge Indicator + MRCInterval int64 `json:"MRCInterval,omitempty"` + + // UUID Reference the master record that owns this item + ParentFK string `json:"ParentFK,omitempty"` + + // Product Code + ProductCode string `json:"ProductCode,omitempty"` + + // Quantity + Quantity float64 `json:"Quantity,omitempty"` + + // Source System identifier for this record, if any + Ref string `json:"Ref,omitempty"` + + // Shipping & Handling and Delivery Fees for this Item + ShippingHandling float64 `json:"ShippingHandling,omitempty"` + + // Subtotal + Subtotal float64 `json:"Subtotal,omitempty"` + + // Taxnexus Code + TaxnexusCode string `json:"TaxnexusCode,omitempty"` + + // Unit Price + UnitPrice float64 `json:"UnitPrice,omitempty"` + + // The Unit of Measure for this item + Units string `json:"Units,omitempty"` +} + +// Validate validates this item basic +func (m *ItemBasic) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ItemBasic) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ItemBasic) UnmarshalBinary(b []byte) error { + var res ItemBasic + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/message.go b/api/ops/v0.0.1/ops_models/message.go new file mode 100644 index 0000000..063dac5 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/message.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Message message +// +// swagger:model Message +type Message struct { + + // message + Message string `json:"message,omitempty"` + + // ref + Ref string `json:"ref,omitempty"` +} + +// Validate validates this message +func (m *Message) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Message) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Message) UnmarshalBinary(b []byte) error { + var res Message + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/order.go b/api/ops/v0.0.1/ops_models/order.go new file mode 100644 index 0000000..12818ad --- /dev/null +++ b/api/ops/v0.0.1/ops_models/order.go @@ -0,0 +1,432 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Order order +// +// swagger:model Order +type Order struct { + + // Account ID + AccountID string `json:"AccountID,omitempty"` + + // Activated By ID + ActivatedByID string `json:"ActivatedByID,omitempty"` + + // Activated Date + ActivatedDate string `json:"ActivatedDate,omitempty"` + + // Order Amount + Amount float64 `json:"Amount,omitempty"` + + // Order Amount Due + AmountDue float64 `json:"AmountDue,omitempty"` + + // billing address + BillingAddress *Address `json:"BillingAddress,omitempty"` + + // Billing Contact ID + BillingContactID string `json:"BillingContactID,omitempty"` + + // business address + BusinessAddress *Address `json:"BusinessAddress,omitempty"` + + // The amount of Deferred Tax incurred with this invoice + BusinessTax float64 `json:"BusinessTax,omitempty"` + + // Cannabis Tax + CannabisTax float64 `json:"CannabisTax,omitempty"` + + // Company Authorized By + CompanyAuthorizedByID string `json:"CompanyAuthorizedByID,omitempty"` + + // Company Authorized Date + CompanyAuthorizedDate string `json:"CompanyAuthorizedDate,omitempty"` + + // Completion Status + Completion string `json:"Completion,omitempty"` + + // Contract End Date + ContractEndDate string `json:"ContractEndDate,omitempty"` + + // Contract Number + ContractID string `json:"ContractID,omitempty"` + + // The ID of the Tax Nexus Coordinate record + CoordinateID string `json:"CoordinateID,omitempty"` + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Customer Authorized By + CustomerAuthorizedBy string `json:"CustomerAuthorizedBy,omitempty"` + + // Customer Authorized Date + CustomerAuthorizedDate string `json:"CustomerAuthorizedDate,omitempty"` + + // Partner customer ID, if any + CustomerID string `json:"CustomerID,omitempty"` + + // Description + Description string `json:"Description,omitempty"` + + // Discount Percentage + Discount float64 `json:"Discount,omitempty"` + + // Discount Amount + DiscountAmount float64 `json:"DiscountAmount,omitempty"` + + // Order Start Date + EffectiveDate string `json:"EffectiveDate,omitempty"` + + // Order End Date + EndDate string `json:"EndDate,omitempty"` + + // End User Contact ID + EndUserID string `json:"EndUserID,omitempty"` + + // Invoice Total from source system + EstimatedAmount float64 `json:"EstimatedAmount,omitempty"` + + // Invoice Total from source system + EstimatedBusinessTax float64 `json:"EstimatedBusinessTax,omitempty"` + + // Invoice Total from source system + EstimatedCOGS float64 `json:"EstimatedCOGS,omitempty"` + + // Cannabis Tax from source system + EstimatedCannabisTax float64 `json:"EstimatedCannabisTax,omitempty"` + + // Cannabis Tax from source system + EstimatedDiscount float64 `json:"EstimatedDiscount,omitempty"` + + // Sales Tax from source system + EstimatedSalesTax float64 `json:"EstimatedSalesTax,omitempty"` + + // Invoice Subtotal from source system + EstimatedSubtotal float64 `json:"EstimatedSubtotal,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // The ID of the Ingest generated by this order + IngestID string `json:"IngestID,omitempty"` + + // Installation Date + InstallationDate string `json:"InstallationDate,omitempty"` + + // Invoice ID + InvoiceID string `json:"InvoiceID,omitempty"` + + // Reduction Order + IsReductionOrder bool `json:"IsReductionOrder,omitempty"` + + // The Order Items + Items []*OrderItem `json:"Items"` + + // The ID of the Job that generated this order, if any + JobID string `json:"JobID,omitempty"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Monthly Amount + MonthlyAmount float64 `json:"MonthlyAmount,omitempty"` + + // Open Order? + Open bool `json:"Open,omitempty"` + + // Opportunity + OpportunityID string `json:"OpportunityID,omitempty"` + + // Order Number + OrderNumber string `json:"OrderNumber,omitempty"` + + // Order Reference Number + OrderReferenceNumber string `json:"OrderReferenceNumber,omitempty"` + + // Original Order + OriginalOrderID string `json:"OriginalOrderID,omitempty"` + + // Order Owner + OwnerID string `json:"OwnerID,omitempty"` + + // PO Date + PODate string `json:"PODate,omitempty"` + + // UUID Reference the master record that owns this item + ParentFK string `json:"ParentFK,omitempty"` + + // Payment Method ID + PaymentMethodID string `json:"PaymentMethodID,omitempty"` + + // Payment Terms + PaymentTerms string `json:"PaymentTerms,omitempty"` + + // The ID of the Period in which this Order was made + PeriodID string `json:"PeriodID,omitempty"` + + // Place GeoCode + PlaceGeoCode string `json:"PlaceGeoCode,omitempty"` + + // Posted to external system? + Posted bool `json:"Posted,omitempty"` + + // Provisioning Status + ProvisioningStatus string `json:"ProvisioningStatus,omitempty"` + + // Purchase Amount + PurchaseAmount float64 `json:"PurchaseAmount,omitempty"` + + // PO ID + PurchaseOrderID string `json:"PurchaseOrderID,omitempty"` + + // Quote + QuoteID string `json:"QuoteID,omitempty"` + + // The ID of the Rating Engine that rated this invoice + RatingEngineID string `json:"RatingEngineID,omitempty"` + + // Order Record Type + RecordTypeID string `json:"RecordTypeID,omitempty"` + + // Source System identifier for this record, if any + Ref string `json:"Ref,omitempty"` + + // Sales Regulation Type + SalesRegulation string `json:"SalesRegulation,omitempty"` + + // Sales Tax + SalesTax float64 `json:"SalesTax,omitempty"` + + // Service Term + ServiceTerm string `json:"ServiceTerm,omitempty"` + + // shipping address + ShippingAddress *Address `json:"ShippingAddress,omitempty"` + + // Shipping Contact ID + ShippingContactID string `json:"ShippingContactID,omitempty"` + + // Shipping & Handling + ShippingHandling float64 `json:"ShippingHandling,omitempty"` + + // Status + Status string `json:"Status,omitempty"` + + // Subtotal + Subtotal float64 `json:"Subtotal,omitempty"` + + // The taxes associated with this Order + TaxTransactions []*TaxTransaction `json:"TaxTransactions"` + + // Telecom Tax + TelecomTax float64 `json:"TelecomTax,omitempty"` + + // Template + TemplateID string `json:"TemplateID,omitempty"` + + // ID of the Tenant that owns this object + TenantID string `json:"TenantID,omitempty"` + + // total + Total *Total `json:"Total,omitempty"` + + // Order Type + Type string `json:"Type,omitempty"` +} + +// Validate validates this order +func (m *Order) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBillingAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateBusinessAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateShippingAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTaxTransactions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTotal(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Order) validateBillingAddress(formats strfmt.Registry) error { + + if swag.IsZero(m.BillingAddress) { // not required + return nil + } + + if m.BillingAddress != nil { + if err := m.BillingAddress.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("BillingAddress") + } + return err + } + } + + return nil +} + +func (m *Order) validateBusinessAddress(formats strfmt.Registry) error { + + if swag.IsZero(m.BusinessAddress) { // not required + return nil + } + + if m.BusinessAddress != nil { + if err := m.BusinessAddress.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("BusinessAddress") + } + return err + } + } + + return nil +} + +func (m *Order) validateItems(formats strfmt.Registry) error { + + if swag.IsZero(m.Items) { // not required + return nil + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *Order) validateShippingAddress(formats strfmt.Registry) error { + + if swag.IsZero(m.ShippingAddress) { // not required + return nil + } + + if m.ShippingAddress != nil { + if err := m.ShippingAddress.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ShippingAddress") + } + return err + } + } + + return nil +} + +func (m *Order) validateTaxTransactions(formats strfmt.Registry) error { + + if swag.IsZero(m.TaxTransactions) { // not required + return nil + } + + for i := 0; i < len(m.TaxTransactions); i++ { + if swag.IsZero(m.TaxTransactions[i]) { // not required + continue + } + + if m.TaxTransactions[i] != nil { + if err := m.TaxTransactions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("TaxTransactions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *Order) validateTotal(formats strfmt.Registry) error { + + if swag.IsZero(m.Total) { // not required + return nil + } + + if m.Total != nil { + if err := m.Total.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Total") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Order) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Order) UnmarshalBinary(b []byte) error { + var res Order + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/order_item.go b/api/ops/v0.0.1/ops_models/order_item.go new file mode 100644 index 0000000..6a9b2f0 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/order_item.go @@ -0,0 +1,170 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// OrderItem order item +// +// swagger:model OrderItem +type OrderItem struct { + + // Activated? + Activated bool `json:"Activated,omitempty"` + + // Activated By + ActiveatedByID string `json:"ActiveatedByID,omitempty"` + + // Available Quantity + AvailableQuantity float64 `json:"AvailableQuantity,omitempty"` + + // Cost of Goods Sold + COGS float64 `json:"COGS,omitempty"` + + // Create Reservation? + CreateReservation bool `json:"CreateReservation,omitempty"` + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Date Delivered + DateDelivered string `json:"DateDelivered,omitempty"` + + // Date Ordered + DateOrdered string `json:"DateOrdered,omitempty"` + + // Date Promised + DatePromised string `json:"DatePromised,omitempty"` + + // Line Description + Description string `json:"Description,omitempty"` + + // Discount + Discount float64 `json:"Discount,omitempty"` + + // Family + Family string `json:"Family,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // Invoice Item + InvoiceItemID string `json:"InvoiceItemID,omitempty"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // List Price + ListPrice float64 `json:"ListPrice,omitempty"` + + // Location + LocationID string `json:"LocationID,omitempty"` + + // Monthly Recurring Charge Indicator + MRCInterval int64 `json:"MRCInterval,omitempty"` + + // Order + OrderID string `json:"OrderID,omitempty"` + + // Original Order Product + OriginalOrderItemID string `json:"OriginalOrderItemID,omitempty"` + + // UUID Reference the master record that owns this item + ParentFK string `json:"ParentFK,omitempty"` + + // Posted to external system? + Posted bool `json:"Posted,omitempty"` + + // Product Code + ProductCode string `json:"ProductCode,omitempty"` + + // Product + ProductID string `json:"ProductID,omitempty"` + + // Product Name + ProductName string `json:"ProductName,omitempty"` + + // Quantity + Quantity float64 `json:"Quantity,omitempty"` + + // Quantity On Hand + QuantityOnHand float64 `json:"QuantityOnHand,omitempty"` + + // Quote Line Item + QuoteItemID string `json:"QuoteItemID,omitempty"` + + // Source System identifier for this record, if any + Ref string `json:"Ref,omitempty"` + + // Start Date + ServiceDate string `json:"ServiceDate,omitempty"` + + // Shipping & Handling + ShippingHandling float64 `json:"ShippingHandling,omitempty"` + + // Status + Status string `json:"Status,omitempty"` + + // Subscription + SubscriptionID string `json:"SubscriptionID,omitempty"` + + // Subtotal + Subtotal float64 `json:"Subtotal,omitempty"` + + // Taxnexus Code Display + TaxnexusCodeDisplay string `json:"TaxnexusCodeDisplay,omitempty"` + + // Taxnexus Code + TaxnexusCodeID string `json:"TaxnexusCodeID,omitempty"` + + // ID of the Tenant that owns this object + TenantID string `json:"TenantID,omitempty"` + + // Total Price + TotalPrice float64 `json:"TotalPrice,omitempty"` + + // Unit Price + UnitPrice float64 `json:"UnitPrice,omitempty"` + + // Units + Units string `json:"Units,omitempty"` +} + +// Validate validates this order item +func (m *OrderItem) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *OrderItem) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *OrderItem) UnmarshalBinary(b []byte) error { + var res OrderItem + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/order_request.go b/api/ops/v0.0.1/ops_models/order_request.go new file mode 100644 index 0000000..dabf782 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/order_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// OrderRequest An array of Order objects +// +// swagger:model OrderRequest +type OrderRequest struct { + + // data + Data []*Order `json:"Data"` +} + +// Validate validates this order request +func (m *OrderRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *OrderRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *OrderRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *OrderRequest) UnmarshalBinary(b []byte) error { + var res OrderRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/order_response.go b/api/ops/v0.0.1/ops_models/order_response.go new file mode 100644 index 0000000..27d26eb --- /dev/null +++ b/api/ops/v0.0.1/ops_models/order_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// OrderResponse An array of Order objects +// +// swagger:model OrderResponse +type OrderResponse struct { + + // data + Data []*Order `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this order response +func (m *OrderResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *OrderResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *OrderResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *OrderResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *OrderResponse) UnmarshalBinary(b []byte) error { + var res OrderResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/pagination.go b/api/ops/v0.0.1/ops_models/pagination.go new file mode 100644 index 0000000..37f75f8 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/pagination.go @@ -0,0 +1,56 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Pagination pagination +// +// swagger:model Pagination +type Pagination struct { + + // limit + Limit int64 `json:"Limit,omitempty"` + + // offset + Offset int64 `json:"Offset,omitempty"` + + // page size + PageSize int64 `json:"PageSize,omitempty"` + + // set size + SetSize int64 `json:"SetSize,omitempty"` +} + +// Validate validates this pagination +func (m *Pagination) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Pagination) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Pagination) UnmarshalBinary(b []byte) error { + var res Pagination + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/payment_method.go b/api/ops/v0.0.1/ops_models/payment_method.go new file mode 100644 index 0000000..7f4e7b9 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/payment_method.go @@ -0,0 +1,125 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// PaymentMethod Describes the EFT or other payment information for an account and billing contact +// +// swagger:model PaymentMethod +type PaymentMethod struct { + + // Account + AccountID string `json:"AccountID,omitempty"` + + // ACH Account Type + AchAccountType string `json:"AchAccountType,omitempty"` + + // ACH Bank Account + AchBankAccount string `json:"AchBankAccount,omitempty"` + + // ACH Routing + AchRouting string `json:"AchRouting,omitempty"` + + // Active? + Active bool `json:"Active,omitempty"` + + // Autopay? + Autopay bool `json:"Autopay,omitempty"` + + // Bank Name + BankName string `json:"BankName,omitempty"` + + // Billing Contact + BillingContactID string `json:"BillingContactID,omitempty"` + + // Credit Card Number + CCnumber string `json:"CCnumber,omitempty"` + + // CC Type + CCtype string `json:"CCtype,omitempty"` + + // Company + CompanyID string `json:"CompanyID,omitempty"` + + // Contract + ContractID string `json:"ContractID,omitempty"` + + // Created By + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Default Payment Method? + Default bool `json:"Default,omitempty"` + + // Expiration Date + ExpirationDate string `json:"ExpirationDate,omitempty"` + + // Expiration Month + ExpirationMonth string `json:"ExpirationMonth,omitempty"` + + // Expiration Year + ExpirationYear string `json:"ExpirationYear,omitempty"` + + // Gateway + Gateway string `json:"Gateway,omitempty"` + + // Gateway Key + GatewayKey string `json:"GatewayKey,omitempty"` + + // Telnexus Record Id + ID string `json:"ID,omitempty"` + + // Last Modified By + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Nickname + Nickname string `json:"Nickname,omitempty"` + + // Record Type + RecordType string `json:"RecordType,omitempty"` + + // External Reference + Ref string `json:"Ref,omitempty"` + + // ID of the Tenant that owns this object + TenantID string `json:"TenantID,omitempty"` +} + +// Validate validates this payment method +func (m *PaymentMethod) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *PaymentMethod) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PaymentMethod) UnmarshalBinary(b []byte) error { + var res PaymentMethod + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/payment_method_request.go b/api/ops/v0.0.1/ops_models/payment_method_request.go new file mode 100644 index 0000000..8cab01a --- /dev/null +++ b/api/ops/v0.0.1/ops_models/payment_method_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// PaymentMethodRequest payment method request +// +// swagger:model PaymentMethodRequest +type PaymentMethodRequest struct { + + // data + Data []*PaymentMethod `json:"Data"` +} + +// Validate validates this payment method request +func (m *PaymentMethodRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PaymentMethodRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PaymentMethodRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PaymentMethodRequest) UnmarshalBinary(b []byte) error { + var res PaymentMethodRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/payment_method_response.go b/api/ops/v0.0.1/ops_models/payment_method_response.go new file mode 100644 index 0000000..5e5290c --- /dev/null +++ b/api/ops/v0.0.1/ops_models/payment_method_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// PaymentMethodResponse An array of Payment Method objects +// +// swagger:model PaymentMethodResponse +type PaymentMethodResponse struct { + + // data + Data []*PaymentMethod `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this payment method response +func (m *PaymentMethodResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PaymentMethodResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PaymentMethodResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PaymentMethodResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PaymentMethodResponse) UnmarshalBinary(b []byte) error { + var res PaymentMethodResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/pricebook.go b/api/ops/v0.0.1/ops_models/pricebook.go new file mode 100644 index 0000000..72763f4 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/pricebook.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Pricebook pricebook +// +// swagger:model Pricebook +type Pricebook struct { + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Description + Description string `json:"Description,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // Active + IsActive bool `json:"IsActive,omitempty"` + + // Is Standard Price Book + IsStandard bool `json:"IsStandard,omitempty"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Price Book Name + Name string `json:"Name,omitempty"` + + // ID of the Tenant that owns this object + TenantID string `json:"TenantID,omitempty"` +} + +// Validate validates this pricebook +func (m *Pricebook) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Pricebook) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Pricebook) UnmarshalBinary(b []byte) error { + var res Pricebook + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/pricebook_entry.go b/api/ops/v0.0.1/ops_models/pricebook_entry.go new file mode 100644 index 0000000..06d604f --- /dev/null +++ b/api/ops/v0.0.1/ops_models/pricebook_entry.go @@ -0,0 +1,83 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// PricebookEntry pricebook entry +// +// swagger:model PricebookEntry +type PricebookEntry struct { + + // Active + AccountID string `json:"AccountID,omitempty"` + + // Created By + AgentID string `json:"AgentID,omitempty"` + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Record Id + ID string `json:"ID,omitempty"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // pricebook ID + PricebookID string `json:"PricebookID,omitempty"` + + // Product Code + ProductCode string `json:"ProductCode,omitempty"` + + // ID of the Tenant that owns this object + TenantID string `json:"TenantID,omitempty"` + + // List Price + UnitPrice float64 `json:"UnitPrice,omitempty"` + + // Use Standard Price + UseStandardPrice bool `json:"UseStandardPrice,omitempty"` + + // procuct ID + ProcuctID string `json:"procuctID,omitempty"` +} + +// Validate validates this pricebook entry +func (m *PricebookEntry) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *PricebookEntry) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PricebookEntry) UnmarshalBinary(b []byte) error { + var res PricebookEntry + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/product.go b/api/ops/v0.0.1/ops_models/product.go new file mode 100644 index 0000000..b530afe --- /dev/null +++ b/api/ops/v0.0.1/ops_models/product.go @@ -0,0 +1,161 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Product product +// +// swagger:model Product +type Product struct { + + // The ID of the Account that owns this product + AccountID string `json:"AccountID,omitempty"` + + // Agency Type + AgencyType string `json:"AgencyType,omitempty"` + + // Asset Tracking? + AssetTracking bool `json:"AssetTracking,omitempty"` + + // ID of who created this record instance + CreatedByID string `json:"CreatedByID,omitempty"` + + // Date of record creation + CreatedDate string `json:"CreatedDate,omitempty"` + + // Product Description + Description string `json:"Description,omitempty"` + + // DescriptionSKU + DescriptionSKU string `json:"DescriptionSKU,omitempty"` + + // Display URL + DisplayURL string `json:"DisplayURL,omitempty"` + + // Product Family + Family string `json:"Family,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // Image (500) + Image500 string `json:"Image500,omitempty"` + + // Image (Full) + ImageFull string `json:"ImageFull,omitempty"` + + // Inventory Tracking? + InventoryTracking bool `json:"InventoryTracking,omitempty"` + + // Active + IsActive bool `json:"IsActive,omitempty"` + + // isGeneric + IsGeneric bool `json:"IsGeneric,omitempty"` + + // Last Modified Date + LastModifiedByDate string `json:"LastModifiedByDate,omitempty"` + + // Last modified by ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // MRC Interval + MRCInterval int64 `json:"MRCInterval,omitempty"` + + // MSRP + MSRP float64 `json:"MSRP,omitempty"` + + // Manufacturer + Manufacturer string `json:"Manufacturer,omitempty"` + + // Manufacturer Product Code + ManufacturerProductCode string `json:"ManufacturerProductCode,omitempty"` + + // Product Name + Name string `json:"Name,omitempty"` + + // Product Code + ProductCode string `json:"ProductCode,omitempty"` + + // Prorateable? + Prorateable bool `json:"Prorateable,omitempty"` + + // Publish? + Publish bool `json:"Publish,omitempty"` + + // Publish UPC + PublishUPC string `json:"PublishUPC,omitempty"` + + // Quantity Unit Of Measure + QuantityUnitOfMeasure string `json:"QuantityUnitOfMeasure,omitempty"` + + // Refundable? + Refundable bool `json:"Refundable,omitempty"` + + // SKU + SKU string `json:"SKU,omitempty"` + + // Shipping Weight + ShippingWeight float64 `json:"ShippingWeight,omitempty"` + + // Specifications + Specifications string `json:"Specifications,omitempty"` + + // Taxnexus Code Name + TaxnexusCode string `json:"TaxnexusCode,omitempty"` + + // Taxnexus Code + TaxnexusCodeID string `json:"TaxnexusCodeID,omitempty"` + + // tenant identifier + TenantID string `json:"TenantID,omitempty"` + + // Units + Units string `json:"Units,omitempty"` + + // Vendor + VendorID string `json:"VendorID,omitempty"` + + // Vendor Name + VendorName string `json:"VendorName,omitempty"` + + // Vendor Part Number + VendorPartNumber string `json:"VendorPartNumber,omitempty"` + + // Vendor Price + VendorPrice float64 `json:"VendorPrice,omitempty"` +} + +// Validate validates this product +func (m *Product) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Product) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Product) UnmarshalBinary(b []byte) error { + var res Product + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/product_request.go b/api/ops/v0.0.1/ops_models/product_request.go new file mode 100644 index 0000000..e56b69c --- /dev/null +++ b/api/ops/v0.0.1/ops_models/product_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ProductRequest product request +// +// swagger:model ProductRequest +type ProductRequest struct { + + // data + Data []*Product `json:"Data"` +} + +// Validate validates this product request +func (m *ProductRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ProductRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ProductRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ProductRequest) UnmarshalBinary(b []byte) error { + var res ProductRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/product_response.go b/api/ops/v0.0.1/ops_models/product_response.go new file mode 100644 index 0000000..710ef10 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/product_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ProductResponse An array of Product objects +// +// swagger:model ProductResponse +type ProductResponse struct { + + // data + Data []*Product `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this product response +func (m *ProductResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ProductResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ProductResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ProductResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ProductResponse) UnmarshalBinary(b []byte) error { + var res ProductResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/purchase_order.go b/api/ops/v0.0.1/ops_models/purchase_order.go new file mode 100644 index 0000000..e2361ff --- /dev/null +++ b/api/ops/v0.0.1/ops_models/purchase_order.go @@ -0,0 +1,390 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// PurchaseOrder purchase order +// +// swagger:model PurchaseOrder +type PurchaseOrder struct { + + // Account ID + AccountID string `json:"AccountID,omitempty"` + + // PO Amount + Amount float64 `json:"Amount,omitempty"` + + // billing address + BillingAddress *Address `json:"BillingAddress,omitempty"` + + // Billing Contact ID + BillingContactID string `json:"BillingContactID,omitempty"` + + // business address + BusinessAddress *Address `json:"BusinessAddress,omitempty"` + + // The amount of Deferred Tax incurred with this invoice + BusinessTax float64 `json:"BusinessTax,omitempty"` + + // Cannabis Tax + CannabisTax float64 `json:"CannabisTax,omitempty"` + + // Contract + ContractID string `json:"ContractID,omitempty"` + + // The ID of the Coordinate used to rate this item + CoordinateID string `json:"CoordinateID,omitempty"` + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // CC used for payment to vendor + CreditCardID string `json:"CreditCardID,omitempty"` + + // Customer ID + CustomerID string `json:"CustomerID,omitempty"` + + // Date Expires + DateExpires string `json:"DateExpires,omitempty"` + + // Date Promised + DatePromised string `json:"DatePromised,omitempty"` + + // Date Requested + DateRequested string `json:"DateRequested,omitempty"` + + // Description + Description string `json:"Description,omitempty"` + + // Discount Percentage + Discount float64 `json:"Discount,omitempty"` + + // Discount Amount + DiscountAmount float64 `json:"DiscountAmount,omitempty"` + + // Due Date + DueDate string `json:"DueDate,omitempty"` + + // End User Contact ID + EndUserID string `json:"EndUserID,omitempty"` + + // Invoice Total from source system + EstimatedAmount float64 `json:"EstimatedAmount,omitempty"` + + // Business tax from source system + EstimatedBusinessTax float64 `json:"EstimatedBusinessTax,omitempty"` + + // Cannabis Tax from source system + EstimatedCannabisTax float64 `json:"EstimatedCannabisTax,omitempty"` + + // Discount from source system + EstimatedDiscount float64 `json:"EstimatedDiscount,omitempty"` + + // Sales Tax from source system + EstimatedSalesTax float64 `json:"EstimatedSalesTax,omitempty"` + + // Invoice Subtotal from source system + EstimatedSubtotal float64 `json:"EstimatedSubtotal,omitempty"` + + // Expiration Date + ExpirationDate string `json:"ExpirationDate,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // The ID of the Ingest generated by this PO + IngestID string `json:"IngestID,omitempty"` + + // items + Items []*PurchaseOrderItem `json:"Items"` + + // ID of the Job which created this PO + JobID string `json:"JobID,omitempty"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Opportunity Name + OpportunityID string `json:"OpportunityID,omitempty"` + + // Order Number + OrderID string `json:"OrderID,omitempty"` + + // Date + PODate string `json:"PODate,omitempty"` + + // Number + PONumber string `json:"PONumber,omitempty"` + + // The record identifier from the source system + ParentFK string `json:"ParentFK,omitempty"` + + // Payment Terms + PaymentTerms string `json:"PaymentTerms,omitempty"` + + // Taxnexus Period ID + PeriodID string `json:"PeriodID,omitempty"` + + // Place GeoCode + PlaceGeoCode string `json:"PlaceGeoCode,omitempty"` + + // Posted to external system? + Posted bool `json:"Posted,omitempty"` + + // Quote Name + QuoteID string `json:"QuoteID,omitempty"` + + // Source System identifier for this record, if any + Ref string `json:"Ref,omitempty"` + + // Sales Regulation Type (Medicinal or Recreational) + SalesRegulation string `json:"SalesRegulation,omitempty"` + + // Sales Tax + SalesTax float64 `json:"SalesTax,omitempty"` + + // Service Term + ServiceTerm string `json:"ServiceTerm,omitempty"` + + // Ship Date + ShipDate string `json:"ShipDate,omitempty"` + + // shipping address + ShippingAddress *Address `json:"ShippingAddress,omitempty"` + + // Shipping Contact ID + ShippingContactID string `json:"ShippingContactID,omitempty"` + + // Shipping & Handling + ShippingHandling float64 `json:"ShippingHandling,omitempty"` + + // Shipping Special Instructions + ShippingSpecialInstructions string `json:"ShippingSpecialInstructions,omitempty"` + + // Status + Status string `json:"Status,omitempty"` + + // Subtotal + Subtotal float64 `json:"Subtotal,omitempty"` + + // The taxes associated with this Purchase Order + TaxTransactions []*TaxTransaction `json:"TaxTransactions"` + + // Telecom Tax + TelecomTax float64 `json:"TelecomTax,omitempty"` + + // ID of the Template used to render this object + TemplateID string `json:"TemplateID,omitempty"` + + // ID of the Tenant that owns this object + TenantID string `json:"TenantID,omitempty"` + + // total + Total *Total `json:"Total,omitempty"` + + // The ID of the totaling struct for this object + TotalID string `json:"TotalID,omitempty"` + + // Type + Type string `json:"Type,omitempty"` + + // Vendor Account ID + VendorID string `json:"VendorID,omitempty"` + + // Vendor Quote Number + VendorQuoteNumber string `json:"VendorQuoteNumber,omitempty"` +} + +// Validate validates this purchase order +func (m *PurchaseOrder) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBillingAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateBusinessAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateShippingAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTaxTransactions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTotal(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PurchaseOrder) validateBillingAddress(formats strfmt.Registry) error { + + if swag.IsZero(m.BillingAddress) { // not required + return nil + } + + if m.BillingAddress != nil { + if err := m.BillingAddress.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("BillingAddress") + } + return err + } + } + + return nil +} + +func (m *PurchaseOrder) validateBusinessAddress(formats strfmt.Registry) error { + + if swag.IsZero(m.BusinessAddress) { // not required + return nil + } + + if m.BusinessAddress != nil { + if err := m.BusinessAddress.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("BusinessAddress") + } + return err + } + } + + return nil +} + +func (m *PurchaseOrder) validateItems(formats strfmt.Registry) error { + + if swag.IsZero(m.Items) { // not required + return nil + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PurchaseOrder) validateShippingAddress(formats strfmt.Registry) error { + + if swag.IsZero(m.ShippingAddress) { // not required + return nil + } + + if m.ShippingAddress != nil { + if err := m.ShippingAddress.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ShippingAddress") + } + return err + } + } + + return nil +} + +func (m *PurchaseOrder) validateTaxTransactions(formats strfmt.Registry) error { + + if swag.IsZero(m.TaxTransactions) { // not required + return nil + } + + for i := 0; i < len(m.TaxTransactions); i++ { + if swag.IsZero(m.TaxTransactions[i]) { // not required + continue + } + + if m.TaxTransactions[i] != nil { + if err := m.TaxTransactions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("TaxTransactions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PurchaseOrder) validateTotal(formats strfmt.Registry) error { + + if swag.IsZero(m.Total) { // not required + return nil + } + + if m.Total != nil { + if err := m.Total.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Total") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PurchaseOrder) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PurchaseOrder) UnmarshalBinary(b []byte) error { + var res PurchaseOrder + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/purchase_order_item.go b/api/ops/v0.0.1/ops_models/purchase_order_item.go new file mode 100644 index 0000000..122e462 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/purchase_order_item.go @@ -0,0 +1,134 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// PurchaseOrderItem purchase order item +// +// swagger:model PurchaseOrderItem +type PurchaseOrderItem struct { + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Line Item Description + Description string `json:"Description,omitempty"` + + // Due Date + DueDate string `json:"DueDate,omitempty"` + + // Product Family + Family string `json:"Family,omitempty"` + + // Record Id + ID string `json:"ID,omitempty"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Location + LocationID string `json:"LocationID,omitempty"` + + // Monthly Recurring Cost Interval + MRCInterval int64 `json:"MRCInterval,omitempty"` + + // Order Item + OrderItemID string `json:"OrderItemID,omitempty"` + + // The record identifier of the parent record from the source system + ParentFK string `json:"ParentFK,omitempty"` + + // Product Code + ProductCode string `json:"ProductCode,omitempty"` + + // Product ID + ProductID string `json:"ProductID,omitempty"` + + // Purchase Order + PurchaseOrderID string `json:"PurchaseOrderID,omitempty"` + + // Quantity + Quantity float64 `json:"Quantity,omitempty"` + + // Quote Item + QuoteItemID string `json:"QuoteItemID,omitempty"` + + // Received Quantity + ReceivedQuantity float64 `json:"ReceivedQuantity,omitempty"` + + // Source System identifier for this record, if any + Ref string `json:"Ref,omitempty"` + + // Rejected Quantity + RejectedQuantity float64 `json:"RejectedQuantity,omitempty"` + + // Shipping costs for this item + ShippingHandling float64 `json:"ShippingHandling,omitempty"` + + // Shipment Item ID + ShippmentItemID string `json:"ShippmentItemID,omitempty"` + + // Status + Status string `json:"Status,omitempty"` + + // Stocked Quantity + StockedQuantity float64 `json:"StockedQuantity,omitempty"` + + // Subtotal + Subtotal float64 `json:"Subtotal,omitempty"` + + // Taxnexus Code + TaxnexusCodeDisplay string `json:"TaxnexusCodeDisplay,omitempty"` + + // Taxnexus Code + TaxnexusCodeID string `json:"TaxnexusCodeID,omitempty"` + + // ID of the Tenant that owns this object + TenantID string `json:"TenantID,omitempty"` + + // Unit Price + UnitPrice float64 `json:"UnitPrice,omitempty"` + + // Units + Units string `json:"Units,omitempty"` +} + +// Validate validates this purchase order item +func (m *PurchaseOrderItem) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *PurchaseOrderItem) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PurchaseOrderItem) UnmarshalBinary(b []byte) error { + var res PurchaseOrderItem + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/purchase_order_request.go b/api/ops/v0.0.1/ops_models/purchase_order_request.go new file mode 100644 index 0000000..9c02e37 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/purchase_order_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// PurchaseOrderRequest purchase order request +// +// swagger:model PurchaseOrderRequest +type PurchaseOrderRequest struct { + + // data + Data []*PurchaseOrder `json:"Data"` +} + +// Validate validates this purchase order request +func (m *PurchaseOrderRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PurchaseOrderRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PurchaseOrderRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PurchaseOrderRequest) UnmarshalBinary(b []byte) error { + var res PurchaseOrderRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/purchase_order_response.go b/api/ops/v0.0.1/ops_models/purchase_order_response.go new file mode 100644 index 0000000..2c5006b --- /dev/null +++ b/api/ops/v0.0.1/ops_models/purchase_order_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// PurchaseOrderResponse An array of Purchase Order objects +// +// swagger:model PurchaseOrderResponse +type PurchaseOrderResponse struct { + + // data + Data []*PurchaseOrder `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this purchase order response +func (m *PurchaseOrderResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PurchaseOrderResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PurchaseOrderResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PurchaseOrderResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PurchaseOrderResponse) UnmarshalBinary(b []byte) error { + var res PurchaseOrderResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/put_response.go b/api/ops/v0.0.1/ops_models/put_response.go new file mode 100644 index 0000000..cc13232 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/put_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// PutResponse put response +// +// swagger:model PutResponse +type PutResponse struct { + + // data + Data []*Message `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this put response +func (m *PutResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PutResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PutResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PutResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PutResponse) UnmarshalBinary(b []byte) error { + var res PutResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/quote.go b/api/ops/v0.0.1/ops_models/quote.go new file mode 100644 index 0000000..edfa9d8 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/quote.go @@ -0,0 +1,458 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Quote quote +// +// swagger:model Quote +type Quote struct { + + // Account ID + AccountID string `json:"AccountID,omitempty"` + + // additional address + AdditionalAddress *Address `json:"AdditionalAddress,omitempty"` + + // Additional To Name + AdditionalName string `json:"AdditionalName,omitempty"` + + // The Quote Amount + Amount float64 `json:"Amount,omitempty"` + + // billing address + BillingAddress *Address `json:"BillingAddress,omitempty"` + + // Billing Contact ID + BillingContactID string `json:"BillingContactID,omitempty"` + + // Bill To Name + BillingName string `json:"BillingName,omitempty"` + + // business address + BusinessAddress *Address `json:"BusinessAddress,omitempty"` + + // Business Tax Amount + BusinessTax float64 `json:"BusinessTax,omitempty"` + + // Cannabis Tax + CannabisTax float64 `json:"CannabisTax,omitempty"` + + // Contact ID + ContactID string `json:"ContactID,omitempty"` + + // Contract ID + ContractID string `json:"ContractID,omitempty"` + + // Contact ID + CoordinateID string `json:"CoordinateID,omitempty"` + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Credit Terms + CreditTerms string `json:"CreditTerms,omitempty"` + + // OEM Customer Identifier + CustomerID string `json:"CustomerID,omitempty"` + + // Description + Description string `json:"Description,omitempty"` + + // Discount Percentage + Discount float64 `json:"Discount,omitempty"` + + // Discount Amount + DiscountAmount float64 `json:"DiscountAmount,omitempty"` + + // Email + Email string `json:"Email,omitempty"` + + // End User Contact ID + EndUserID string `json:"EndUserID,omitempty"` + + // Invoice Total from source system + EstimatedAmount float64 `json:"EstimatedAmount,omitempty"` + + // Business tax from source system + EstimatedBusinessTax float64 `json:"EstimatedBusinessTax,omitempty"` + + // Cost of Goods Sold from source system + EstimatedCOGS float64 `json:"EstimatedCOGS,omitempty"` + + // Cannabis Tax from source system + EstimatedCannabisTax float64 `json:"EstimatedCannabisTax,omitempty"` + + // Cannabis Tax from source system + EstimatedDiscount float64 `json:"EstimatedDiscount,omitempty"` + + // Sales Tax from source system + EstimatedSalesTax float64 `json:"EstimatedSalesTax,omitempty"` + + // Invoice Subtotal from source system + EstimatedSubtotal float64 `json:"EstimatedSubtotal,omitempty"` + + // Expiration Date + ExpirationDate string `json:"ExpirationDate,omitempty"` + + // Fax + Fax string `json:"Fax,omitempty"` + + // Grand Total + GrandTotal float64 `json:"GrandTotal,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // ID of the Ingest which created this Invoice + IngestID string `json:"IngestID,omitempty"` + + // Installation Date + InstallationDate string `json:"InstallationDate,omitempty"` + + // items + Items []*QuoteItem `json:"Items"` + + // ID of the Job which created this Invoice + JobID string `json:"JobID,omitempty"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Monthly Amount quoted + MonthlyAmount float64 `json:"MonthlyAmount,omitempty"` + + // Quote Name + Name string `json:"Name,omitempty"` + + // Opportunity Name + OpportunityID string `json:"OpportunityID,omitempty"` + + // Owner Name + OwnerID string `json:"OwnerID,omitempty"` + + // UUID Reference the master record that owns this item + ParentFK string `json:"ParentFK,omitempty"` + + // Payment Terms + PaymentTerms string `json:"PaymentTerms,omitempty"` + + // Period ID + PeriodID string `json:"PeriodID,omitempty"` + + // Phone + Phone string `json:"Phone,omitempty"` + + // Place GeoCode + PlaceGeoCode string `json:"PlaceGeoCode,omitempty"` + + // Purchase Amount + PurchaseAmount float64 `json:"PurchaseAmount,omitempty"` + + // Quote Amount + QuoteAmount float64 `json:"QuoteAmount,omitempty"` + + // Quote Date + QuoteDate string `json:"QuoteDate,omitempty"` + + // Quote Number + QuoteNumber string `json:"QuoteNumber,omitempty"` + + // quote to address + QuoteToAddress *Address `json:"QuoteToAddress,omitempty"` + + // Quote To Name + QuoteToName string `json:"QuoteToName,omitempty"` + + // Source System identifier for this record, if any + Ref string `json:"Ref,omitempty"` + + // Sales Regulation Type + SalesRegulation string `json:"SalesRegulation,omitempty"` + + // Sales Tax Amount + SalesTax float64 `json:"SalesTax,omitempty"` + + // Service Term + ServiceTerm string `json:"ServiceTerm,omitempty"` + + // shipping address + ShippingAddress *Address `json:"ShippingAddress,omitempty"` + + // Shipping Contact ID + ShippingContactID string `json:"ShippingContactID,omitempty"` + + // Shipping and Handling + ShippingHandling float64 `json:"ShippingHandling,omitempty"` + + // Ship To Name + ShippingName string `json:"ShippingName,omitempty"` + + // Status + Status string `json:"Status,omitempty"` + + // Subtotal + Subtotal float64 `json:"Subtotal,omitempty"` + + // Tax + Tax float64 `json:"Tax,omitempty"` + + // The taxes associated with this Quote + TaxTransactions []*TaxTransaction `json:"TaxTransactions"` + + // Telecom Tax + TelecomTax float64 `json:"TelecomTax,omitempty"` + + // Template + TemplateID string `json:"TemplateID,omitempty"` + + // ID of the Tenant that owns this object + TenantID string `json:"TenantID,omitempty"` + + // total + Total *Total `json:"Total,omitempty"` + + // Total Price + TotalPrice float64 `json:"TotalPrice,omitempty"` + + // Quote Type + Type string `json:"Type,omitempty"` +} + +// Validate validates this quote +func (m *Quote) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAdditionalAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateBillingAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateBusinessAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateQuoteToAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateShippingAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTaxTransactions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTotal(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Quote) validateAdditionalAddress(formats strfmt.Registry) error { + + if swag.IsZero(m.AdditionalAddress) { // not required + return nil + } + + if m.AdditionalAddress != nil { + if err := m.AdditionalAddress.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("AdditionalAddress") + } + return err + } + } + + return nil +} + +func (m *Quote) validateBillingAddress(formats strfmt.Registry) error { + + if swag.IsZero(m.BillingAddress) { // not required + return nil + } + + if m.BillingAddress != nil { + if err := m.BillingAddress.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("BillingAddress") + } + return err + } + } + + return nil +} + +func (m *Quote) validateBusinessAddress(formats strfmt.Registry) error { + + if swag.IsZero(m.BusinessAddress) { // not required + return nil + } + + if m.BusinessAddress != nil { + if err := m.BusinessAddress.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("BusinessAddress") + } + return err + } + } + + return nil +} + +func (m *Quote) validateItems(formats strfmt.Registry) error { + + if swag.IsZero(m.Items) { // not required + return nil + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *Quote) validateQuoteToAddress(formats strfmt.Registry) error { + + if swag.IsZero(m.QuoteToAddress) { // not required + return nil + } + + if m.QuoteToAddress != nil { + if err := m.QuoteToAddress.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("QuoteToAddress") + } + return err + } + } + + return nil +} + +func (m *Quote) validateShippingAddress(formats strfmt.Registry) error { + + if swag.IsZero(m.ShippingAddress) { // not required + return nil + } + + if m.ShippingAddress != nil { + if err := m.ShippingAddress.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ShippingAddress") + } + return err + } + } + + return nil +} + +func (m *Quote) validateTaxTransactions(formats strfmt.Registry) error { + + if swag.IsZero(m.TaxTransactions) { // not required + return nil + } + + for i := 0; i < len(m.TaxTransactions); i++ { + if swag.IsZero(m.TaxTransactions[i]) { // not required + continue + } + + if m.TaxTransactions[i] != nil { + if err := m.TaxTransactions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("TaxTransactions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *Quote) validateTotal(formats strfmt.Registry) error { + + if swag.IsZero(m.Total) { // not required + return nil + } + + if m.Total != nil { + if err := m.Total.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Total") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Quote) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Quote) UnmarshalBinary(b []byte) error { + var res Quote + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/quote_basic.go b/api/ops/v0.0.1/ops_models/quote_basic.go new file mode 100644 index 0000000..6ce54ac --- /dev/null +++ b/api/ops/v0.0.1/ops_models/quote_basic.go @@ -0,0 +1,390 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// QuoteBasic quote basic +// +// swagger:model QuoteBasic +type QuoteBasic struct { + + // Account Identifier from Source System; ignored in tax calculations + AccountID string `json:"AccountID,omitempty"` + + // Invoice Amount + Amount float64 `json:"Amount,omitempty"` + + // business address + BusinessAddress *Address `json:"BusinessAddress,omitempty"` + + // OEM Customer Identifier + CustomerID string `json:"CustomerID,omitempty"` + + // Invoice Total from source system + EstimatedAmount float64 `json:"EstimatedAmount,omitempty"` + + // Business tax from source system + EstimatedBusinessTax float64 `json:"EstimatedBusinessTax,omitempty"` + + // Cannabis Tax from source system + EstimatedCannabisTax float64 `json:"EstimatedCannabisTax,omitempty"` + + // Cost of Goods Sold from source system + EstimatedCogs float64 `json:"EstimatedCogs,omitempty"` + + // Cannabis Tax from source system + EstimatedDiscount float64 `json:"EstimatedDiscount,omitempty"` + + // Sales Tax from source system + EstimatedSalesTax float64 `json:"EstimatedSalesTax,omitempty"` + + // Invoice Subtotal from source system + EstimatedSubtotal float64 `json:"EstimatedSubtotal,omitempty"` + + // Taxnexus ID + ID string `json:"ID,omitempty"` + + // ID of the Ingest which created this Invoice + IngestID string `json:"IngestID,omitempty"` + + // The items associated with this Invoice + Items []*ItemBasic `json:"Items"` + + // ID of the Job which created this Invoice + JobID string `json:"JobID,omitempty"` + + // UUID Reference the master record that owns this item + ParentFK string `json:"ParentFK,omitempty"` + + // Taxnexus Period ID + PeriodID string `json:"PeriodID,omitempty"` + + // Invoice Date; should be date only or correct time zone if in time notation + QuoteDate string `json:"QuoteDate,omitempty"` + + // Source System Customer-Facing Invoice Number; ignored in tax calculation + QuoteNumber string `json:"QuoteNumber,omitempty"` + + // Source System identifier for this record, if any + Ref string `json:"Ref,omitempty"` + + // Sales Regulation Type + // Enum: [AdultUse Caregiver Consumer Medicinal MedicinalState MedicinalThirdParty Merchandise Patient Telecom] + SalesRegulation string `json:"SalesRegulation,omitempty"` + + // Shipping and Handling fees for this document + ShippingHandling float64 `json:"ShippingHandling,omitempty"` + + // Status used by for Billing Balances; ignored in tax calculation + // Enum: [closed delivered hold issued new posted rated rating_failed rating_ready reissued rendered uncollectable voided] + Status string `json:"Status,omitempty"` + + // Subtotal of items + Subtotal float64 `json:"Subtotal,omitempty"` + + // The Tax Transactions "Source System identifier for this record, if any; copied to quoteitemid in Tax Transaction result records" + TaxTransactions []*TaxTransaction `json:"TaxTransactions"` + + // ID of the Tenant that owns this object + TenantID string `json:"TenantID,omitempty"` + + // total + Total *Total `json:"Total,omitempty"` + + // Invoice Type + Type string `json:"Type,omitempty"` +} + +// Validate validates this quote basic +func (m *QuoteBasic) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBusinessAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSalesRegulation(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTaxTransactions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTotal(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *QuoteBasic) validateBusinessAddress(formats strfmt.Registry) error { + + if swag.IsZero(m.BusinessAddress) { // not required + return nil + } + + if m.BusinessAddress != nil { + if err := m.BusinessAddress.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("BusinessAddress") + } + return err + } + } + + return nil +} + +func (m *QuoteBasic) validateItems(formats strfmt.Registry) error { + + if swag.IsZero(m.Items) { // not required + return nil + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +var quoteBasicTypeSalesRegulationPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["AdultUse","Caregiver","Consumer","Medicinal","MedicinalState","MedicinalThirdParty","Merchandise","Patient","Telecom"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + quoteBasicTypeSalesRegulationPropEnum = append(quoteBasicTypeSalesRegulationPropEnum, v) + } +} + +const ( + + // QuoteBasicSalesRegulationAdultUse captures enum value "AdultUse" + QuoteBasicSalesRegulationAdultUse string = "AdultUse" + + // QuoteBasicSalesRegulationCaregiver captures enum value "Caregiver" + QuoteBasicSalesRegulationCaregiver string = "Caregiver" + + // QuoteBasicSalesRegulationConsumer captures enum value "Consumer" + QuoteBasicSalesRegulationConsumer string = "Consumer" + + // QuoteBasicSalesRegulationMedicinal captures enum value "Medicinal" + QuoteBasicSalesRegulationMedicinal string = "Medicinal" + + // QuoteBasicSalesRegulationMedicinalState captures enum value "MedicinalState" + QuoteBasicSalesRegulationMedicinalState string = "MedicinalState" + + // QuoteBasicSalesRegulationMedicinalThirdParty captures enum value "MedicinalThirdParty" + QuoteBasicSalesRegulationMedicinalThirdParty string = "MedicinalThirdParty" + + // QuoteBasicSalesRegulationMerchandise captures enum value "Merchandise" + QuoteBasicSalesRegulationMerchandise string = "Merchandise" + + // QuoteBasicSalesRegulationPatient captures enum value "Patient" + QuoteBasicSalesRegulationPatient string = "Patient" + + // QuoteBasicSalesRegulationTelecom captures enum value "Telecom" + QuoteBasicSalesRegulationTelecom string = "Telecom" +) + +// prop value enum +func (m *QuoteBasic) validateSalesRegulationEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, quoteBasicTypeSalesRegulationPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *QuoteBasic) validateSalesRegulation(formats strfmt.Registry) error { + + if swag.IsZero(m.SalesRegulation) { // not required + return nil + } + + // value enum + if err := m.validateSalesRegulationEnum("SalesRegulation", "body", m.SalesRegulation); err != nil { + return err + } + + return nil +} + +var quoteBasicTypeStatusPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["closed","delivered","hold","issued","new","posted","rated","rating_failed","rating_ready","reissued","rendered","uncollectable","voided"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + quoteBasicTypeStatusPropEnum = append(quoteBasicTypeStatusPropEnum, v) + } +} + +const ( + + // QuoteBasicStatusClosed captures enum value "closed" + QuoteBasicStatusClosed string = "closed" + + // QuoteBasicStatusDelivered captures enum value "delivered" + QuoteBasicStatusDelivered string = "delivered" + + // QuoteBasicStatusHold captures enum value "hold" + QuoteBasicStatusHold string = "hold" + + // QuoteBasicStatusIssued captures enum value "issued" + QuoteBasicStatusIssued string = "issued" + + // QuoteBasicStatusNew captures enum value "new" + QuoteBasicStatusNew string = "new" + + // QuoteBasicStatusPosted captures enum value "posted" + QuoteBasicStatusPosted string = "posted" + + // QuoteBasicStatusRated captures enum value "rated" + QuoteBasicStatusRated string = "rated" + + // QuoteBasicStatusRatingFailed captures enum value "rating_failed" + QuoteBasicStatusRatingFailed string = "rating_failed" + + // QuoteBasicStatusRatingReady captures enum value "rating_ready" + QuoteBasicStatusRatingReady string = "rating_ready" + + // QuoteBasicStatusReissued captures enum value "reissued" + QuoteBasicStatusReissued string = "reissued" + + // QuoteBasicStatusRendered captures enum value "rendered" + QuoteBasicStatusRendered string = "rendered" + + // QuoteBasicStatusUncollectable captures enum value "uncollectable" + QuoteBasicStatusUncollectable string = "uncollectable" + + // QuoteBasicStatusVoided captures enum value "voided" + QuoteBasicStatusVoided string = "voided" +) + +// prop value enum +func (m *QuoteBasic) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, quoteBasicTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *QuoteBasic) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + // value enum + if err := m.validateStatusEnum("Status", "body", m.Status); err != nil { + return err + } + + return nil +} + +func (m *QuoteBasic) validateTaxTransactions(formats strfmt.Registry) error { + + if swag.IsZero(m.TaxTransactions) { // not required + return nil + } + + for i := 0; i < len(m.TaxTransactions); i++ { + if swag.IsZero(m.TaxTransactions[i]) { // not required + continue + } + + if m.TaxTransactions[i] != nil { + if err := m.TaxTransactions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("TaxTransactions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *QuoteBasic) validateTotal(formats strfmt.Registry) error { + + if swag.IsZero(m.Total) { // not required + return nil + } + + if m.Total != nil { + if err := m.Total.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Total") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *QuoteBasic) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *QuoteBasic) UnmarshalBinary(b []byte) error { + var res QuoteBasic + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/quote_item.go b/api/ops/v0.0.1/ops_models/quote_item.go new file mode 100644 index 0000000..0a6f6cc --- /dev/null +++ b/api/ops/v0.0.1/ops_models/quote_item.go @@ -0,0 +1,125 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// QuoteItem quote item +// +// swagger:model QuoteItem +type QuoteItem struct { + + // Cost of Goods Sold + COGS float64 `json:"COGS,omitempty"` + + // County + CountyID string `json:"CountyID,omitempty"` + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Line Item Description + Description string `json:"Description,omitempty"` + + // Discount Percentage + Discount float64 `json:"Discount,omitempty"` + + // Discount Amount + DiscountAmount float64 `json:"DiscountAmount,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // List Price + ListPrice float64 `json:"ListPrice,omitempty"` + + // Quantity + MRCInterval int64 `json:"MRCInterval,omitempty"` + + // UUID Reference the master record that owns this item + ParentFK string `json:"ParentFK,omitempty"` + + // Product Code + ProductCode string `json:"ProductCode,omitempty"` + + // Product ID + ProductID string `json:"ProductID,omitempty"` + + // Product Name + ProductName string `json:"ProductName,omitempty"` + + // Quantity + Quantity float64 `json:"Quantity,omitempty"` + + // Quote Name + QuoteID string `json:"QuoteID,omitempty"` + + // Source System identifier for this record, if any + Ref string `json:"Ref,omitempty"` + + // Date + ServiceDate string `json:"ServiceDate,omitempty"` + + // Shipping & Handling + ShippingHandling float64 `json:"ShippingHandling,omitempty"` + + // Subtotal + Subtotal float64 `json:"Subtotal,omitempty"` + + // Taxnexus Code + TaxnexusCode string `json:"TaxnexusCode,omitempty"` + + // ID of the Tenant that owns this object + TenantID string `json:"TenantID,omitempty"` + + // Total Price + TotalPrice float64 `json:"TotalPrice,omitempty"` + + // Sales Price + UnitPrice float64 `json:"UnitPrice,omitempty"` + + // The Unit of Measure for this item + Units string `json:"Units,omitempty"` +} + +// Validate validates this quote item +func (m *QuoteItem) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *QuoteItem) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *QuoteItem) UnmarshalBinary(b []byte) error { + var res QuoteItem + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/quote_request.go b/api/ops/v0.0.1/ops_models/quote_request.go new file mode 100644 index 0000000..29bed35 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/quote_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// QuoteRequest An array of Quote objects +// +// swagger:model QuoteRequest +type QuoteRequest struct { + + // data + Data []*QuoteBasic `json:"Data"` +} + +// Validate validates this quote request +func (m *QuoteRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *QuoteRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *QuoteRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *QuoteRequest) UnmarshalBinary(b []byte) error { + var res QuoteRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/quote_response.go b/api/ops/v0.0.1/ops_models/quote_response.go new file mode 100644 index 0000000..ab27a14 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/quote_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// QuoteResponse An array of Quote objects +// +// swagger:model QuoteResponse +type QuoteResponse struct { + + // data + Data []*Quote `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this quote response +func (m *QuoteResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *QuoteResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *QuoteResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *QuoteResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *QuoteResponse) UnmarshalBinary(b []byte) error { + var res QuoteResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/response_meta.go b/api/ops/v0.0.1/ops_models/response_meta.go new file mode 100644 index 0000000..fc692bc --- /dev/null +++ b/api/ops/v0.0.1/ops_models/response_meta.go @@ -0,0 +1,108 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ResponseMeta response meta +// +// swagger:model ResponseMeta +type ResponseMeta struct { + + // Microservice Contact Info + Contact string `json:"Contact,omitempty"` + + // Copyright Info + Copyright string `json:"Copyright,omitempty"` + + // License Information and Restrictions + License string `json:"License,omitempty"` + + // Operation ID + OperationID string `json:"OperationID,omitempty"` + + // pagination + Pagination *Pagination `json:"Pagination,omitempty"` + + // Request IP Address + RequestIP string `json:"RequestIP,omitempty"` + + // Request Type + RequestType string `json:"RequestType,omitempty"` + + // Request URL + RequestURL string `json:"RequestURL,omitempty"` + + // Data Server Info + ServerInfo string `json:"ServerInfo,omitempty"` + + // Data Server Response Time (ms) + ServerResponseTime string `json:"ServerResponseTime,omitempty"` + + // Backend Server Timestamp + ServerTimestamp string `json:"ServerTimestamp,omitempty"` + + // Taxnexus Account Number used for recording transactions + TaxnexusAccount string `json:"TaxnexusAccount,omitempty"` +} + +// Validate validates this response meta +func (m *ResponseMeta) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePagination(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ResponseMeta) validatePagination(formats strfmt.Registry) error { + + if swag.IsZero(m.Pagination) { // not required + return nil + } + + if m.Pagination != nil { + if err := m.Pagination.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Pagination") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ResponseMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ResponseMeta) UnmarshalBinary(b []byte) error { + var res ResponseMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/subscription.go b/api/ops/v0.0.1/ops_models/subscription.go new file mode 100644 index 0000000..649b4b7 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/subscription.go @@ -0,0 +1,149 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Subscription subscription +// +// swagger:model Subscription +type Subscription struct { + + // Account ID + AccountID string `json:"AccountID,omitempty"` + + // Activated Date + ActivatedDate string `json:"ActivatedDate,omitempty"` + + // Activated By + ActivatedUserID string `json:"ActivatedUserID,omitempty"` + + // Amount + Amount float64 `json:"Amount,omitempty"` + + // Asset Name + AssetID string `json:"AssetID,omitempty"` + + // Cancel Date + CancelDate string `json:"CancelDate,omitempty"` + + // contract ID + ContractID string `json:"ContractID,omitempty"` + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Description + Description string `json:"Description,omitempty"` + + // Effective Date + EffectiveDate string `json:"EffectiveDate,omitempty"` + + // Email + Email string `json:"Email,omitempty"` + + // End User Contact ID + EndUserID string `json:"EndUserID,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // Active? + IsActive bool `json:"IsActive,omitempty"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Order Date + OrderDate string `json:"OrderDate,omitempty"` + + // Order Item + OrderItemID string `json:"OrderItemID,omitempty"` + + // Password + Password string `json:"Password,omitempty"` + + // Payment Terms + PaymentTerms string `json:"PaymentTerms,omitempty"` + + // Price Book + PriceBookID string `json:"PriceBookID,omitempty"` + + // Product Code + ProductCode string `json:"ProductCode,omitempty"` + + // product ID + ProductID string `json:"ProductID,omitempty"` + + // Product Name + ProductName string `json:"ProductName,omitempty"` + + // Quantity + Quantity string `json:"Quantity,omitempty"` + + // Quote Item + QuoteItemID string `json:"QuoteItemID,omitempty"` + + // Source System identifier for this record, if any + Ref string `json:"Ref,omitempty"` + + // Status + Status string `json:"Status,omitempty"` + + // ID of the Tenant that owns this object + TenantID string `json:"TenantID,omitempty"` + + // Type + Type string `json:"Type,omitempty"` + + // Unit Price + UnitPrice float64 `json:"UnitPrice,omitempty"` + + // Units + Units string `json:"Units,omitempty"` + + // Unlimited usage? + Unlimited bool `json:"Unlimited,omitempty"` + + // Username + Username string `json:"Username,omitempty"` +} + +// Validate validates this subscription +func (m *Subscription) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Subscription) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Subscription) UnmarshalBinary(b []byte) error { + var res Subscription + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/subscription_request.go b/api/ops/v0.0.1/ops_models/subscription_request.go new file mode 100644 index 0000000..a1728e0 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/subscription_request.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// SubscriptionRequest subscription request +// +// swagger:model SubscriptionRequest +type SubscriptionRequest struct { + + // data + Data []*Subscription `json:"Data"` +} + +// Validate validates this subscription request +func (m *SubscriptionRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SubscriptionRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *SubscriptionRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SubscriptionRequest) UnmarshalBinary(b []byte) error { + var res SubscriptionRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/subscription_response.go b/api/ops/v0.0.1/ops_models/subscription_response.go new file mode 100644 index 0000000..8ba12fe --- /dev/null +++ b/api/ops/v0.0.1/ops_models/subscription_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// SubscriptionResponse An array of Subscription Objects +// +// swagger:model SubscriptionResponse +type SubscriptionResponse struct { + + // data + Data []*Subscription `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this subscription response +func (m *SubscriptionResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SubscriptionResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *SubscriptionResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *SubscriptionResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SubscriptionResponse) UnmarshalBinary(b []byte) error { + var res SubscriptionResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/tax_transaction.go b/api/ops/v0.0.1/ops_models/tax_transaction.go new file mode 100644 index 0000000..3828e43 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/tax_transaction.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// TaxTransaction tax transaction +// +// swagger:model TaxTransaction +type TaxTransaction struct { + + // Account ID + AccountID string `json:"AccountID,omitempty"` + + // Accounting Rule code + AccountingRuleCode string `json:"AccountingRuleCode,omitempty"` + + // Total Amount Due (same as Tax) + Amount float64 `json:"Amount,omitempty"` + + // Coordinate ID + CoordinateID string `json:"CoordinateID,omitempty"` + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Customer ID + CustomerID string `json:"CustomerID,omitempty"` + + // Tax or Fee Name + DisplayName string `json:"DisplayName,omitempty"` + + // Effective Rate + EffectiveRate float64 `json:"EffectiveRate,omitempty"` + + // Filing ID + FilingID string `json:"FilingID,omitempty"` + + // Taxnexus Record Id + ID string `json:"ID,omitempty"` + + // Ingest ID + IngestID string `json:"IngestID,omitempty"` + + // Invoice ID + InvoiceID string `json:"InvoiceID,omitempty"` + + // Invoiceitem ID + InvoiceItemID string `json:"InvoiceItemID,omitempty"` + + // Is this a summary record? + IsSummary bool `json:"IsSummary,omitempty"` + + // Job ID + JobID string `json:"JobID,omitempty"` + + // Journal Item ID + JournalItemID string `json:"JournalItemID,omitempty"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // Order ID + OrderID string `json:"OrderID,omitempty"` + + // Order Item ID + OrderItemID string `json:"OrderItemID,omitempty"` + + // PO ID + POID string `json:"POID,omitempty"` + + // PO Item ID + POItemID string `json:"POItemID,omitempty"` + + // Parent Ref copied from source + ParentRef string `json:"ParentRef,omitempty"` + + // Percent Taxable + PercentTaxable float64 `json:"PercentTaxable,omitempty"` + + // Period ID + PeriodID string `json:"PeriodID,omitempty"` + + // The Taxnexus Geocode of the Place used for Situs + PlaceGeocode string `json:"PlaceGeocode,omitempty"` + + // Place ID + PlaceID string `json:"PlaceID,omitempty"` + + // Posted to external system? + Posted bool `json:"Posted,omitempty"` + + // Order ID + QuoteID string `json:"QuoteID,omitempty"` + + // Order Item ID + QuoteItemID string `json:"QuoteItemID,omitempty"` + + // The Type of Object that was rated + RatingType string `json:"RatingType,omitempty"` + + // Source System identifier for this record, if any + Ref string `json:"Ref,omitempty"` + + // The Revenue Amount that was taxed before any adjustments + RevenueBase float64 `json:"RevenueBase,omitempty"` + + // The Revenue Amount that was taxed after any adjustments + RevenueNet float64 `json:"RevenueNet,omitempty"` + + // The Revenue Amount that was not taxed + RevenueNotTaxable float64 `json:"RevenueNotTaxable,omitempty"` + + // Tax Exempt Revenue + TaxExemptRevenue float64 `json:"TaxExemptRevenue,omitempty"` + + // Additional Tax calculated due to regulatory requirements + TaxOnTax float64 `json:"TaxOnTax,omitempty"` + + // The Tax Rate used for calculation + TaxRate float64 `json:"TaxRate,omitempty"` + + // TaxType Account ID + TaxTypeAccountID string `json:"TaxTypeAccountID,omitempty"` + + // TaxType ID + TaxTypeID string `json:"TaxTypeID,omitempty"` + + // The Taxnexus Code for the Tax Type + TaxnexusCodeDisplay string `json:"TaxnexusCodeDisplay,omitempty"` + + // Taxnexus Code ID + TaxnexusCodeID string `json:"TaxnexusCodeID,omitempty"` + + // ID of the Tenant that owns this object + TenantID string `json:"TenantID,omitempty"` + + // Unit Base + UnitBase float64 `json:"UnitBase,omitempty"` + + // Unit Fee Rate + UnitFeeRate float64 `json:"UnitFeeRate,omitempty"` +} + +// Validate validates this tax transaction +func (m *TaxTransaction) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *TaxTransaction) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TaxTransaction) UnmarshalBinary(b []byte) error { + var res TaxTransaction + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/tax_transaction_response.go b/api/ops/v0.0.1/ops_models/tax_transaction_response.go new file mode 100644 index 0000000..5a51902 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/tax_transaction_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// TaxTransactionResponse An array of Tax Transaction Objects +// +// swagger:model TaxTransactionResponse +type TaxTransactionResponse struct { + + // data + Data []*TaxTransaction `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this tax transaction response +func (m *TaxTransactionResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *TaxTransactionResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *TaxTransactionResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *TaxTransactionResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TaxTransactionResponse) UnmarshalBinary(b []byte) error { + var res TaxTransactionResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/total.go b/api/ops/v0.0.1/ops_models/total.go new file mode 100644 index 0000000..3ff624c --- /dev/null +++ b/api/ops/v0.0.1/ops_models/total.go @@ -0,0 +1,144 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Total total +// +// swagger:model Total +type Total struct { + + // The total amount for this object + Amount float64 `json:"Amount,omitempty"` + + // The amount of Deferred Tax incurred with this invoice + BusinessTax float64 `json:"BusinessTax,omitempty"` + + // The Percentage of Deffered Tax from the Total + BusinessTaxRate float64 `json:"BusinessTaxRate,omitempty"` + + // The total amount of Cannabis Tax charged on this object + CannabisTax float64 `json:"CannabisTax,omitempty"` + + // The percentage of Cannabis Tax from the Total + CannabisTaxRate float64 `json:"CannabisTaxRate,omitempty"` + + // Created By User ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // Created Date + CreatedDate string `json:"CreatedDate,omitempty"` + + // Unique Taxnexus ID + ID string `json:"ID,omitempty"` + + // items + Items []*TotalItem `json:"Items"` + + // Last Modified By User ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // Last Modified Date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // The monthly, pre-tax estimate of quoted and ordered periodic services + MonthlyAmount float64 `json:"MonthlyAmount,omitempty"` + + // The type of Object for which this Total has been constructed + ObjectType string `json:"ObjectType,omitempty"` + + // purchase amount + PurchaseAmount float64 `json:"PurchaseAmount,omitempty"` + + // The amount of Sales Tax charged on this object + SalesTax float64 `json:"SalesTax,omitempty"` + + // The percentage of Sales Tax from the Total + SalesTaxRate float64 `json:"SalesTaxRate,omitempty"` + + // The shipping and delivery charges charged on this object + ShippingHandling float64 `json:"ShippingHandling,omitempty"` + + // The sum of all the items on the object prior to tax rating and shipping & handling + Subtotal float64 `json:"Subtotal,omitempty"` + + // The amount of Telecom Tax charged on this invoice + TelecomTax float64 `json:"TelecomTax,omitempty"` + + // The percentage of Telecom Tax from the Total + TelecomTaxRate float64 `json:"TelecomTaxRate,omitempty"` + + // ID of the Tenant that owns this object + TenantID string `json:"TenantID,omitempty"` +} + +// Validate validates this total +func (m *Total) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Total) validateItems(formats strfmt.Registry) error { + + if swag.IsZero(m.Items) { // not required + return nil + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Total) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Total) UnmarshalBinary(b []byte) error { + var res Total + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/total_item.go b/api/ops/v0.0.1/ops_models/total_item.go new file mode 100644 index 0000000..f520a3b --- /dev/null +++ b/api/ops/v0.0.1/ops_models/total_item.go @@ -0,0 +1,99 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// TotalItem Tabulates Tax Transactions on this object +// +// swagger:model TotalItem +type TotalItem struct { + + // The amount of this total item + Amount float64 `json:"Amount,omitempty"` + + // The number of taxtransactions totaled + Count int64 `json:"Count,omitempty"` + + // Total Item description to be used in bill presentment + DisplayName string `json:"DisplayName,omitempty"` + + // Unique Taxnexus ID + ID string `json:"ID,omitempty"` + + // tax items + TaxItems []*TotalTaxItem `json:"TaxItems"` + + // ID of the Tenant that owns this object + TenantID string `json:"TenantID,omitempty"` +} + +// Validate validates this total item +func (m *TotalItem) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTaxItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *TotalItem) validateTaxItems(formats strfmt.Registry) error { + + if swag.IsZero(m.TaxItems) { // not required + return nil + } + + for i := 0; i < len(m.TaxItems); i++ { + if swag.IsZero(m.TaxItems[i]) { // not required + continue + } + + if m.TaxItems[i] != nil { + if err := m.TaxItems[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("TaxItems" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *TotalItem) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TotalItem) UnmarshalBinary(b []byte) error { + var res TotalItem + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/ops/v0.0.1/ops_models/total_tax_item.go b/api/ops/v0.0.1/ops_models/total_tax_item.go new file mode 100644 index 0000000..b738d11 --- /dev/null +++ b/api/ops/v0.0.1/ops_models/total_tax_item.go @@ -0,0 +1,56 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package ops_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// TotalTaxItem Links the tax items totals in the TotalItem struct +// +// swagger:model TotalTaxItem +type TotalTaxItem struct { + + // ID + ID string `json:"ID,omitempty"` + + // tax transaction ID + TaxTransactionID string `json:"TaxTransactionID,omitempty"` + + // ID of the Tenant that owns this object + TenantID string `json:"TenantID,omitempty"` + + // total item ID + TotalItemID string `json:"TotalItemID,omitempty"` +} + +// Validate validates this total tax item +func (m *TotalTaxItem) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *TotalTaxItem) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TotalTaxItem) UnmarshalBinary(b []byte) error { + var res TotalTaxItem + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/stash/v0.0.1/stash_client/stash_client.go b/api/stash/v0.0.1/stash_client/stash_client.go new file mode 100644 index 0000000..bfa7f6d --- /dev/null +++ b/api/stash/v0.0.1/stash_client/stash_client.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All code and business processes is Copyright (c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package stash_client + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/render/lib/stash/stash_client/stash_pdf" +) + +// Default stash HTTP client. +var Default = NewHTTPClient(nil) + +const ( + // DefaultHost is the default Host + // found in Meta (info) section of spec file + DefaultHost string = "stash.fabric.tnxs.net:8080" + // DefaultBasePath is the default BasePath + // found in Meta (info) section of spec file + DefaultBasePath string = "/v1" +) + +// DefaultSchemes are the default schemes found in Meta (info) section of spec file +var DefaultSchemes = []string{"http"} + +// NewHTTPClient creates a new stash HTTP client. +func NewHTTPClient(formats strfmt.Registry) *Stash { + return NewHTTPClientWithConfig(formats, nil) +} + +// NewHTTPClientWithConfig creates a new stash HTTP client, +// using a customizable transport config. +func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *Stash { + // ensure nullable parameters have default + if cfg == nil { + cfg = DefaultTransportConfig() + } + + // create transport and client + transport := httptransport.New(cfg.Host, cfg.BasePath, cfg.Schemes) + return New(transport, formats) +} + +// New creates a new stash client +func New(transport runtime.ClientTransport, formats strfmt.Registry) *Stash { + // ensure nullable parameters have default + if formats == nil { + formats = strfmt.Default + } + + cli := new(Stash) + cli.Transport = transport + cli.StashPdf = stash_pdf.New(transport, formats) + return cli +} + +// DefaultTransportConfig creates a TransportConfig with the +// default settings taken from the meta section of the spec file. +func DefaultTransportConfig() *TransportConfig { + return &TransportConfig{ + Host: DefaultHost, + BasePath: DefaultBasePath, + Schemes: DefaultSchemes, + } +} + +// TransportConfig contains the transport related info, +// found in the meta section of the spec file. +type TransportConfig struct { + Host string + BasePath string + Schemes []string +} + +// WithHost overrides the default host, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithHost(host string) *TransportConfig { + cfg.Host = host + return cfg +} + +// WithBasePath overrides the default basePath, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithBasePath(basePath string) *TransportConfig { + cfg.BasePath = basePath + return cfg +} + +// WithSchemes overrides the default schemes, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { + cfg.Schemes = schemes + return cfg +} + +// Stash is a client for stash +type Stash struct { + StashPdf stash_pdf.ClientService + + Transport runtime.ClientTransport +} + +// SetTransport changes the transport on the client and all its subresources +func (c *Stash) SetTransport(transport runtime.ClientTransport) { + c.Transport = transport + c.StashPdf.SetTransport(transport) +} diff --git a/api/stash/v0.0.1/stash_client/stash_pdf/post_pdfs_parameters.go b/api/stash/v0.0.1/stash_client/stash_pdf/post_pdfs_parameters.go new file mode 100644 index 0000000..49e1a95 --- /dev/null +++ b/api/stash/v0.0.1/stash_client/stash_pdf/post_pdfs_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All code and business processes is Copyright (c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package stash_pdf + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/render/lib/stash/stash_models" +) + +// NewPostPdfsParams creates a new PostPdfsParams object +// with the default values initialized. +func NewPostPdfsParams() *PostPdfsParams { + var () + return &PostPdfsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostPdfsParamsWithTimeout creates a new PostPdfsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostPdfsParamsWithTimeout(timeout time.Duration) *PostPdfsParams { + var () + return &PostPdfsParams{ + + timeout: timeout, + } +} + +// NewPostPdfsParamsWithContext creates a new PostPdfsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostPdfsParamsWithContext(ctx context.Context) *PostPdfsParams { + var () + return &PostPdfsParams{ + + Context: ctx, + } +} + +// NewPostPdfsParamsWithHTTPClient creates a new PostPdfsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostPdfsParamsWithHTTPClient(client *http.Client) *PostPdfsParams { + var () + return &PostPdfsParams{ + HTTPClient: client, + } +} + +/*PostPdfsParams contains all the parameters to send to the API endpoint +for the post pdfs operation typically these are written to a http.Request +*/ +type PostPdfsParams struct { + + /*PDFRequest + An array of new PDF records + + */ + PDFRequest *stash_models.PDFRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post pdfs params +func (o *PostPdfsParams) WithTimeout(timeout time.Duration) *PostPdfsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post pdfs params +func (o *PostPdfsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post pdfs params +func (o *PostPdfsParams) WithContext(ctx context.Context) *PostPdfsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post pdfs params +func (o *PostPdfsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post pdfs params +func (o *PostPdfsParams) WithHTTPClient(client *http.Client) *PostPdfsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post pdfs params +func (o *PostPdfsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPDFRequest adds the pDFRequest to the post pdfs params +func (o *PostPdfsParams) WithPDFRequest(pDFRequest *stash_models.PDFRequest) *PostPdfsParams { + o.SetPDFRequest(pDFRequest) + return o +} + +// SetPDFRequest adds the pDFRequest to the post pdfs params +func (o *PostPdfsParams) SetPDFRequest(pDFRequest *stash_models.PDFRequest) { + o.PDFRequest = pDFRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostPdfsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.PDFRequest != nil { + if err := r.SetBodyParam(o.PDFRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/stash/v0.0.1/stash_client/stash_pdf/post_pdfs_responses.go b/api/stash/v0.0.1/stash_client/stash_pdf/post_pdfs_responses.go new file mode 100644 index 0000000..fa71a31 --- /dev/null +++ b/api/stash/v0.0.1/stash_client/stash_pdf/post_pdfs_responses.go @@ -0,0 +1,268 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All code and business processes is Copyright (c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package stash_pdf + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/render/lib/stash/stash_models" +) + +// PostPdfsReader is a Reader for the PostPdfs structure. +type PostPdfsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostPdfsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostPdfsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostPdfsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostPdfsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostPdfsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostPdfsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostPdfsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostPdfsOK creates a PostPdfsOK with default headers values +func NewPostPdfsOK() *PostPdfsOK { + return &PostPdfsOK{} +} + +/*PostPdfsOK handles this case with default header values. + +Rendered documents response +*/ +type PostPdfsOK struct { + Payload *stash_models.DocumentResponse +} + +func (o *PostPdfsOK) Error() string { + return fmt.Sprintf("[POST /pdfs][%d] postPdfsOK %+v", 200, o.Payload) +} + +func (o *PostPdfsOK) GetPayload() *stash_models.DocumentResponse { + return o.Payload +} + +func (o *PostPdfsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(stash_models.DocumentResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPdfsUnauthorized creates a PostPdfsUnauthorized with default headers values +func NewPostPdfsUnauthorized() *PostPdfsUnauthorized { + return &PostPdfsUnauthorized{} +} + +/*PostPdfsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostPdfsUnauthorized struct { + Payload *stash_models.Error +} + +func (o *PostPdfsUnauthorized) Error() string { + return fmt.Sprintf("[POST /pdfs][%d] postPdfsUnauthorized %+v", 401, o.Payload) +} + +func (o *PostPdfsUnauthorized) GetPayload() *stash_models.Error { + return o.Payload +} + +func (o *PostPdfsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(stash_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPdfsForbidden creates a PostPdfsForbidden with default headers values +func NewPostPdfsForbidden() *PostPdfsForbidden { + return &PostPdfsForbidden{} +} + +/*PostPdfsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostPdfsForbidden struct { + Payload *stash_models.Error +} + +func (o *PostPdfsForbidden) Error() string { + return fmt.Sprintf("[POST /pdfs][%d] postPdfsForbidden %+v", 403, o.Payload) +} + +func (o *PostPdfsForbidden) GetPayload() *stash_models.Error { + return o.Payload +} + +func (o *PostPdfsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(stash_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPdfsNotFound creates a PostPdfsNotFound with default headers values +func NewPostPdfsNotFound() *PostPdfsNotFound { + return &PostPdfsNotFound{} +} + +/*PostPdfsNotFound handles this case with default header values. + +Resource was not found +*/ +type PostPdfsNotFound struct { + Payload *stash_models.Error +} + +func (o *PostPdfsNotFound) Error() string { + return fmt.Sprintf("[POST /pdfs][%d] postPdfsNotFound %+v", 404, o.Payload) +} + +func (o *PostPdfsNotFound) GetPayload() *stash_models.Error { + return o.Payload +} + +func (o *PostPdfsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(stash_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPdfsUnprocessableEntity creates a PostPdfsUnprocessableEntity with default headers values +func NewPostPdfsUnprocessableEntity() *PostPdfsUnprocessableEntity { + return &PostPdfsUnprocessableEntity{} +} + +/*PostPdfsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostPdfsUnprocessableEntity struct { + Payload *stash_models.Error +} + +func (o *PostPdfsUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /pdfs][%d] postPdfsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostPdfsUnprocessableEntity) GetPayload() *stash_models.Error { + return o.Payload +} + +func (o *PostPdfsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(stash_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostPdfsInternalServerError creates a PostPdfsInternalServerError with default headers values +func NewPostPdfsInternalServerError() *PostPdfsInternalServerError { + return &PostPdfsInternalServerError{} +} + +/*PostPdfsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostPdfsInternalServerError struct { + Payload *stash_models.Error +} + +func (o *PostPdfsInternalServerError) Error() string { + return fmt.Sprintf("[POST /pdfs][%d] postPdfsInternalServerError %+v", 500, o.Payload) +} + +func (o *PostPdfsInternalServerError) GetPayload() *stash_models.Error { + return o.Payload +} + +func (o *PostPdfsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(stash_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/stash/v0.0.1/stash_client/stash_pdf/stash_pdf_client.go b/api/stash/v0.0.1/stash_client/stash_pdf/stash_pdf_client.go new file mode 100644 index 0000000..a7ebbc2 --- /dev/null +++ b/api/stash/v0.0.1/stash_client/stash_pdf/stash_pdf_client.go @@ -0,0 +1,79 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All code and business processes is Copyright (c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package stash_pdf + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new stash pdf API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for stash pdf API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + PostPdfs(params *PostPdfsParams, authInfo runtime.ClientAuthInfoWriter) (*PostPdfsOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + PostPdfs creates new p d fs + + Store new PDFs +*/ +func (a *Client) PostPdfs(params *PostPdfsParams, authInfo runtime.ClientAuthInfoWriter) (*PostPdfsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostPdfsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postPdfs", + Method: "POST", + PathPattern: "/pdfs", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostPdfsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostPdfsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postPdfs: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/stash/v0.0.1/stash_models/document.go b/api/stash/v0.0.1/stash_models/document.go new file mode 100644 index 0000000..6c1900d --- /dev/null +++ b/api/stash/v0.0.1/stash_models/document.go @@ -0,0 +1,62 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All code and business processes is Copyright (c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package stash_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Document document +// +// swagger:model Document +type Document struct { + + // filename + Filename string `json:"Filename,omitempty"` + + // ID + ID string `json:"ID,omitempty"` + + // parent ID + ParentID string `json:"ParentID,omitempty"` + + // saga type + SagaType string `json:"SagaType,omitempty"` + + // title + Title string `json:"Title,omitempty"` + + // URI + URI string `json:"URI,omitempty"` +} + +// Validate validates this document +func (m *Document) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Document) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Document) UnmarshalBinary(b []byte) error { + var res Document + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/stash/v0.0.1/stash_models/document_response.go b/api/stash/v0.0.1/stash_models/document_response.go new file mode 100644 index 0000000..28d4a93 --- /dev/null +++ b/api/stash/v0.0.1/stash_models/document_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All code and business processes is Copyright (c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package stash_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// DocumentResponse An array of rendered documents +// +// swagger:model DocumentResponse +type DocumentResponse struct { + + // data + Data []*Document `json:"Data"` + + // meta + Meta *ResponseMeta `json:"Meta,omitempty"` +} + +// Validate validates this document response +func (m *DocumentResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *DocumentResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *DocumentResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *DocumentResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *DocumentResponse) UnmarshalBinary(b []byte) error { + var res DocumentResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/stash/v0.0.1/stash_models/error.go b/api/stash/v0.0.1/stash_models/error.go new file mode 100644 index 0000000..5057349 --- /dev/null +++ b/api/stash/v0.0.1/stash_models/error.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All code and business processes is Copyright (c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package stash_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Error error +// +// swagger:model Error +type Error struct { + + // code + Code int64 `json:"Code,omitempty"` + + // fields + Fields string `json:"Fields,omitempty"` + + // message + Message string `json:"Message,omitempty"` +} + +// Validate validates this error +func (m *Error) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Error) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Error) UnmarshalBinary(b []byte) error { + var res Error + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/stash/v0.0.1/stash_models/new_p_d_f.go b/api/stash/v0.0.1/stash_models/new_p_d_f.go new file mode 100644 index 0000000..b2e895f --- /dev/null +++ b/api/stash/v0.0.1/stash_models/new_p_d_f.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All code and business processes is Copyright (c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package stash_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewPDF new p d f +// +// swagger:model NewPDF +type NewPDF struct { + + // Description + Description string `json:"Description,omitempty"` + + // Filename only + Filename string `json:"Filename,omitempty"` + + // The HTML data in text format + HTML string `json:"HTML,omitempty"` + + // Last Accessed By + LastAccessedByID string `json:"LastAccessedByID,omitempty"` + + // This document's financial object origination + ObjectType string `json:"ObjectType,omitempty"` + + // User who created the PDF + OwnerID string `json:"OwnerID,omitempty"` + + // ID of the record that owns this PDF + ParentID string `json:"ParentID,omitempty"` + + // External reference if any + Ref string `json:"Ref,omitempty"` + + // Document descriptive title + Title string `json:"Title,omitempty"` +} + +// Validate validates this new p d f +func (m *NewPDF) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *NewPDF) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *NewPDF) UnmarshalBinary(b []byte) error { + var res NewPDF + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/stash/v0.0.1/stash_models/p_d_f_request.go b/api/stash/v0.0.1/stash_models/p_d_f_request.go new file mode 100644 index 0000000..5249adf --- /dev/null +++ b/api/stash/v0.0.1/stash_models/p_d_f_request.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All code and business processes is Copyright (c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package stash_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// PDFRequest p d f request +// +// swagger:model PDFRequest +type PDFRequest struct { + + // data + Data []*NewPDF `json:"Data"` + + // meta + Meta *RequestMeta `json:"Meta,omitempty"` +} + +// Validate validates this p d f request +func (m *PDFRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PDFRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PDFRequest) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PDFRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PDFRequest) UnmarshalBinary(b []byte) error { + var res PDFRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/stash/v0.0.1/stash_models/request_meta.go b/api/stash/v0.0.1/stash_models/request_meta.go new file mode 100644 index 0000000..cef417d --- /dev/null +++ b/api/stash/v0.0.1/stash_models/request_meta.go @@ -0,0 +1,68 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All code and business processes is Copyright (c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package stash_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// RequestMeta request meta +// +// swagger:model RequestMeta +type RequestMeta struct { + + // Taxnexus Account Number of the Reseller or OEM + // Required: true + TaxnexusAccount *string `json:"TaxnexusAccount"` +} + +// Validate validates this request meta +func (m *RequestMeta) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTaxnexusAccount(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RequestMeta) validateTaxnexusAccount(formats strfmt.Registry) error { + + if err := validate.Required("TaxnexusAccount", "body", m.TaxnexusAccount); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *RequestMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RequestMeta) UnmarshalBinary(b []byte) error { + var res RequestMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/stash/v0.0.1/stash_models/response_meta.go b/api/stash/v0.0.1/stash_models/response_meta.go new file mode 100644 index 0000000..661b770 --- /dev/null +++ b/api/stash/v0.0.1/stash_models/response_meta.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All code and business processes is Copyright (c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package stash_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ResponseMeta response meta +// +// swagger:model ResponseMeta +type ResponseMeta struct { + + // Microservice Contact Info + Contact string `json:"Contact,omitempty"` + + // Copyright Info + Copyright string `json:"Copyright,omitempty"` + + // License Information and Restrictions + License string `json:"License,omitempty"` + + // Operation ID + OperationID string `json:"OperationID,omitempty"` + + // Request IP Address + RequestIP string `json:"RequestIP,omitempty"` + + // Request Type + RequestType string `json:"RequestType,omitempty"` + + // Request URL + RequestURL string `json:"RequestURL,omitempty"` + + // Data Server Info + ServerInfo string `json:"ServerInfo,omitempty"` + + // Data Server Response Time (ms) + ServerResponseTime string `json:"ServerResponseTime,omitempty"` + + // Backend Server Timestamp + ServerTimestamp string `json:"ServerTimestamp,omitempty"` + + // Taxnexus Account Number used for recording transactions + TaxnexusAccount string `json:"TaxnexusAccount,omitempty"` +} + +// Validate validates this response meta +func (m *ResponseMeta) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ResponseMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ResponseMeta) UnmarshalBinary(b []byte) error { + var res ResponseMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/workflow/v0.0.1/workflow_client/app_log/app_log_client.go b/api/workflow/v0.0.1/workflow_client/app_log/app_log_client.go new file mode 100644 index 0000000..dbd3d0e --- /dev/null +++ b/api/workflow/v0.0.1/workflow_client/app_log/app_log_client.go @@ -0,0 +1,79 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package app_log + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new app log API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for app log API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + PostAppLogs(params *PostAppLogsParams, authInfo runtime.ClientAuthInfoWriter) (*PostAppLogsOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + PostAppLogs posts app log messages + + Insert app log messages into workflow storage +*/ +func (a *Client) PostAppLogs(params *PostAppLogsParams, authInfo runtime.ClientAuthInfoWriter) (*PostAppLogsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostAppLogsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postAppLogs", + Method: "POST", + PathPattern: "/applogs", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostAppLogsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostAppLogsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postAppLogs: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/workflow/v0.0.1/workflow_client/app_log/post_app_logs_parameters.go b/api/workflow/v0.0.1/workflow_client/app_log/post_app_logs_parameters.go new file mode 100644 index 0000000..7bcd4db --- /dev/null +++ b/api/workflow/v0.0.1/workflow_client/app_log/post_app_logs_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package app_log + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/workflow/workflow_models" +) + +// NewPostAppLogsParams creates a new PostAppLogsParams object +// with the default values initialized. +func NewPostAppLogsParams() *PostAppLogsParams { + var () + return &PostAppLogsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostAppLogsParamsWithTimeout creates a new PostAppLogsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostAppLogsParamsWithTimeout(timeout time.Duration) *PostAppLogsParams { + var () + return &PostAppLogsParams{ + + timeout: timeout, + } +} + +// NewPostAppLogsParamsWithContext creates a new PostAppLogsParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostAppLogsParamsWithContext(ctx context.Context) *PostAppLogsParams { + var () + return &PostAppLogsParams{ + + Context: ctx, + } +} + +// NewPostAppLogsParamsWithHTTPClient creates a new PostAppLogsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostAppLogsParamsWithHTTPClient(client *http.Client) *PostAppLogsParams { + var () + return &PostAppLogsParams{ + HTTPClient: client, + } +} + +/*PostAppLogsParams contains all the parameters to send to the API endpoint +for the post app logs operation typically these are written to a http.Request +*/ +type PostAppLogsParams struct { + + /*AppLogRequest + An array of new AppLog records + + */ + AppLogRequest *workflow_models.AppLogRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post app logs params +func (o *PostAppLogsParams) WithTimeout(timeout time.Duration) *PostAppLogsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post app logs params +func (o *PostAppLogsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post app logs params +func (o *PostAppLogsParams) WithContext(ctx context.Context) *PostAppLogsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post app logs params +func (o *PostAppLogsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post app logs params +func (o *PostAppLogsParams) WithHTTPClient(client *http.Client) *PostAppLogsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post app logs params +func (o *PostAppLogsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAppLogRequest adds the appLogRequest to the post app logs params +func (o *PostAppLogsParams) WithAppLogRequest(appLogRequest *workflow_models.AppLogRequest) *PostAppLogsParams { + o.SetAppLogRequest(appLogRequest) + return o +} + +// SetAppLogRequest adds the appLogRequest to the post app logs params +func (o *PostAppLogsParams) SetAppLogRequest(appLogRequest *workflow_models.AppLogRequest) { + o.AppLogRequest = appLogRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostAppLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AppLogRequest != nil { + if err := r.SetBodyParam(o.AppLogRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/workflow/v0.0.1/workflow_client/app_log/post_app_logs_responses.go b/api/workflow/v0.0.1/workflow_client/app_log/post_app_logs_responses.go new file mode 100644 index 0000000..60647a6 --- /dev/null +++ b/api/workflow/v0.0.1/workflow_client/app_log/post_app_logs_responses.go @@ -0,0 +1,298 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package app_log + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/workflow/workflow_models" +) + +// PostAppLogsReader is a Reader for the PostAppLogs structure. +type PostAppLogsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostAppLogsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostAppLogsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostAppLogsUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostAppLogsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostAppLogsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostAppLogsUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostAppLogsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostAppLogsOK creates a PostAppLogsOK with default headers values +func NewPostAppLogsOK() *PostAppLogsOK { + return &PostAppLogsOK{} +} + +/*PostAppLogsOK handles this case with default header values. + +Array of AppLogs +*/ +type PostAppLogsOK struct { + AccessControlAllowOrigin string + + Payload *workflow_models.AppLogResponse +} + +func (o *PostAppLogsOK) Error() string { + return fmt.Sprintf("[POST /applogs][%d] postAppLogsOK %+v", 200, o.Payload) +} + +func (o *PostAppLogsOK) GetPayload() *workflow_models.AppLogResponse { + return o.Payload +} + +func (o *PostAppLogsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(workflow_models.AppLogResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostAppLogsUnauthorized creates a PostAppLogsUnauthorized with default headers values +func NewPostAppLogsUnauthorized() *PostAppLogsUnauthorized { + return &PostAppLogsUnauthorized{} +} + +/*PostAppLogsUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostAppLogsUnauthorized struct { + AccessControlAllowOrigin string + + Payload *workflow_models.Error +} + +func (o *PostAppLogsUnauthorized) Error() string { + return fmt.Sprintf("[POST /applogs][%d] postAppLogsUnauthorized %+v", 401, o.Payload) +} + +func (o *PostAppLogsUnauthorized) GetPayload() *workflow_models.Error { + return o.Payload +} + +func (o *PostAppLogsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(workflow_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostAppLogsForbidden creates a PostAppLogsForbidden with default headers values +func NewPostAppLogsForbidden() *PostAppLogsForbidden { + return &PostAppLogsForbidden{} +} + +/*PostAppLogsForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostAppLogsForbidden struct { + AccessControlAllowOrigin string + + Payload *workflow_models.Error +} + +func (o *PostAppLogsForbidden) Error() string { + return fmt.Sprintf("[POST /applogs][%d] postAppLogsForbidden %+v", 403, o.Payload) +} + +func (o *PostAppLogsForbidden) GetPayload() *workflow_models.Error { + return o.Payload +} + +func (o *PostAppLogsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(workflow_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostAppLogsNotFound creates a PostAppLogsNotFound with default headers values +func NewPostAppLogsNotFound() *PostAppLogsNotFound { + return &PostAppLogsNotFound{} +} + +/*PostAppLogsNotFound handles this case with default header values. + +Resource was not found +*/ +type PostAppLogsNotFound struct { + AccessControlAllowOrigin string + + Payload *workflow_models.Error +} + +func (o *PostAppLogsNotFound) Error() string { + return fmt.Sprintf("[POST /applogs][%d] postAppLogsNotFound %+v", 404, o.Payload) +} + +func (o *PostAppLogsNotFound) GetPayload() *workflow_models.Error { + return o.Payload +} + +func (o *PostAppLogsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(workflow_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostAppLogsUnprocessableEntity creates a PostAppLogsUnprocessableEntity with default headers values +func NewPostAppLogsUnprocessableEntity() *PostAppLogsUnprocessableEntity { + return &PostAppLogsUnprocessableEntity{} +} + +/*PostAppLogsUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostAppLogsUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *workflow_models.Error +} + +func (o *PostAppLogsUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /applogs][%d] postAppLogsUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostAppLogsUnprocessableEntity) GetPayload() *workflow_models.Error { + return o.Payload +} + +func (o *PostAppLogsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(workflow_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostAppLogsInternalServerError creates a PostAppLogsInternalServerError with default headers values +func NewPostAppLogsInternalServerError() *PostAppLogsInternalServerError { + return &PostAppLogsInternalServerError{} +} + +/*PostAppLogsInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostAppLogsInternalServerError struct { + AccessControlAllowOrigin string + + Payload *workflow_models.Error +} + +func (o *PostAppLogsInternalServerError) Error() string { + return fmt.Sprintf("[POST /applogs][%d] postAppLogsInternalServerError %+v", 500, o.Payload) +} + +func (o *PostAppLogsInternalServerError) GetPayload() *workflow_models.Error { + return o.Payload +} + +func (o *PostAppLogsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(workflow_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/workflow/v0.0.1/workflow_client/cors/app_log_options_parameters.go b/api/workflow/v0.0.1/workflow_client/cors/app_log_options_parameters.go new file mode 100644 index 0000000..9df5ec6 --- /dev/null +++ b/api/workflow/v0.0.1/workflow_client/cors/app_log_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewAppLogOptionsParams creates a new AppLogOptionsParams object +// with the default values initialized. +func NewAppLogOptionsParams() *AppLogOptionsParams { + + return &AppLogOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewAppLogOptionsParamsWithTimeout creates a new AppLogOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewAppLogOptionsParamsWithTimeout(timeout time.Duration) *AppLogOptionsParams { + + return &AppLogOptionsParams{ + + timeout: timeout, + } +} + +// NewAppLogOptionsParamsWithContext creates a new AppLogOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewAppLogOptionsParamsWithContext(ctx context.Context) *AppLogOptionsParams { + + return &AppLogOptionsParams{ + + Context: ctx, + } +} + +// NewAppLogOptionsParamsWithHTTPClient creates a new AppLogOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewAppLogOptionsParamsWithHTTPClient(client *http.Client) *AppLogOptionsParams { + + return &AppLogOptionsParams{ + HTTPClient: client, + } +} + +/*AppLogOptionsParams contains all the parameters to send to the API endpoint +for the app log options operation typically these are written to a http.Request +*/ +type AppLogOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the app log options params +func (o *AppLogOptionsParams) WithTimeout(timeout time.Duration) *AppLogOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the app log options params +func (o *AppLogOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the app log options params +func (o *AppLogOptionsParams) WithContext(ctx context.Context) *AppLogOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the app log options params +func (o *AppLogOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the app log options params +func (o *AppLogOptionsParams) WithHTTPClient(client *http.Client) *AppLogOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the app log options params +func (o *AppLogOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *AppLogOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/workflow/v0.0.1/workflow_client/cors/app_log_options_responses.go b/api/workflow/v0.0.1/workflow_client/cors/app_log_options_responses.go new file mode 100644 index 0000000..0626b6b --- /dev/null +++ b/api/workflow/v0.0.1/workflow_client/cors/app_log_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// AppLogOptionsReader is a Reader for the AppLogOptions structure. +type AppLogOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *AppLogOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewAppLogOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewAppLogOptionsOK creates a AppLogOptionsOK with default headers values +func NewAppLogOptionsOK() *AppLogOptionsOK { + return &AppLogOptionsOK{} +} + +/*AppLogOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type AppLogOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *AppLogOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /applogs][%d] appLogOptionsOK ", 200) +} + +func (o *AppLogOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/workflow/v0.0.1/workflow_client/cors/cors_client.go b/api/workflow/v0.0.1/workflow_client/cors/cors_client.go new file mode 100644 index 0000000..2b2bc40 --- /dev/null +++ b/api/workflow/v0.0.1/workflow_client/cors/cors_client.go @@ -0,0 +1,148 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new cors API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for cors API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + AppLogOptions(params *AppLogOptionsParams) (*AppLogOptionsOK, error) + + EmailMessageOptions(params *EmailMessageOptionsParams) (*EmailMessageOptionsOK, error) + + OutgoingEmailMessageOptions(params *OutgoingEmailMessageOptionsParams) (*OutgoingEmailMessageOptionsOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + AppLogOptions CORS support +*/ +func (a *Client) AppLogOptions(params *AppLogOptionsParams) (*AppLogOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewAppLogOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "appLogOptions", + Method: "OPTIONS", + PathPattern: "/applogs", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &AppLogOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*AppLogOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for appLogOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + EmailMessageOptions CORS support +*/ +func (a *Client) EmailMessageOptions(params *EmailMessageOptionsParams) (*EmailMessageOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewEmailMessageOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "emailMessageOptions", + Method: "OPTIONS", + PathPattern: "/emailmessages", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &EmailMessageOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*EmailMessageOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for emailMessageOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + OutgoingEmailMessageOptions CORS support +*/ +func (a *Client) OutgoingEmailMessageOptions(params *OutgoingEmailMessageOptionsParams) (*OutgoingEmailMessageOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewOutgoingEmailMessageOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "outgoingEmailMessageOptions", + Method: "OPTIONS", + PathPattern: "/outgoingemailmessages", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &OutgoingEmailMessageOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*OutgoingEmailMessageOptionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for outgoingEmailMessageOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/workflow/v0.0.1/workflow_client/cors/email_message_options_parameters.go b/api/workflow/v0.0.1/workflow_client/cors/email_message_options_parameters.go new file mode 100644 index 0000000..777d4e8 --- /dev/null +++ b/api/workflow/v0.0.1/workflow_client/cors/email_message_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewEmailMessageOptionsParams creates a new EmailMessageOptionsParams object +// with the default values initialized. +func NewEmailMessageOptionsParams() *EmailMessageOptionsParams { + + return &EmailMessageOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewEmailMessageOptionsParamsWithTimeout creates a new EmailMessageOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewEmailMessageOptionsParamsWithTimeout(timeout time.Duration) *EmailMessageOptionsParams { + + return &EmailMessageOptionsParams{ + + timeout: timeout, + } +} + +// NewEmailMessageOptionsParamsWithContext creates a new EmailMessageOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewEmailMessageOptionsParamsWithContext(ctx context.Context) *EmailMessageOptionsParams { + + return &EmailMessageOptionsParams{ + + Context: ctx, + } +} + +// NewEmailMessageOptionsParamsWithHTTPClient creates a new EmailMessageOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewEmailMessageOptionsParamsWithHTTPClient(client *http.Client) *EmailMessageOptionsParams { + + return &EmailMessageOptionsParams{ + HTTPClient: client, + } +} + +/*EmailMessageOptionsParams contains all the parameters to send to the API endpoint +for the email message options operation typically these are written to a http.Request +*/ +type EmailMessageOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the email message options params +func (o *EmailMessageOptionsParams) WithTimeout(timeout time.Duration) *EmailMessageOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the email message options params +func (o *EmailMessageOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the email message options params +func (o *EmailMessageOptionsParams) WithContext(ctx context.Context) *EmailMessageOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the email message options params +func (o *EmailMessageOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the email message options params +func (o *EmailMessageOptionsParams) WithHTTPClient(client *http.Client) *EmailMessageOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the email message options params +func (o *EmailMessageOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *EmailMessageOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/workflow/v0.0.1/workflow_client/cors/email_message_options_responses.go b/api/workflow/v0.0.1/workflow_client/cors/email_message_options_responses.go new file mode 100644 index 0000000..d3d8b2d --- /dev/null +++ b/api/workflow/v0.0.1/workflow_client/cors/email_message_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// EmailMessageOptionsReader is a Reader for the EmailMessageOptions structure. +type EmailMessageOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *EmailMessageOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewEmailMessageOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewEmailMessageOptionsOK creates a EmailMessageOptionsOK with default headers values +func NewEmailMessageOptionsOK() *EmailMessageOptionsOK { + return &EmailMessageOptionsOK{} +} + +/*EmailMessageOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type EmailMessageOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *EmailMessageOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /emailmessages][%d] emailMessageOptionsOK ", 200) +} + +func (o *EmailMessageOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/workflow/v0.0.1/workflow_client/cors/outgoing_email_message_options_parameters.go b/api/workflow/v0.0.1/workflow_client/cors/outgoing_email_message_options_parameters.go new file mode 100644 index 0000000..61230d8 --- /dev/null +++ b/api/workflow/v0.0.1/workflow_client/cors/outgoing_email_message_options_parameters.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewOutgoingEmailMessageOptionsParams creates a new OutgoingEmailMessageOptionsParams object +// with the default values initialized. +func NewOutgoingEmailMessageOptionsParams() *OutgoingEmailMessageOptionsParams { + + return &OutgoingEmailMessageOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewOutgoingEmailMessageOptionsParamsWithTimeout creates a new OutgoingEmailMessageOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewOutgoingEmailMessageOptionsParamsWithTimeout(timeout time.Duration) *OutgoingEmailMessageOptionsParams { + + return &OutgoingEmailMessageOptionsParams{ + + timeout: timeout, + } +} + +// NewOutgoingEmailMessageOptionsParamsWithContext creates a new OutgoingEmailMessageOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewOutgoingEmailMessageOptionsParamsWithContext(ctx context.Context) *OutgoingEmailMessageOptionsParams { + + return &OutgoingEmailMessageOptionsParams{ + + Context: ctx, + } +} + +// NewOutgoingEmailMessageOptionsParamsWithHTTPClient creates a new OutgoingEmailMessageOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewOutgoingEmailMessageOptionsParamsWithHTTPClient(client *http.Client) *OutgoingEmailMessageOptionsParams { + + return &OutgoingEmailMessageOptionsParams{ + HTTPClient: client, + } +} + +/*OutgoingEmailMessageOptionsParams contains all the parameters to send to the API endpoint +for the outgoing email message options operation typically these are written to a http.Request +*/ +type OutgoingEmailMessageOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the outgoing email message options params +func (o *OutgoingEmailMessageOptionsParams) WithTimeout(timeout time.Duration) *OutgoingEmailMessageOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the outgoing email message options params +func (o *OutgoingEmailMessageOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the outgoing email message options params +func (o *OutgoingEmailMessageOptionsParams) WithContext(ctx context.Context) *OutgoingEmailMessageOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the outgoing email message options params +func (o *OutgoingEmailMessageOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the outgoing email message options params +func (o *OutgoingEmailMessageOptionsParams) WithHTTPClient(client *http.Client) *OutgoingEmailMessageOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the outgoing email message options params +func (o *OutgoingEmailMessageOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *OutgoingEmailMessageOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/workflow/v0.0.1/workflow_client/cors/outgoing_email_message_options_responses.go b/api/workflow/v0.0.1/workflow_client/cors/outgoing_email_message_options_responses.go new file mode 100644 index 0000000..a3ca8aa --- /dev/null +++ b/api/workflow/v0.0.1/workflow_client/cors/outgoing_email_message_options_responses.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package cors + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// OutgoingEmailMessageOptionsReader is a Reader for the OutgoingEmailMessageOptions structure. +type OutgoingEmailMessageOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *OutgoingEmailMessageOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewOutgoingEmailMessageOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewOutgoingEmailMessageOptionsOK creates a OutgoingEmailMessageOptionsOK with default headers values +func NewOutgoingEmailMessageOptionsOK() *OutgoingEmailMessageOptionsOK { + return &OutgoingEmailMessageOptionsOK{} +} + +/*OutgoingEmailMessageOptionsOK handles this case with default header values. + +CORS OPTIONS response +*/ +type OutgoingEmailMessageOptionsOK struct { + AccessControlAllowCredentials string + + AccessControlAllowHeaders string + + AccessControlAllowMethods string + + AccessControlAllowOrigin string + + AccessControlExposeHeaders string + + AccessControlMaxAge string + + CacheControl string +} + +func (o *OutgoingEmailMessageOptionsOK) Error() string { + return fmt.Sprintf("[OPTIONS /outgoingemailmessages][%d] outgoingEmailMessageOptionsOK ", 200) +} + +func (o *OutgoingEmailMessageOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Credentials + o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials") + + // response header Access-Control-Allow-Headers + o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers") + + // response header Access-Control-Allow-Methods + o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods") + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + // response header Access-Control-Expose-Headers + o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers") + + // response header Access-Control-Max-Age + o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age") + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + return nil +} diff --git a/api/workflow/v0.0.1/workflow_client/email_message/email_message_client.go b/api/workflow/v0.0.1/workflow_client/email_message/email_message_client.go new file mode 100644 index 0000000..664c074 --- /dev/null +++ b/api/workflow/v0.0.1/workflow_client/email_message/email_message_client.go @@ -0,0 +1,79 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package email_message + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new email message API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for email message API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + GetEmailMessages(params *GetEmailMessagesParams, authInfo runtime.ClientAuthInfoWriter) (*GetEmailMessagesOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + GetEmailMessages gets email messages from data store + + Retrieves email messages from workflow storage +*/ +func (a *Client) GetEmailMessages(params *GetEmailMessagesParams, authInfo runtime.ClientAuthInfoWriter) (*GetEmailMessagesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGetEmailMessagesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "getEmailMessages", + Method: "GET", + PathPattern: "/emailmessages", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GetEmailMessagesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GetEmailMessagesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for getEmailMessages: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/workflow/v0.0.1/workflow_client/email_message/get_email_messages_parameters.go b/api/workflow/v0.0.1/workflow_client/email_message/get_email_messages_parameters.go new file mode 100644 index 0000000..d9e6d51 --- /dev/null +++ b/api/workflow/v0.0.1/workflow_client/email_message/get_email_messages_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package email_message + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewGetEmailMessagesParams creates a new GetEmailMessagesParams object +// with the default values initialized. +func NewGetEmailMessagesParams() *GetEmailMessagesParams { + var () + return &GetEmailMessagesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGetEmailMessagesParamsWithTimeout creates a new GetEmailMessagesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGetEmailMessagesParamsWithTimeout(timeout time.Duration) *GetEmailMessagesParams { + var () + return &GetEmailMessagesParams{ + + timeout: timeout, + } +} + +// NewGetEmailMessagesParamsWithContext creates a new GetEmailMessagesParams object +// with the default values initialized, and the ability to set a context for a request +func NewGetEmailMessagesParamsWithContext(ctx context.Context) *GetEmailMessagesParams { + var () + return &GetEmailMessagesParams{ + + Context: ctx, + } +} + +// NewGetEmailMessagesParamsWithHTTPClient creates a new GetEmailMessagesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGetEmailMessagesParamsWithHTTPClient(client *http.Client) *GetEmailMessagesParams { + var () + return &GetEmailMessagesParams{ + HTTPClient: client, + } +} + +/*GetEmailMessagesParams contains all the parameters to send to the API endpoint +for the get email messages operation typically these are written to a http.Request +*/ +type GetEmailMessagesParams struct { + + /*EmailMessageID + Email Message ID + + */ + EmailMessageID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the get email messages params +func (o *GetEmailMessagesParams) WithTimeout(timeout time.Duration) *GetEmailMessagesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get email messages params +func (o *GetEmailMessagesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get email messages params +func (o *GetEmailMessagesParams) WithContext(ctx context.Context) *GetEmailMessagesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get email messages params +func (o *GetEmailMessagesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get email messages params +func (o *GetEmailMessagesParams) WithHTTPClient(client *http.Client) *GetEmailMessagesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get email messages params +func (o *GetEmailMessagesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithEmailMessageID adds the emailMessageID to the get email messages params +func (o *GetEmailMessagesParams) WithEmailMessageID(emailMessageID *string) *GetEmailMessagesParams { + o.SetEmailMessageID(emailMessageID) + return o +} + +// SetEmailMessageID adds the emailMessageId to the get email messages params +func (o *GetEmailMessagesParams) SetEmailMessageID(emailMessageID *string) { + o.EmailMessageID = emailMessageID +} + +// WriteToRequest writes these params to a swagger request +func (o *GetEmailMessagesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.EmailMessageID != nil { + + // query param emailMessageId + var qrEmailMessageID string + if o.EmailMessageID != nil { + qrEmailMessageID = *o.EmailMessageID + } + qEmailMessageID := qrEmailMessageID + if qEmailMessageID != "" { + if err := r.SetQueryParam("emailMessageId", qEmailMessageID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/workflow/v0.0.1/workflow_client/email_message/get_email_messages_responses.go b/api/workflow/v0.0.1/workflow_client/email_message/get_email_messages_responses.go new file mode 100644 index 0000000..7f24fbb --- /dev/null +++ b/api/workflow/v0.0.1/workflow_client/email_message/get_email_messages_responses.go @@ -0,0 +1,298 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package email_message + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/workflow/workflow_models" +) + +// GetEmailMessagesReader is a Reader for the GetEmailMessages structure. +type GetEmailMessagesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetEmailMessagesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGetEmailMessagesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewGetEmailMessagesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewGetEmailMessagesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewGetEmailMessagesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewGetEmailMessagesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewGetEmailMessagesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewGetEmailMessagesOK creates a GetEmailMessagesOK with default headers values +func NewGetEmailMessagesOK() *GetEmailMessagesOK { + return &GetEmailMessagesOK{} +} + +/*GetEmailMessagesOK handles this case with default header values. + +Array of Email Messages +*/ +type GetEmailMessagesOK struct { + AccessControlAllowOrigin string + + Payload *workflow_models.EmailMessagesResponse +} + +func (o *GetEmailMessagesOK) Error() string { + return fmt.Sprintf("[GET /emailmessages][%d] getEmailMessagesOK %+v", 200, o.Payload) +} + +func (o *GetEmailMessagesOK) GetPayload() *workflow_models.EmailMessagesResponse { + return o.Payload +} + +func (o *GetEmailMessagesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(workflow_models.EmailMessagesResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetEmailMessagesUnauthorized creates a GetEmailMessagesUnauthorized with default headers values +func NewGetEmailMessagesUnauthorized() *GetEmailMessagesUnauthorized { + return &GetEmailMessagesUnauthorized{} +} + +/*GetEmailMessagesUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type GetEmailMessagesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *workflow_models.Error +} + +func (o *GetEmailMessagesUnauthorized) Error() string { + return fmt.Sprintf("[GET /emailmessages][%d] getEmailMessagesUnauthorized %+v", 401, o.Payload) +} + +func (o *GetEmailMessagesUnauthorized) GetPayload() *workflow_models.Error { + return o.Payload +} + +func (o *GetEmailMessagesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(workflow_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetEmailMessagesForbidden creates a GetEmailMessagesForbidden with default headers values +func NewGetEmailMessagesForbidden() *GetEmailMessagesForbidden { + return &GetEmailMessagesForbidden{} +} + +/*GetEmailMessagesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type GetEmailMessagesForbidden struct { + AccessControlAllowOrigin string + + Payload *workflow_models.Error +} + +func (o *GetEmailMessagesForbidden) Error() string { + return fmt.Sprintf("[GET /emailmessages][%d] getEmailMessagesForbidden %+v", 403, o.Payload) +} + +func (o *GetEmailMessagesForbidden) GetPayload() *workflow_models.Error { + return o.Payload +} + +func (o *GetEmailMessagesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(workflow_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetEmailMessagesNotFound creates a GetEmailMessagesNotFound with default headers values +func NewGetEmailMessagesNotFound() *GetEmailMessagesNotFound { + return &GetEmailMessagesNotFound{} +} + +/*GetEmailMessagesNotFound handles this case with default header values. + +Resource was not found +*/ +type GetEmailMessagesNotFound struct { + AccessControlAllowOrigin string + + Payload *workflow_models.Error +} + +func (o *GetEmailMessagesNotFound) Error() string { + return fmt.Sprintf("[GET /emailmessages][%d] getEmailMessagesNotFound %+v", 404, o.Payload) +} + +func (o *GetEmailMessagesNotFound) GetPayload() *workflow_models.Error { + return o.Payload +} + +func (o *GetEmailMessagesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(workflow_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetEmailMessagesUnprocessableEntity creates a GetEmailMessagesUnprocessableEntity with default headers values +func NewGetEmailMessagesUnprocessableEntity() *GetEmailMessagesUnprocessableEntity { + return &GetEmailMessagesUnprocessableEntity{} +} + +/*GetEmailMessagesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type GetEmailMessagesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *workflow_models.Error +} + +func (o *GetEmailMessagesUnprocessableEntity) Error() string { + return fmt.Sprintf("[GET /emailmessages][%d] getEmailMessagesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *GetEmailMessagesUnprocessableEntity) GetPayload() *workflow_models.Error { + return o.Payload +} + +func (o *GetEmailMessagesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(workflow_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewGetEmailMessagesInternalServerError creates a GetEmailMessagesInternalServerError with default headers values +func NewGetEmailMessagesInternalServerError() *GetEmailMessagesInternalServerError { + return &GetEmailMessagesInternalServerError{} +} + +/*GetEmailMessagesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type GetEmailMessagesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *workflow_models.Error +} + +func (o *GetEmailMessagesInternalServerError) Error() string { + return fmt.Sprintf("[GET /emailmessages][%d] getEmailMessagesInternalServerError %+v", 500, o.Payload) +} + +func (o *GetEmailMessagesInternalServerError) GetPayload() *workflow_models.Error { + return o.Payload +} + +func (o *GetEmailMessagesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(workflow_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/workflow/v0.0.1/workflow_client/outgoing_email_message/outgoing_email_message_client.go b/api/workflow/v0.0.1/workflow_client/outgoing_email_message/outgoing_email_message_client.go new file mode 100644 index 0000000..9e0855e --- /dev/null +++ b/api/workflow/v0.0.1/workflow_client/outgoing_email_message/outgoing_email_message_client.go @@ -0,0 +1,79 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package outgoing_email_message + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new outgoing email message API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for outgoing email message API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + PostOutgoingEmailMessages(params *PostOutgoingEmailMessagesParams, authInfo runtime.ClientAuthInfoWriter) (*PostOutgoingEmailMessagesOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + PostOutgoingEmailMessages adds new email messages to the outgoing queue + + Insert new email messages into workflow storage +*/ +func (a *Client) PostOutgoingEmailMessages(params *PostOutgoingEmailMessagesParams, authInfo runtime.ClientAuthInfoWriter) (*PostOutgoingEmailMessagesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPostOutgoingEmailMessagesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "postOutgoingEmailMessages", + Method: "POST", + PathPattern: "/outgoingemailmessages", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &PostOutgoingEmailMessagesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PostOutgoingEmailMessagesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for postOutgoingEmailMessages: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/workflow/v0.0.1/workflow_client/outgoing_email_message/post_outgoing_email_messages_parameters.go b/api/workflow/v0.0.1/workflow_client/outgoing_email_message/post_outgoing_email_messages_parameters.go new file mode 100644 index 0000000..01e2fce --- /dev/null +++ b/api/workflow/v0.0.1/workflow_client/outgoing_email_message/post_outgoing_email_messages_parameters.go @@ -0,0 +1,142 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package outgoing_email_message + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/workflow/workflow_models" +) + +// NewPostOutgoingEmailMessagesParams creates a new PostOutgoingEmailMessagesParams object +// with the default values initialized. +func NewPostOutgoingEmailMessagesParams() *PostOutgoingEmailMessagesParams { + var () + return &PostOutgoingEmailMessagesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPostOutgoingEmailMessagesParamsWithTimeout creates a new PostOutgoingEmailMessagesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPostOutgoingEmailMessagesParamsWithTimeout(timeout time.Duration) *PostOutgoingEmailMessagesParams { + var () + return &PostOutgoingEmailMessagesParams{ + + timeout: timeout, + } +} + +// NewPostOutgoingEmailMessagesParamsWithContext creates a new PostOutgoingEmailMessagesParams object +// with the default values initialized, and the ability to set a context for a request +func NewPostOutgoingEmailMessagesParamsWithContext(ctx context.Context) *PostOutgoingEmailMessagesParams { + var () + return &PostOutgoingEmailMessagesParams{ + + Context: ctx, + } +} + +// NewPostOutgoingEmailMessagesParamsWithHTTPClient creates a new PostOutgoingEmailMessagesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPostOutgoingEmailMessagesParamsWithHTTPClient(client *http.Client) *PostOutgoingEmailMessagesParams { + var () + return &PostOutgoingEmailMessagesParams{ + HTTPClient: client, + } +} + +/*PostOutgoingEmailMessagesParams contains all the parameters to send to the API endpoint +for the post outgoing email messages operation typically these are written to a http.Request +*/ +type PostOutgoingEmailMessagesParams struct { + + /*OutgoingEmailMessageRequest + An array of new Outgoing Email Message records + + */ + OutgoingEmailMessageRequest *workflow_models.OutgoingEmailMessageRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the post outgoing email messages params +func (o *PostOutgoingEmailMessagesParams) WithTimeout(timeout time.Duration) *PostOutgoingEmailMessagesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the post outgoing email messages params +func (o *PostOutgoingEmailMessagesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the post outgoing email messages params +func (o *PostOutgoingEmailMessagesParams) WithContext(ctx context.Context) *PostOutgoingEmailMessagesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the post outgoing email messages params +func (o *PostOutgoingEmailMessagesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the post outgoing email messages params +func (o *PostOutgoingEmailMessagesParams) WithHTTPClient(client *http.Client) *PostOutgoingEmailMessagesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the post outgoing email messages params +func (o *PostOutgoingEmailMessagesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithOutgoingEmailMessageRequest adds the outgoingEmailMessageRequest to the post outgoing email messages params +func (o *PostOutgoingEmailMessagesParams) WithOutgoingEmailMessageRequest(outgoingEmailMessageRequest *workflow_models.OutgoingEmailMessageRequest) *PostOutgoingEmailMessagesParams { + o.SetOutgoingEmailMessageRequest(outgoingEmailMessageRequest) + return o +} + +// SetOutgoingEmailMessageRequest adds the outgoingEmailMessageRequest to the post outgoing email messages params +func (o *PostOutgoingEmailMessagesParams) SetOutgoingEmailMessageRequest(outgoingEmailMessageRequest *workflow_models.OutgoingEmailMessageRequest) { + o.OutgoingEmailMessageRequest = outgoingEmailMessageRequest +} + +// WriteToRequest writes these params to a swagger request +func (o *PostOutgoingEmailMessagesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.OutgoingEmailMessageRequest != nil { + if err := r.SetBodyParam(o.OutgoingEmailMessageRequest); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/workflow/v0.0.1/workflow_client/outgoing_email_message/post_outgoing_email_messages_responses.go b/api/workflow/v0.0.1/workflow_client/outgoing_email_message/post_outgoing_email_messages_responses.go new file mode 100644 index 0000000..a770a6f --- /dev/null +++ b/api/workflow/v0.0.1/workflow_client/outgoing_email_message/post_outgoing_email_messages_responses.go @@ -0,0 +1,298 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package outgoing_email_message + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/workflow/workflow_models" +) + +// PostOutgoingEmailMessagesReader is a Reader for the PostOutgoingEmailMessages structure. +type PostOutgoingEmailMessagesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PostOutgoingEmailMessagesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPostOutgoingEmailMessagesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 401: + result := NewPostOutgoingEmailMessagesUnauthorized() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 403: + result := NewPostOutgoingEmailMessagesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewPostOutgoingEmailMessagesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 422: + result := NewPostOutgoingEmailMessagesUnprocessableEntity() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewPostOutgoingEmailMessagesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + + default: + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + } +} + +// NewPostOutgoingEmailMessagesOK creates a PostOutgoingEmailMessagesOK with default headers values +func NewPostOutgoingEmailMessagesOK() *PostOutgoingEmailMessagesOK { + return &PostOutgoingEmailMessagesOK{} +} + +/*PostOutgoingEmailMessagesOK handles this case with default header values. + +Array of Email Messages +*/ +type PostOutgoingEmailMessagesOK struct { + AccessControlAllowOrigin string + + Payload *workflow_models.EmailMessagesResponse +} + +func (o *PostOutgoingEmailMessagesOK) Error() string { + return fmt.Sprintf("[POST /outgoingemailmessages][%d] postOutgoingEmailMessagesOK %+v", 200, o.Payload) +} + +func (o *PostOutgoingEmailMessagesOK) GetPayload() *workflow_models.EmailMessagesResponse { + return o.Payload +} + +func (o *PostOutgoingEmailMessagesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(workflow_models.EmailMessagesResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostOutgoingEmailMessagesUnauthorized creates a PostOutgoingEmailMessagesUnauthorized with default headers values +func NewPostOutgoingEmailMessagesUnauthorized() *PostOutgoingEmailMessagesUnauthorized { + return &PostOutgoingEmailMessagesUnauthorized{} +} + +/*PostOutgoingEmailMessagesUnauthorized handles this case with default header values. + +Access Unauthorized, invalid API-KEY was used +*/ +type PostOutgoingEmailMessagesUnauthorized struct { + AccessControlAllowOrigin string + + Payload *workflow_models.Error +} + +func (o *PostOutgoingEmailMessagesUnauthorized) Error() string { + return fmt.Sprintf("[POST /outgoingemailmessages][%d] postOutgoingEmailMessagesUnauthorized %+v", 401, o.Payload) +} + +func (o *PostOutgoingEmailMessagesUnauthorized) GetPayload() *workflow_models.Error { + return o.Payload +} + +func (o *PostOutgoingEmailMessagesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(workflow_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostOutgoingEmailMessagesForbidden creates a PostOutgoingEmailMessagesForbidden with default headers values +func NewPostOutgoingEmailMessagesForbidden() *PostOutgoingEmailMessagesForbidden { + return &PostOutgoingEmailMessagesForbidden{} +} + +/*PostOutgoingEmailMessagesForbidden handles this case with default header values. + +Access forbidden, account lacks access +*/ +type PostOutgoingEmailMessagesForbidden struct { + AccessControlAllowOrigin string + + Payload *workflow_models.Error +} + +func (o *PostOutgoingEmailMessagesForbidden) Error() string { + return fmt.Sprintf("[POST /outgoingemailmessages][%d] postOutgoingEmailMessagesForbidden %+v", 403, o.Payload) +} + +func (o *PostOutgoingEmailMessagesForbidden) GetPayload() *workflow_models.Error { + return o.Payload +} + +func (o *PostOutgoingEmailMessagesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(workflow_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostOutgoingEmailMessagesNotFound creates a PostOutgoingEmailMessagesNotFound with default headers values +func NewPostOutgoingEmailMessagesNotFound() *PostOutgoingEmailMessagesNotFound { + return &PostOutgoingEmailMessagesNotFound{} +} + +/*PostOutgoingEmailMessagesNotFound handles this case with default header values. + +Resource was not found +*/ +type PostOutgoingEmailMessagesNotFound struct { + AccessControlAllowOrigin string + + Payload *workflow_models.Error +} + +func (o *PostOutgoingEmailMessagesNotFound) Error() string { + return fmt.Sprintf("[POST /outgoingemailmessages][%d] postOutgoingEmailMessagesNotFound %+v", 404, o.Payload) +} + +func (o *PostOutgoingEmailMessagesNotFound) GetPayload() *workflow_models.Error { + return o.Payload +} + +func (o *PostOutgoingEmailMessagesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(workflow_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostOutgoingEmailMessagesUnprocessableEntity creates a PostOutgoingEmailMessagesUnprocessableEntity with default headers values +func NewPostOutgoingEmailMessagesUnprocessableEntity() *PostOutgoingEmailMessagesUnprocessableEntity { + return &PostOutgoingEmailMessagesUnprocessableEntity{} +} + +/*PostOutgoingEmailMessagesUnprocessableEntity handles this case with default header values. + +Unprocessable Entity, likely a bad parameter +*/ +type PostOutgoingEmailMessagesUnprocessableEntity struct { + AccessControlAllowOrigin string + + Payload *workflow_models.Error +} + +func (o *PostOutgoingEmailMessagesUnprocessableEntity) Error() string { + return fmt.Sprintf("[POST /outgoingemailmessages][%d] postOutgoingEmailMessagesUnprocessableEntity %+v", 422, o.Payload) +} + +func (o *PostOutgoingEmailMessagesUnprocessableEntity) GetPayload() *workflow_models.Error { + return o.Payload +} + +func (o *PostOutgoingEmailMessagesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(workflow_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPostOutgoingEmailMessagesInternalServerError creates a PostOutgoingEmailMessagesInternalServerError with default headers values +func NewPostOutgoingEmailMessagesInternalServerError() *PostOutgoingEmailMessagesInternalServerError { + return &PostOutgoingEmailMessagesInternalServerError{} +} + +/*PostOutgoingEmailMessagesInternalServerError handles this case with default header values. + +Server Internal Error +*/ +type PostOutgoingEmailMessagesInternalServerError struct { + AccessControlAllowOrigin string + + Payload *workflow_models.Error +} + +func (o *PostOutgoingEmailMessagesInternalServerError) Error() string { + return fmt.Sprintf("[POST /outgoingemailmessages][%d] postOutgoingEmailMessagesInternalServerError %+v", 500, o.Payload) +} + +func (o *PostOutgoingEmailMessagesInternalServerError) GetPayload() *workflow_models.Error { + return o.Payload +} + +func (o *PostOutgoingEmailMessagesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Access-Control-Allow-Origin + o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") + + o.Payload = new(workflow_models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/workflow/v0.0.1/workflow_client/workflow_client.go b/api/workflow/v0.0.1/workflow_client/workflow_client.go new file mode 100644 index 0000000..7daacff --- /dev/null +++ b/api/workflow/v0.0.1/workflow_client/workflow_client.go @@ -0,0 +1,131 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package workflow_client + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/taxnexus/lib/api/workflow/workflow_client/app_log" + "github.com/taxnexus/lib/api/workflow/workflow_client/cors" + "github.com/taxnexus/lib/api/workflow/workflow_client/email_message" + "github.com/taxnexus/lib/api/workflow/workflow_client/outgoing_email_message" +) + +// Default workflow HTTP client. +var Default = NewHTTPClient(nil) + +const ( + // DefaultHost is the default Host + // found in Meta (info) section of spec file + DefaultHost string = "workflow.fabric.tnxs.net:8080" + // DefaultBasePath is the default BasePath + // found in Meta (info) section of spec file + DefaultBasePath string = "/v1" +) + +// DefaultSchemes are the default schemes found in Meta (info) section of spec file +var DefaultSchemes = []string{"http"} + +// NewHTTPClient creates a new workflow HTTP client. +func NewHTTPClient(formats strfmt.Registry) *Workflow { + return NewHTTPClientWithConfig(formats, nil) +} + +// NewHTTPClientWithConfig creates a new workflow HTTP client, +// using a customizable transport config. +func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *Workflow { + // ensure nullable parameters have default + if cfg == nil { + cfg = DefaultTransportConfig() + } + + // create transport and client + transport := httptransport.New(cfg.Host, cfg.BasePath, cfg.Schemes) + return New(transport, formats) +} + +// New creates a new workflow client +func New(transport runtime.ClientTransport, formats strfmt.Registry) *Workflow { + // ensure nullable parameters have default + if formats == nil { + formats = strfmt.Default + } + + cli := new(Workflow) + cli.Transport = transport + cli.AppLog = app_log.New(transport, formats) + cli.Cors = cors.New(transport, formats) + cli.EmailMessage = email_message.New(transport, formats) + cli.OutgoingEmailMessage = outgoing_email_message.New(transport, formats) + return cli +} + +// DefaultTransportConfig creates a TransportConfig with the +// default settings taken from the meta section of the spec file. +func DefaultTransportConfig() *TransportConfig { + return &TransportConfig{ + Host: DefaultHost, + BasePath: DefaultBasePath, + Schemes: DefaultSchemes, + } +} + +// TransportConfig contains the transport related info, +// found in the meta section of the spec file. +type TransportConfig struct { + Host string + BasePath string + Schemes []string +} + +// WithHost overrides the default host, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithHost(host string) *TransportConfig { + cfg.Host = host + return cfg +} + +// WithBasePath overrides the default basePath, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithBasePath(basePath string) *TransportConfig { + cfg.BasePath = basePath + return cfg +} + +// WithSchemes overrides the default schemes, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { + cfg.Schemes = schemes + return cfg +} + +// Workflow is a client for workflow +type Workflow struct { + AppLog app_log.ClientService + + Cors cors.ClientService + + EmailMessage email_message.ClientService + + OutgoingEmailMessage outgoing_email_message.ClientService + + Transport runtime.ClientTransport +} + +// SetTransport changes the transport on the client and all its subresources +func (c *Workflow) SetTransport(transport runtime.ClientTransport) { + c.Transport = transport + c.AppLog.SetTransport(transport) + c.Cors.SetTransport(transport) + c.EmailMessage.SetTransport(transport) + c.OutgoingEmailMessage.SetTransport(transport) +} diff --git a/api/workflow/v0.0.1/workflow_models/app_log.go b/api/workflow/v0.0.1/workflow_models/app_log.go new file mode 100644 index 0000000..67618e3 --- /dev/null +++ b/api/workflow/v0.0.1/workflow_models/app_log.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package workflow_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// AppLog Application Log for human consumption +// +// swagger:model AppLog +type AppLog struct { + + // account ID + AccountID string `json:"AccountID,omitempty"` + + // company ID + CompanyID string `json:"CompanyID,omitempty"` + + // created by ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // created date + CreatedDate string `json:"CreatedDate,omitempty"` + + // ID + ID string `json:"ID,omitempty"` + + // message + Message string `json:"Message,omitempty"` + + // object ID + ObjectID string `json:"ObjectID,omitempty"` + + // object type + ObjectType string `json:"ObjectType,omitempty"` + + // severity + Severity string `json:"Severity,omitempty"` + + // source + Source string `json:"Source,omitempty"` + + // source timestamp + SourceTimestamp string `json:"SourceTimestamp,omitempty"` +} + +// Validate validates this app log +func (m *AppLog) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *AppLog) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AppLog) UnmarshalBinary(b []byte) error { + var res AppLog + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/workflow/v0.0.1/workflow_models/app_log_request.go b/api/workflow/v0.0.1/workflow_models/app_log_request.go new file mode 100644 index 0000000..e64e089 --- /dev/null +++ b/api/workflow/v0.0.1/workflow_models/app_log_request.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package workflow_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// AppLogRequest An array Taxnexus Application Log objects +// +// swagger:model AppLogRequest +type AppLogRequest struct { + + // data + Data []*AppLog `json:"data"` + + // meta + Meta *RequestMeta `json:"meta,omitempty"` +} + +// Validate validates this app log request +func (m *AppLogRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AppLogRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *AppLogRequest) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *AppLogRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AppLogRequest) UnmarshalBinary(b []byte) error { + var res AppLogRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/workflow/v0.0.1/workflow_models/app_log_response.go b/api/workflow/v0.0.1/workflow_models/app_log_response.go new file mode 100644 index 0000000..f5f5b29 --- /dev/null +++ b/api/workflow/v0.0.1/workflow_models/app_log_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package workflow_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// AppLogResponse An array Taxnexus Application Log objects +// +// swagger:model AppLogResponse +type AppLogResponse struct { + + // data + Data []*AppLog `json:"data"` + + // meta + Meta *ResponseMeta `json:"meta,omitempty"` +} + +// Validate validates this app log response +func (m *AppLogResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *AppLogResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *AppLogResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *AppLogResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *AppLogResponse) UnmarshalBinary(b []byte) error { + var res AppLogResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/workflow/v0.0.1/workflow_models/document.go b/api/workflow/v0.0.1/workflow_models/document.go new file mode 100644 index 0000000..f0a531c --- /dev/null +++ b/api/workflow/v0.0.1/workflow_models/document.go @@ -0,0 +1,226 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package workflow_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Document Taxnexus Document +// +// swagger:model Document +type Document struct { + + // archived by ID + ArchivedByID string `json:"ArchivedByID,omitempty"` + + // archived date + ArchivedDate string `json:"ArchivedDate,omitempty"` + + // author ID + AuthorID string `json:"AuthorID,omitempty"` + + // body + // Format: byte + Body strfmt.Base64 `json:"Body,omitempty"` + + // body length + BodyLength int64 `json:"BodyLength,omitempty"` + + // comment count + CommentCount int64 `json:"CommentCount,omitempty"` + + // connection ID + ConnectionID string `json:"ConnectionID,omitempty"` + + // content asset ID + ContentAssetID string `json:"ContentAssetID,omitempty"` + + // content modification date + ContentModificationDate string `json:"ContentModificationDate,omitempty"` + + // content size + ContentSize int64 `json:"ContentSize,omitempty"` + + // content type + ContentType string `json:"ContentType,omitempty"` + + // content version document ID + ContentVersionDocumentID string `json:"ContentVersionDocumentID,omitempty"` + + // contnet document ID + ContnetDocumentID string `json:"ContnetDocumentID,omitempty"` + + // created by ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // created date + CreatedDate string `json:"CreatedDate,omitempty"` + + // d date + DDate string `json:"DDate,omitempty"` + + // description + Description string `json:"Description,omitempty"` + + // developer name + DeveloperName string `json:"DeveloperName,omitempty"` + + // discount + Discount float64 `json:"Discount,omitempty"` + + // document + // Format: byte + Document strfmt.Base64 `json:"Document,omitempty"` + + // document ID + DocumentID string `json:"DocumentID,omitempty"` + + // document sequence + DocumentSequence int64 `json:"DocumentSequence,omitempty"` + + // field + Field string `json:"Field,omitempty"` + + // file extension + FileExtension string `json:"FileExtension,omitempty"` + + // file type + FileType string `json:"FileType,omitempty"` + + // folder ID + FolderID string `json:"FolderID,omitempty"` + + // grand total + GrandTotal string `json:"GrandTotal,omitempty"` + + // ID + ID string `json:"ID,omitempty"` + + // inserted by ID + InsertedByID string `json:"InsertedByID,omitempty"` + + // is archived + IsArchived bool `json:"IsArchived,omitempty"` + + // is body searchable + IsBodySearchable bool `json:"IsBodySearchable,omitempty"` + + // is comment sub + IsCommentSub bool `json:"IsCommentSub,omitempty"` + + // is document sub + IsDocumentSub bool `json:"IsDocumentSub,omitempty"` + + // is internal use only + IsInternalUseOnly bool `json:"IsInternalUseOnly,omitempty"` + + // is public + IsPublic bool `json:"IsPublic,omitempty"` + + // is rich text + IsRichText bool `json:"IsRichText,omitempty"` + + // keywords + Keywords string `json:"Keywords,omitempty"` + + // last modified by ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // last modified date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // last viewed date + LastViewedDate string `json:"LastViewedDate,omitempty"` + + // latst published version ID + LatstPublishedVersionID string `json:"LatstPublishedVersionID,omitempty"` + + // like count + LikeCount int64 `json:"LikeCount,omitempty"` + + // link URL + LinkURL string `json:"LinkURL,omitempty"` + + // linked entity ID + LinkedEntityID string `json:"LinkedEntityID,omitempty"` + + // name + Name string `json:"Name,omitempty"` + + // namespace prefix + NamespacePrefix string `json:"NamespacePrefix,omitempty"` + + // network scope + NetworkScope string `json:"NetworkScope,omitempty"` + + // owner ID + OwnerID string `json:"OwnerID,omitempty"` + + // parent ID + ParentID string `json:"ParentID,omitempty"` + + // publishstatus + Publishstatus string `json:"Publishstatus,omitempty"` + + // quote ID + QuoteID string `json:"QuoteID,omitempty"` + + // related record ID + RelatedRecordID string `json:"RelatedRecordID,omitempty"` + + // share type + ShareType string `json:"ShareType,omitempty"` + + // sharing option + SharingOption string `json:"SharingOption,omitempty"` + + // sharing privacy + SharingPrivacy string `json:"SharingPrivacy,omitempty"` + + // title + Title string `json:"Title,omitempty"` + + // type + Type string `json:"Type,omitempty"` + + // URL + URL string `json:"URL,omitempty"` + + // user ID + UserID string `json:"UserID,omitempty"` + + // visibility + Visibility string `json:"Visibility,omitempty"` +} + +// Validate validates this document +func (m *Document) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Document) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Document) UnmarshalBinary(b []byte) error { + var res Document + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/workflow/v0.0.1/workflow_models/email_message.go b/api/workflow/v0.0.1/workflow_models/email_message.go new file mode 100644 index 0000000..c2190ae --- /dev/null +++ b/api/workflow/v0.0.1/workflow_models/email_message.go @@ -0,0 +1,170 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package workflow_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// EmailMessage email message +// +// swagger:model EmailMessage +type EmailMessage struct { + + // activity ID + ActivityID string `json:"ActivityID,omitempty"` + + // b c c address + BCCAddress string `json:"BCCAddress,omitempty"` + + // c c address + CCAddress string `json:"CCAddress,omitempty"` + + // created by ID + CreatedByID string `json:"CreatedByID,omitempty"` + + // created date + CreatedDate string `json:"CreatedDate,omitempty"` + + // email message ID + EmailMessageID string `json:"EmailMessageID,omitempty"` + + // from address + FromAddress string `json:"FromAddress,omitempty"` + + // from name + FromName string `json:"FromName,omitempty"` + + // HTML + // Format: byte + HTML strfmt.Base64 `json:"HTML,omitempty"` + + // has attachment + HasAttachment bool `json:"HasAttachment,omitempty"` + + // headers + Headers *Headers `json:"Headers,omitempty"` + + // ID + ID string `json:"ID,omitempty"` + + // incoming + Incoming bool `json:"Incoming,omitempty"` + + // is client managed + IsClientManaged bool `json:"IsClientManaged,omitempty"` + + // is externally managed + IsExternallyManaged bool `json:"IsExternallyManaged,omitempty"` + + // last modified by ID + LastModifiedByID string `json:"LastModifiedByID,omitempty"` + + // last modified date + LastModifiedDate string `json:"LastModifiedDate,omitempty"` + + // message date + MessageDate string `json:"MessageDate,omitempty"` + + // message identifier + MessageIdentifier string `json:"MessageIdentifier,omitempty"` + + // parent ID + ParentID string `json:"ParentID,omitempty"` + + // related to ID + RelatedToID string `json:"RelatedToID,omitempty"` + + // relation address + RelationAddress string `json:"RelationAddress,omitempty"` + + // relation ID + RelationID string `json:"RelationID,omitempty"` + + // relation object type + RelationObjectType string `json:"RelationObjectType,omitempty"` + + // relation type + RelationType string `json:"RelationType,omitempty"` + + // reply to email message ID + ReplyToEmailMessageID string `json:"ReplyToEmailMessageID,omitempty"` + + // status + Status string `json:"Status,omitempty"` + + // subject + Subject string `json:"Subject,omitempty"` + + // text + // Format: byte + Text strfmt.Base64 `json:"Text,omitempty"` + + // thread identifier + ThreadIdentifier string `json:"ThreadIdentifier,omitempty"` + + // to address + ToAddress string `json:"ToAddress,omitempty"` + + // validated from address + ValidatedFromAddress string `json:"ValidatedFromAddress,omitempty"` +} + +// Validate validates this email message +func (m *EmailMessage) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateHeaders(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *EmailMessage) validateHeaders(formats strfmt.Registry) error { + + if swag.IsZero(m.Headers) { // not required + return nil + } + + if m.Headers != nil { + if err := m.Headers.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Headers") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *EmailMessage) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *EmailMessage) UnmarshalBinary(b []byte) error { + var res EmailMessage + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/workflow/v0.0.1/workflow_models/email_message_request.go b/api/workflow/v0.0.1/workflow_models/email_message_request.go new file mode 100644 index 0000000..928263f --- /dev/null +++ b/api/workflow/v0.0.1/workflow_models/email_message_request.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package workflow_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// EmailMessageRequest An array Taxnexus Send Email Message objects +// +// swagger:model EmailMessageRequest +type EmailMessageRequest struct { + + // data + Data []*EmailMessage `json:"data"` + + // meta + Meta *RequestMeta `json:"meta,omitempty"` +} + +// Validate validates this email message request +func (m *EmailMessageRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *EmailMessageRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *EmailMessageRequest) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *EmailMessageRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *EmailMessageRequest) UnmarshalBinary(b []byte) error { + var res EmailMessageRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/workflow/v0.0.1/workflow_models/email_messages_response.go b/api/workflow/v0.0.1/workflow_models/email_messages_response.go new file mode 100644 index 0000000..65353ec --- /dev/null +++ b/api/workflow/v0.0.1/workflow_models/email_messages_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package workflow_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// EmailMessagesResponse An array Taxnexus user objects +// +// swagger:model EmailMessagesResponse +type EmailMessagesResponse struct { + + // data + Data []*EmailMessage `json:"data"` + + // meta + Meta *ResponseMeta `json:"meta,omitempty"` +} + +// Validate validates this email messages response +func (m *EmailMessagesResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *EmailMessagesResponse) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *EmailMessagesResponse) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *EmailMessagesResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *EmailMessagesResponse) UnmarshalBinary(b []byte) error { + var res EmailMessagesResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/workflow/v0.0.1/workflow_models/error.go b/api/workflow/v0.0.1/workflow_models/error.go new file mode 100644 index 0000000..cf687fe --- /dev/null +++ b/api/workflow/v0.0.1/workflow_models/error.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package workflow_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Error error +// +// swagger:model Error +type Error struct { + + // code + Code int32 `json:"Code,omitempty"` + + // fields + Fields string `json:"Fields,omitempty"` + + // message + Message string `json:"Message,omitempty"` +} + +// Validate validates this error +func (m *Error) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Error) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Error) UnmarshalBinary(b []byte) error { + var res Error + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/workflow/v0.0.1/workflow_models/headers.go b/api/workflow/v0.0.1/workflow_models/headers.go new file mode 100644 index 0000000..d3e14a2 --- /dev/null +++ b/api/workflow/v0.0.1/workflow_models/headers.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package workflow_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Headers headers +// +// swagger:model Headers +type Headers struct { + + // key + Key string `json:"Key,omitempty"` + + // values + Values [][]string `json:"Values"` +} + +// Validate validates this headers +func (m *Headers) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Headers) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Headers) UnmarshalBinary(b []byte) error { + var res Headers + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/workflow/v0.0.1/workflow_models/outgoing_email_message.go b/api/workflow/v0.0.1/workflow_models/outgoing_email_message.go new file mode 100644 index 0000000..d8f024b --- /dev/null +++ b/api/workflow/v0.0.1/workflow_models/outgoing_email_message.go @@ -0,0 +1,120 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package workflow_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// OutgoingEmailMessage A new email message to be sent +// +// swagger:model OutgoingEmailMessage +type OutgoingEmailMessage struct { + + // b c c address + BCCAddress string `json:"BCCAddress,omitempty"` + + // c c address + CCAddress string `json:"CCAddress,omitempty"` + + // email message ID + EmailMessageID string `json:"EmailMessageID,omitempty"` + + // email template ID + EmailTemplateID string `json:"EmailTemplateID,omitempty"` + + // external ID + ExternalID string `json:"ExternalID,omitempty"` + + // from contact ID + FromContactID string `json:"FromContactID,omitempty"` + + // from name + FromName string `json:"FromName,omitempty"` + + // HTML + HTML string `json:"HTML,omitempty"` + + // headers + Headers *Headers `json:"Headers,omitempty"` + + // ID + ID string `json:"ID,omitempty"` + + // subject + Subject string `json:"Subject,omitempty"` + + // text + Text string `json:"Text,omitempty"` + + // to address + ToAddress string `json:"ToAddress,omitempty"` + + // to name + ToName string `json:"ToName,omitempty"` + + // validated from address + ValidatedFromAddress string `json:"ValidatedFromAddress,omitempty"` + + // who ID + WhoID string `json:"WhoID,omitempty"` +} + +// Validate validates this outgoing email message +func (m *OutgoingEmailMessage) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateHeaders(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *OutgoingEmailMessage) validateHeaders(formats strfmt.Registry) error { + + if swag.IsZero(m.Headers) { // not required + return nil + } + + if m.Headers != nil { + if err := m.Headers.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Headers") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *OutgoingEmailMessage) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *OutgoingEmailMessage) UnmarshalBinary(b []byte) error { + var res OutgoingEmailMessage + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/workflow/v0.0.1/workflow_models/outgoing_email_message_request.go b/api/workflow/v0.0.1/workflow_models/outgoing_email_message_request.go new file mode 100644 index 0000000..3c78f34 --- /dev/null +++ b/api/workflow/v0.0.1/workflow_models/outgoing_email_message_request.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package workflow_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// OutgoingEmailMessageRequest An array Taxnexus New Email Message objects +// +// swagger:model OutgoingEmailMessageRequest +type OutgoingEmailMessageRequest struct { + + // data + Data []*OutgoingEmailMessage `json:"data"` + + // meta + Meta *RequestMeta `json:"meta,omitempty"` +} + +// Validate validates this outgoing email message request +func (m *OutgoingEmailMessageRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *OutgoingEmailMessageRequest) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *OutgoingEmailMessageRequest) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *OutgoingEmailMessageRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *OutgoingEmailMessageRequest) UnmarshalBinary(b []byte) error { + var res OutgoingEmailMessageRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/workflow/v0.0.1/workflow_models/request_meta.go b/api/workflow/v0.0.1/workflow_models/request_meta.go new file mode 100644 index 0000000..478b9e2 --- /dev/null +++ b/api/workflow/v0.0.1/workflow_models/request_meta.go @@ -0,0 +1,68 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package workflow_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// RequestMeta request meta +// +// swagger:model RequestMeta +type RequestMeta struct { + + // Taxnexus Account Number of the Reseller or OEM + // Required: true + TaxnexusAccount *string `json:"TaxnexusAccount"` +} + +// Validate validates this request meta +func (m *RequestMeta) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTaxnexusAccount(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RequestMeta) validateTaxnexusAccount(formats strfmt.Registry) error { + + if err := validate.Required("TaxnexusAccount", "body", m.TaxnexusAccount); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *RequestMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RequestMeta) UnmarshalBinary(b []byte) error { + var res RequestMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/workflow/v0.0.1/workflow_models/response_meta.go b/api/workflow/v0.0.1/workflow_models/response_meta.go new file mode 100644 index 0000000..49605bd --- /dev/null +++ b/api/workflow/v0.0.1/workflow_models/response_meta.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +// All Code Copyright(c) 2018-2020 by Taxnexus, Inc. +// All rights reserved worldwide. +// Proprietary product; unlicensed use is not allowed + +package workflow_models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ResponseMeta response meta +// +// swagger:model ResponseMeta +type ResponseMeta struct { + + // Microservice Contact Info + Contact string `json:"Contact,omitempty"` + + // Copyright Info + Copyright string `json:"Copyright,omitempty"` + + // License Information and Restrictions + License string `json:"License,omitempty"` + + // Operation ID + OperationID string `json:"OperationID,omitempty"` + + // Request IP Address + RequestIP string `json:"RequestIP,omitempty"` + + // Request Type + RequestType string `json:"RequestType,omitempty"` + + // Request URL + RequestURL string `json:"RequestURL,omitempty"` + + // Data Server Info + ServerInfo string `json:"ServerInfo,omitempty"` + + // Data Server Response Time (ms) + ServerResponseTime string `json:"ServerResponseTime,omitempty"` + + // Backend Server Timestamp + ServerTimestamp string `json:"ServerTimestamp,omitempty"` + + // Taxnexus Account Number used for recording transactions + TaxnexusAccount string `json:"TaxnexusAccount,omitempty"` +} + +// Validate validates this response meta +func (m *ResponseMeta) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ResponseMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ResponseMeta) UnmarshalBinary(b []byte) error { + var res ResponseMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..a98f2ad --- /dev/null +++ b/go.mod @@ -0,0 +1,11 @@ +module github.com/taxnexus/go/lib + +go 1.15 + +require ( + github.com/go-openapi/errors v0.19.9 + github.com/go-openapi/runtime v0.19.24 + github.com/go-openapi/strfmt v0.19.11 + github.com/go-openapi/swag v0.19.12 + github.com/go-openapi/validate v0.20.0 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..e5f392a --- /dev/null +++ b/go.sum @@ -0,0 +1,279 @@ +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= +github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= +github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef h1:46PFijGLmAjMPwCCCo7Jf0W6f9slllCkkv7vyc1yOSg= +github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= +github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= +github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.4/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= +github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgTAUNE9AEEMdlJQ= +github.com/go-openapi/analysis v0.19.16 h1:Ub9e++M8sDwtHD+S587TYi+6ANBG1NRYGZDihqk0SaY= +github.com/go-openapi/analysis v0.19.16/go.mod h1:GLInF007N83Ad3m8a/CbQ5TPzdnGT7workfHwuVjNVk= +github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.3/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.6/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.7/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.9 h1:9SnKdGhiPZHF3ttwFMiCBEb8jQ4IDdrK+5+a0oTygA4= +github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/jsonreference v0.19.5 h1:1WJP/wi4OjB4iV8KVbH73rQaoialJrqv8gitZLxGLtM= +github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= +github.com/go-openapi/loads v0.19.3/go.mod h1:YVfqhUCdahYwR3f3iiwQLhicVRvLlU/WO5WPaZvcvSI= +github.com/go-openapi/loads v0.19.5/go.mod h1:dswLCAdonkRufe/gSUC3gN8nTSaB9uaS2es0x5/IbjY= +github.com/go-openapi/loads v0.19.6/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= +github.com/go-openapi/loads v0.19.7/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= +github.com/go-openapi/loads v0.20.0 h1:Pymw1O8zDmWeNv4kVsHd0W3cvgdp8juRa4U/U/8D/Pk= +github.com/go-openapi/loads v0.20.0/go.mod h1:2LhKquiE513rN5xC6Aan6lYOSddlL8Mp20AW9kpviM4= +github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= +github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= +github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= +github.com/go-openapi/runtime v0.19.15/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo= +github.com/go-openapi/runtime v0.19.16/go.mod h1:5P9104EJgYcizotuXhEuUrzVc+j1RiSjahULvYmlv98= +github.com/go-openapi/runtime v0.19.24 h1:TqagMVlRAOTwllE/7hNKx6rQ10O6T8ZzeJdMjSTKaD4= +github.com/go-openapi/runtime v0.19.24/go.mod h1:Lm9YGCeecBnUUkFTxPC4s1+lwrkJ0pthx8YvyjCfkgk= +github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= +github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.15/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= +github.com/go-openapi/spec v0.20.0 h1:HGLc8AJ7ynOxwv0Lq4TsnwLsWMawHAYiJIFzbcML86I= +github.com/go-openapi/spec v0.20.0/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= +github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= +github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.4/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= +github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= +github.com/go-openapi/strfmt v0.19.11 h1:0+YvbNh05rmBkgztd6zHp4OCFn7Mtu30bn46NQo2ZRw= +github.com/go-openapi/strfmt v0.19.11/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= +github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-openapi/swag v0.19.12 h1:Bc0bnY2c3AoF7Gc+IMIAQQsD8fLHjHpc19wXvYuayQI= +github.com/go-openapi/swag v0.19.12/go.mod h1:eFdyEBkTdoAf/9RXBvj4cr1nH7GD8Kzo5HTt47gr72M= +github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= +github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= +github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7vS9k0lo6zwJo= +github.com/go-openapi/validate v0.19.10/go.mod h1:RKEZTUWDkxKQxN2jDT7ZnZi2bhZlbNMAuKvKB+IaGx8= +github.com/go-openapi/validate v0.19.12/go.mod h1:Rzou8hA/CBw8donlS6WNEUQupNvUZ0waH08tGe6kAQ4= +github.com/go-openapi/validate v0.19.15/go.mod h1:tbn/fdOwYHgrhPBzidZfJC2MIVvs9GA7monOmWBbeCI= +github.com/go-openapi/validate v0.20.0 h1:pzutNCCBZGZlE+u8HD3JZyWdc/TVbtVwlWUp8/vgUKk= +github.com/go-openapi/validate v0.20.0/go.mod h1:b60iJT+xNNLfaQJUqLI7946tYiFEOuE9E4k54HpKcJ0= +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= +github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= +github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= +github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= +github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= +github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= +github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= +github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= +github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= +github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= +github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= +github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= +github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= +github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= +github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= +github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= +github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= +github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.0 h1:7ks8ZkOP5/ujthUsT07rNv+nkLXCQWKNHuwzOAesEks= +github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= +github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/taxnexus/rules v0.0.0-20210108042836-bb5e1d6dff51 h1:jzTFURzbK1T4wBNLFd9rTC4na/AV3SY3LraMGXWD3r0= +github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= +github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= +go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.3.0/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +go.mongodb.org/mongo-driver v1.3.4/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +go.mongodb.org/mongo-driver v1.4.3/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= +go.mongodb.org/mongo-driver v1.4.4 h1:bsPHfODES+/yx2PCWzUYMH8xj6PVniPI8DQrsJuSXSs= +go.mongodb.org/mongo-driver v1.4.4/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= +golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb h1:eBmm0M9fYhWpKZLjQUUKka/LtIxf46G4fxeEz5KJr9U= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=