From f50154271b0479c65f5c1f909ecdd6b3f5f405fb Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 28 Feb 2024 14:10:31 +0000 Subject: [PATCH] Generated v8.1.0 --- CHANGELOG.md | 328 +++++++++------- README.md | 20 +- ...nse.md => AutomationTokenErrorResponse.md} | 2 +- docs/AutomationTokensApi.md | 4 +- docs/Backend.md | 2 +- docs/BackendApi.md | 8 +- docs/BackendResponse.md | 2 +- docs/BillingInvoicesApi.md | 96 +++++ docs/Director.md | 2 +- docs/DirectorApi.md | 4 +- docs/DirectorResponse.md | 2 +- docs/DomainInspectorHistoricalApi.md | 8 +- docs/DomainInspectorRealtimeEntry.md | 2 +- docs/Error.md | 13 + docs/ErrorResponseData.md | 11 + docs/Invoice.md | 18 + docs/InvoiceResponse.md | 18 + docs/Invoicelineitems.md | 18 + docs/KvStoreApi.md | 2 +- docs/ListInvoicesResponse.md | 11 + docs/Listinvoices.md | 11 + docs/LoggingScalyrAdditional.md | 2 +- docs/LoggingScalyrApi.md | 8 +- docs/LoggingScalyrResponse.md | 2 +- docs/Metadata.md | 13 + docs/OriginInspectorHistoricalApi.md | 8 +- docs/OriginInspectorRealtimeEntry.md | 2 +- docs/PoolAdditional.md | 2 +- docs/PoolApi.md | 8 +- docs/PoolResponse.md | 2 +- docs/PoolResponsePost.md | 2 +- docs/Pop.md | 4 +- docs/PublishApi.md | 2 +- docs/RealtimeEntry.md | 2 +- docs/Results.md | 2 + docs/SecretStoreApi.md | 6 +- docs/SecretStoreItemApi.md | 4 +- docs/ServiceDetail.md | 2 +- docs/ServiceListResponse.md | 4 +- docs/ServiceListResponseAllOf.md | 4 +- docs/ServiceResponse.md | 2 +- docs/ServiceResponseAllOf.md | 2 +- docs/TlsConfigurationResponseAttributes.md | 2 +- ...TlsConfigurationResponseAttributesAllOf.md | 2 +- docs/TlsCsr.md | 10 + docs/TlsCsrData.md | 12 + docs/TlsCsrDataAttributes.md | 20 + docs/TlsCsrErrorResponse.md | 10 + docs/TlsCsrResponse.md | 10 + docs/TlsCsrResponseAttributes.md | 10 + docs/TlsCsrResponseData.md | 13 + docs/TlsCsrsApi.md | 52 +++ docs/TlsSubscriptionResponseAttributes.md | 1 + .../TlsSubscriptionResponseAttributesAllOf.md | 1 + docs/TokensApi.md | 2 +- docs/TypeTlsCsr.md | 9 + docs/VclApi.md | 2 +- docs/WafActiveRulesApi.md | 2 +- lib/fastly.rb | 20 +- lib/fastly/api/automation_tokens_api.rb | 6 +- lib/fastly/api/backend_api.rb | 8 +- lib/fastly/api/billing_invoices_api.rb | 151 ++++++++ lib/fastly/api/director_api.rb | 4 +- .../api/domain_inspector_historical_api.rb | 8 +- lib/fastly/api/kv_store_api.rb | 4 +- lib/fastly/api/logging_scalyr_api.rb | 8 +- .../api/origin_inspector_historical_api.rb | 8 +- lib/fastly/api/pool_api.rb | 8 +- lib/fastly/api/publish_api.rb | 4 +- lib/fastly/api/secret_store_api.rb | 7 +- lib/fastly/api/secret_store_item_api.rb | 4 +- lib/fastly/api/tls_csrs_api.rb | 83 ++++ lib/fastly/api/tokens_api.rb | 4 +- lib/fastly/api/vcl_api.rb | 4 +- lib/fastly/api/waf_active_rules_api.rb | 4 +- lib/fastly/configuration.rb | 18 + ....rb => automation_token_error_response.rb} | 6 +- lib/fastly/models/backend.rb | 2 +- lib/fastly/models/backend_response.rb | 2 +- lib/fastly/models/director.rb | 2 +- lib/fastly/models/director_response.rb | 2 +- .../models/domain_inspector_realtime_entry.rb | 2 +- lib/fastly/models/error.rb | 243 ++++++++++++ lib/fastly/models/error_response_data.rb | 225 +++++++++++ lib/fastly/models/event_attributes.rb | 4 +- lib/fastly/models/invoice.rb | 298 +++++++++++++++ lib/fastly/models/invoice_response.rb | 305 +++++++++++++++ lib/fastly/models/invoicelineitems.rb | 297 +++++++++++++++ lib/fastly/models/list_invoices_response.rb | 234 ++++++++++++ lib/fastly/models/listinvoices.rb | 227 +++++++++++ .../models/logging_scalyr_additional.rb | 2 +- lib/fastly/models/logging_scalyr_response.rb | 2 +- lib/fastly/models/metadata.rb | 250 ++++++++++++ .../models/origin_inspector_realtime_entry.rb | 2 +- lib/fastly/models/pool_additional.rb | 2 +- lib/fastly/models/pool_response.rb | 2 +- lib/fastly/models/pool_response_post.rb | 2 +- lib/fastly/models/pop.rb | 4 +- lib/fastly/models/realtime_entry.rb | 2 +- .../models/relationship_tls_certificate.rb | 2 +- .../models/relationship_tls_configuration.rb | 2 +- lib/fastly/models/results.rb | 22 +- lib/fastly/models/service_detail.rb | 2 +- lib/fastly/models/service_list_response.rb | 4 +- .../models/service_list_response_all_of.rb | 4 +- lib/fastly/models/service_response.rb | 2 +- lib/fastly/models/service_response_all_of.rb | 2 +- .../tls_configuration_response_attributes.rb | 2 +- ...onfiguration_response_attributes_all_of.rb | 2 +- lib/fastly/models/tls_csr.rb | 216 +++++++++++ lib/fastly/models/tls_csr_data.rb | 236 ++++++++++++ lib/fastly/models/tls_csr_data_attributes.rb | 358 ++++++++++++++++++ lib/fastly/models/tls_csr_error_response.rb | 218 +++++++++++ lib/fastly/models/tls_csr_response.rb | 216 +++++++++++ .../models/tls_csr_response_attributes.rb | 217 +++++++++++ lib/fastly/models/tls_csr_response_data.rb | 245 ++++++++++++ .../tls_subscription_data_attributes.rb | 4 +- .../tls_subscription_response_attributes.rb | 18 +- ...subscription_response_attributes_all_of.rb | 18 +- lib/fastly/models/type_tls_csr.rb | 34 ++ lib/fastly/version.rb | 2 +- sig.json | 2 +- 122 files changed, 4844 insertions(+), 277 deletions(-) rename docs/{ErrorResponse.md => AutomationTokenErrorResponse.md} (90%) create mode 100644 docs/BillingInvoicesApi.md create mode 100644 docs/Error.md create mode 100644 docs/ErrorResponseData.md create mode 100644 docs/Invoice.md create mode 100644 docs/InvoiceResponse.md create mode 100644 docs/Invoicelineitems.md create mode 100644 docs/ListInvoicesResponse.md create mode 100644 docs/Listinvoices.md create mode 100644 docs/Metadata.md create mode 100644 docs/TlsCsr.md create mode 100644 docs/TlsCsrData.md create mode 100644 docs/TlsCsrDataAttributes.md create mode 100644 docs/TlsCsrErrorResponse.md create mode 100644 docs/TlsCsrResponse.md create mode 100644 docs/TlsCsrResponseAttributes.md create mode 100644 docs/TlsCsrResponseData.md create mode 100644 docs/TlsCsrsApi.md create mode 100644 docs/TypeTlsCsr.md create mode 100644 lib/fastly/api/billing_invoices_api.rb create mode 100644 lib/fastly/api/tls_csrs_api.rb rename lib/fastly/models/{error_response.rb => automation_token_error_response.rb} (96%) create mode 100644 lib/fastly/models/error.rb create mode 100644 lib/fastly/models/error_response_data.rb create mode 100644 lib/fastly/models/invoice.rb create mode 100644 lib/fastly/models/invoice_response.rb create mode 100644 lib/fastly/models/invoicelineitems.rb create mode 100644 lib/fastly/models/list_invoices_response.rb create mode 100644 lib/fastly/models/listinvoices.rb create mode 100644 lib/fastly/models/metadata.rb create mode 100644 lib/fastly/models/tls_csr.rb create mode 100644 lib/fastly/models/tls_csr_data.rb create mode 100644 lib/fastly/models/tls_csr_data_attributes.rb create mode 100644 lib/fastly/models/tls_csr_error_response.rb create mode 100644 lib/fastly/models/tls_csr_response.rb create mode 100644 lib/fastly/models/tls_csr_response_attributes.rb create mode 100644 lib/fastly/models/tls_csr_response_data.rb create mode 100644 lib/fastly/models/type_tls_csr.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index 5cc4ba9c..034298c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Changelog +## [v8.1.0](https://github.com/fastly/fastly-ruby/releases/tag/release/v8.1.0) (2024-02-28) + +**Enhancements:** + +- feat(billing): add 'get invoice by invoice ID' endpoint. +- feat(billing): add 'list invoices' endpoint. +- feat(image_opto): add 'shield' and 'transform' methods and fields. +- feat(secret_store): add 'name' filter. +- feat(tls): add 'create CSR' endpoint. +- feat(tls_subscription): add 'active order' methods and fields. + +**Documentation:** + +- doc(backend) fix openssl link. +- doc(director,domain_inspector,pool,realtime) fix POPs link. +- doc(service) fix service version link. +- doc(tls) fix activation link. + ## [v8.0.1](https://github.com/fastly/fastly-ruby/releases/tag/release/v8.0.1) (2024-02-19) **Bug fixes:** @@ -280,10 +298,10 @@ Substantial changes were made to the underlying OpenAPI specification that produ **Breaking:** -* New interface from code-generated API client [#183](https://github.com/fastly/fastly-ruby/pull/183) - * [Blog post: Better Fastly API clients with OpenAPI Generator](https://dev.to/fastly/better-fastly-api-clients-with-openapi-generator-3lno) - * [Documentation](https://github.com/fastly/fastly-ruby#documentation-for-api-endpoints) - * [Unsupported API endpoints](https://github.com/fastly/fastly-ruby#issues) +- New interface from code-generated API client [#183](https://github.com/fastly/fastly-ruby/pull/183) + - [Blog post: Better Fastly API clients with OpenAPI Generator](https://dev.to/fastly/better-fastly-api-clients-with-openapi-generator-3lno) + - [Documentation](https://github.com/fastly/fastly-ruby#documentation-for-api-endpoints) + - [Unsupported API endpoints](https://github.com/fastly/fastly-ruby#issues) ## [v3.0.2](https://github.com/fastly/fastly-ruby/tree/v3.0.2) (2021-06-30) @@ -291,7 +309,7 @@ Substantial changes were made to the underlying OpenAPI specification that produ **Merged pull requests:** -- Fix SumoLogic Logging [\#180](https://github.com/fastly/fastly-ruby/pull/180) ([integralist](https://github.com/integralist)) +- Fix SumoLogic Logging [#180](https://github.com/fastly/fastly-ruby/pull/180) ([integralist](https://github.com/integralist)) ## [v3.0.1](https://github.com/fastly/fastly-ruby/tree/v3.0.1) (2021-02-03) @@ -299,7 +317,7 @@ Substantial changes were made to the underlying OpenAPI specification that produ **Merged pull requests:** -- Remove deprecation warning [\#174](https://github.com/fastly/fastly-ruby/pull/174) ([conniechu929](https://github.com/conniechu929)) +- Remove deprecation warning [#174](https://github.com/fastly/fastly-ruby/pull/174) ([conniechu929](https://github.com/conniechu929)) ## [v3.0.0](https://github.com/fastly/fastly-ruby/tree/v3.0.0) (2021-02-03) @@ -307,7 +325,7 @@ Substantial changes were made to the underlying OpenAPI specification that produ **Merged pull requests:** -- Removes session authentication [\#170](https://github.com/fastly/fastly-ruby/pull/170) ([conniechu929](https://github.com/conniechu929)) +- Removes session authentication [#170](https://github.com/fastly/fastly-ruby/pull/170) ([conniechu929](https://github.com/conniechu929)) ## [v2.5.0](https://github.com/fastly/fastly-ruby/tree/v2.5.0) (2020-01-16) @@ -315,421 +333,471 @@ Substantial changes were made to the underlying OpenAPI specification that produ **Merged pull requests:** -- Add tokens.rb [\#150](https://github.com/fastly/fastly-ruby/pull/150) ([malachy-mcconnell](https://github.com/malachy-mcconnell)) +- Add tokens.rb [#150](https://github.com/fastly/fastly-ruby/pull/150) ([malachy-mcconnell](https://github.com/malachy-mcconnell)) ## [v2.4.0](https://github.com/fastly/fastly-ruby/tree/v2.4.0) (2019-07-29) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v2.3.1...v2.4.0) **Merged pull requests:** -- \[Backend\] Add override\_host attribute for Backend [\#146](https://github.com/fastly/fastly-ruby/pull/146) ([werkshy](https://github.com/werkshy)) +- \[Backend\] Add override_host attribute for Backend [#146](https://github.com/fastly/fastly-ruby/pull/146) ([werkshy](https://github.com/werkshy)) ## [v2.3.1](https://github.com/fastly/fastly-ruby/tree/v2.3.1) (2019-07-25) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v2.3.0...v2.3.1) **Merged pull requests:** -- Correct stats API path [\#147](https://github.com/fastly/fastly-ruby/pull/147) ([thommahoney](https://github.com/thommahoney)) +- Correct stats API path [#147](https://github.com/fastly/fastly-ruby/pull/147) ([thommahoney](https://github.com/thommahoney)) ## [v2.3.0](https://github.com/fastly/fastly-ruby/tree/v2.3.0) (2019-04-26) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v2.2.0...v2.3.0) **Closed issues:** -- Ruby 2.5.0, fastly-1.15.0: Purge Errors [\#130](https://github.com/fastly/fastly-ruby/issues/130) +- Ruby 2.5.0, fastly-1.15.0: Purge Errors [#130](https://github.com/fastly/fastly-ruby/issues/130) **Merged pull requests:** -- make concurrent-ruby optional [\#145](https://github.com/fastly/fastly-ruby/pull/145) ([thommahoney](https://github.com/thommahoney)) -- Use concurrent-ruby to handle thread safety for http client. [\#144](https://github.com/fastly/fastly-ruby/pull/144) ([demersus](https://github.com/demersus)) -- Fix bug auth [\#143](https://github.com/fastly/fastly-ruby/pull/143) ([ichiee](https://github.com/ichiee)) -- update ruby versions to latest supported [\#142](https://github.com/fastly/fastly-ruby/pull/142) ([thommahoney](https://github.com/thommahoney)) +- make concurrent-ruby optional [#145](https://github.com/fastly/fastly-ruby/pull/145) ([thommahoney](https://github.com/thommahoney)) +- Use concurrent-ruby to handle thread safety for http client. [#144](https://github.com/fastly/fastly-ruby/pull/144) ([demersus](https://github.com/demersus)) +- Fix bug auth [#143](https://github.com/fastly/fastly-ruby/pull/143) ([ichiee](https://github.com/ichiee)) +- update ruby versions to latest supported [#142](https://github.com/fastly/fastly-ruby/pull/142) ([thommahoney](https://github.com/thommahoney)) ## [v2.2.0](https://github.com/fastly/fastly-ruby/tree/v2.2.0) (2018-12-11) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v2.1.0...v2.2.0) **Closed issues:** -- purging https url doesn't work [\#100](https://github.com/fastly/fastly-ruby/issues/100) +- purging https url doesn't work [#100](https://github.com/fastly/fastly-ruby/issues/100) **Merged pull requests:** -- ✨ Add BigQuery logging \[APPENG-2076\] [\#138](https://github.com/fastly/fastly-ruby/pull/138) ([jamesarosen](https://github.com/jamesarosen)) -- Update Fastly docs url [\#136](https://github.com/fastly/fastly-ruby/pull/136) ([crazyshot](https://github.com/crazyshot)) -- 🔖 v2.1.0 [\#135](https://github.com/fastly/fastly-ruby/pull/135) ([jamesarosen](https://github.com/jamesarosen)) +- ✨ Add BigQuery logging \[APPENG-2076\] [#138](https://github.com/fastly/fastly-ruby/pull/138) ([jamesarosen](https://github.com/jamesarosen)) +- Update Fastly docs url [#136](https://github.com/fastly/fastly-ruby/pull/136) ([crazyshot](https://github.com/crazyshot)) +- 🔖 v2.1.0 [#135](https://github.com/fastly/fastly-ruby/pull/135) ([jamesarosen](https://github.com/jamesarosen)) ## [v2.1.0](https://github.com/fastly/fastly-ruby/tree/v2.1.0) (2018-06-18) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v2.0.0...v2.1.0) **Merged pull requests:** -- 👷➕🐛✅ fix tests in CI [\#134](https://github.com/fastly/fastly-ruby/pull/134) ([jamesarosen](https://github.com/jamesarosen)) -- ✨ add more user relationships to Customer [\#133](https://github.com/fastly/fastly-ruby/pull/133) ([jamesarosen](https://github.com/jamesarosen)) +- 👷➕🐛✅ fix tests in CI [#134](https://github.com/fastly/fastly-ruby/pull/134) ([jamesarosen](https://github.com/jamesarosen)) +- ✨ add more user relationships to Customer [#133](https://github.com/fastly/fastly-ruby/pull/133) ([jamesarosen](https://github.com/jamesarosen)) ## [v2.0.0](https://github.com/fastly/fastly-ruby/tree/v2.0.0) (2018-05-17) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v1.15.0...v2.0.0) **Merged pull requests:** -- Update Changelog and version for 2.0.0 [\#129](https://github.com/fastly/fastly-ruby/pull/129) ([leklund](https://github.com/leklund)) -- Update version and CHANGELOG for Release v1.15.0 [\#128](https://github.com/fastly/fastly-ruby/pull/128) ([leklund](https://github.com/leklund)) -- Update fastly/invoice for v2 invoice endpoints [\#126](https://github.com/fastly/fastly-ruby/pull/126) ([leklund](https://github.com/leklund)) +- Update Changelog and version for 2.0.0 [#129](https://github.com/fastly/fastly-ruby/pull/129) ([leklund](https://github.com/leklund)) +- Update version and CHANGELOG for Release v1.15.0 [#128](https://github.com/fastly/fastly-ruby/pull/128) ([leklund](https://github.com/leklund)) +- Update fastly/invoice for v2 invoice endpoints [#126](https://github.com/fastly/fastly-ruby/pull/126) ([leklund](https://github.com/leklund)) ## [v1.15.0](https://github.com/fastly/fastly-ruby/tree/v1.15.0) (2018-04-04) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v1.14.0...v1.15.0) **Merged pull requests:** -- Feature - add support for /stats/usage\_by\_month [\#124](https://github.com/fastly/fastly-ruby/pull/124) ([jrbeilke](https://github.com/jrbeilke)) -- add changelog for v1.14.0 [\#123](https://github.com/fastly/fastly-ruby/pull/123) ([thommahoney](https://github.com/thommahoney)) +- Feature - add support for /stats/usage_by_month [#124](https://github.com/fastly/fastly-ruby/pull/124) ([jrbeilke](https://github.com/jrbeilke)) +- add changelog for v1.14.0 [#123](https://github.com/fastly/fastly-ruby/pull/123) ([thommahoney](https://github.com/thommahoney)) ## [v1.14.0](https://github.com/fastly/fastly-ruby/tree/v1.14.0) (2018-03-23) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v1.13.2...v1.14.0) **Merged pull requests:** -- bump to v1.14.0 [\#122](https://github.com/fastly/fastly-ruby/pull/122) ([thommahoney](https://github.com/thommahoney)) -- Placement in Syslog [\#121](https://github.com/fastly/fastly-ruby/pull/121) ([RexBelli](https://github.com/RexBelli)) +- bump to v1.14.0 [#122](https://github.com/fastly/fastly-ruby/pull/122) ([thommahoney](https://github.com/thommahoney)) +- Placement in Syslog [#121](https://github.com/fastly/fastly-ruby/pull/121) ([RexBelli](https://github.com/RexBelli)) ## [v1.13.2](https://github.com/fastly/fastly-ruby/tree/v1.13.2) (2017-12-18) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v1.13.1...v1.13.2) **Merged pull requests:** -- Fix syslog response\_condition attribute [\#117](https://github.com/fastly/fastly-ruby/pull/117) ([anotherJay](https://github.com/anotherJay)) +- Fix syslog response_condition attribute [#117](https://github.com/fastly/fastly-ruby/pull/117) ([anotherJay](https://github.com/anotherJay)) ## [v1.13.1](https://github.com/fastly/fastly-ruby/tree/v1.13.1) (2017-08-08) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v1.13.0...v1.13.1) **Merged pull requests:** -- automatically load the sumologic\_logging class [\#115](https://github.com/fastly/fastly-ruby/pull/115) ([thommahoney](https://github.com/thommahoney)) +- automatically load the sumologic_logging class [#115](https://github.com/fastly/fastly-ruby/pull/115) ([thommahoney](https://github.com/thommahoney)) ## [v1.13.0](https://github.com/fastly/fastly-ruby/tree/v1.13.0) (2017-08-07) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v1.12.0...v1.13.0) **Merged pull requests:** -- add support for sumologic [\#114](https://github.com/fastly/fastly-ruby/pull/114) ([thommahoney](https://github.com/thommahoney)) +- add support for sumologic [#114](https://github.com/fastly/fastly-ruby/pull/114) ([thommahoney](https://github.com/thommahoney)) ## [v1.12.0](https://github.com/fastly/fastly-ruby/tree/v1.12.0) (2017-08-03) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v1.11.0...v1.12.0) **Merged pull requests:** -- add support for dynamic snippets [\#113](https://github.com/fastly/fastly-ruby/pull/113) ([thommahoney](https://github.com/thommahoney)) -- Added VCL snippets endpoint [\#112](https://github.com/fastly/fastly-ruby/pull/112) ([thomshutt](https://github.com/thomshutt)) +- add support for dynamic snippets [#113](https://github.com/fastly/fastly-ruby/pull/113) ([thommahoney](https://github.com/thommahoney)) +- Added VCL snippets endpoint [#112](https://github.com/fastly/fastly-ruby/pull/112) ([thomshutt](https://github.com/thomshutt)) ## [v1.11.0](https://github.com/fastly/fastly-ruby/tree/v1.11.0) (2017-06-12) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v1.10.0...v1.11.0) **Merged pull requests:** -- add GCS Logging object [\#111](https://github.com/fastly/fastly-ruby/pull/111) ([thommahoney](https://github.com/thommahoney)) +- add GCS Logging object [#111](https://github.com/fastly/fastly-ruby/pull/111) ([thommahoney](https://github.com/thommahoney)) ## [v1.10.0](https://github.com/fastly/fastly-ruby/tree/v1.10.0) (2017-03-17) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v1.9.0...v1.10.0) **Merged pull requests:** -- Support Papertrail logging endpoints [\#110](https://github.com/fastly/fastly-ruby/pull/110) ([werkshy](https://github.com/werkshy)) +- Support Papertrail logging endpoints [#110](https://github.com/fastly/fastly-ruby/pull/110) ([werkshy](https://github.com/werkshy)) ## [v1.9.0](https://github.com/fastly/fastly-ruby/tree/v1.9.0) (2017-02-03) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v1.8.0...v1.9.0) **Closed issues:** -- Missing tag for v1.8.0 [\#108](https://github.com/fastly/fastly-ruby/issues/108) +- Missing tag for v1.8.0 [#108](https://github.com/fastly/fastly-ruby/issues/108) **Merged pull requests:** -- Add `message\_type` support to logging resources [\#109](https://github.com/fastly/fastly-ruby/pull/109) ([schisamo](https://github.com/schisamo)) +- Add `message\_type` support to logging resources [#109](https://github.com/fastly/fastly-ruby/pull/109) ([schisamo](https://github.com/schisamo)) ## [v1.8.0](https://github.com/fastly/fastly-ruby/tree/v1.8.0) (2017-01-17) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v1.7.0...v1.8.0) **Merged pull requests:** -- Support for HTTP debug logs [\#107](https://github.com/fastly/fastly-ruby/pull/107) ([thommahoney](https://github.com/thommahoney)) -- use public\_suffix version 1.4.6 for ruby 1.9 [\#105](https://github.com/fastly/fastly-ruby/pull/105) ([thommahoney](https://github.com/thommahoney)) -- Enable HTTP proxy support from environment [\#104](https://github.com/fastly/fastly-ruby/pull/104) ([vr](https://github.com/vr)) +- Support for HTTP debug logs [#107](https://github.com/fastly/fastly-ruby/pull/107) ([thommahoney](https://github.com/thommahoney)) +- use public_suffix version 1.4.6 for ruby 1.9 [#105](https://github.com/fastly/fastly-ruby/pull/105) ([thommahoney](https://github.com/thommahoney)) +- Enable HTTP proxy support from environment [#104](https://github.com/fastly/fastly-ruby/pull/104) ([vr](https://github.com/vr)) ## [v1.7.0](https://github.com/fastly/fastly-ruby/tree/v1.7.0) (2016-10-24) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v1.6.1...v1.7.0) **Merged pull requests:** -- Add ACL and ACL Entry Support [\#103](https://github.com/fastly/fastly-ruby/pull/103) ([wrightp](https://github.com/wrightp)) -- add https support to purge function [\#99](https://github.com/fastly/fastly-ruby/pull/99) ([jgoulah](https://github.com/jgoulah)) +- Add ACL and ACL Entry Support [#103](https://github.com/fastly/fastly-ruby/pull/103) ([wrightp](https://github.com/wrightp)) +- add https support to purge function [#99](https://github.com/fastly/fastly-ruby/pull/99) ([jgoulah](https://github.com/jgoulah)) ## [v1.6.1](https://github.com/fastly/fastly-ruby/tree/v1.6.1) (2016-09-06) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v1.6.0...v1.6.1) **Merged pull requests:** -- fix: use Appraisal to fix dependency conflicts [\#97](https://github.com/fastly/fastly-ruby/pull/97) ([lanej](https://github.com/lanej)) -- Add `format\_version` to S3Logging and Syslog resources [\#96](https://github.com/fastly/fastly-ruby/pull/96) ([schisamo](https://github.com/schisamo)) +- fix: use Appraisal to fix dependency conflicts [#97](https://github.com/fastly/fastly-ruby/pull/97) ([lanej](https://github.com/lanej)) +- Add `format\_version` to S3Logging and Syslog resources [#96](https://github.com/fastly/fastly-ruby/pull/96) ([schisamo](https://github.com/schisamo)) ## [v1.6.0](https://github.com/fastly/fastly-ruby/tree/v1.6.0) (2016-07-14) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v1.5.0...v1.6.0) **Merged pull requests:** -- Always add api key to requests if provided [\#93](https://github.com/fastly/fastly-ruby/pull/93) ([blithe](https://github.com/blithe)) -- Fix header regex test [\#92](https://github.com/fastly/fastly-ruby/pull/92) ([blithe](https://github.com/blithe)) -- Remove Origin model [\#91](https://github.com/fastly/fastly-ruby/pull/91) ([blithe](https://github.com/blithe)) +- Always add api key to requests if provided [#93](https://github.com/fastly/fastly-ruby/pull/93) ([blithe](https://github.com/blithe)) +- Fix header regex test [#92](https://github.com/fastly/fastly-ruby/pull/92) ([blithe](https://github.com/blithe)) +- Remove Origin model [#91](https://github.com/fastly/fastly-ruby/pull/91) ([blithe](https://github.com/blithe)) ## [v1.5.0](https://github.com/fastly/fastly-ruby/tree/v1.5.0) (2016-07-08) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v1.4.2...v1.5.0) **Closed issues:** -- Support Edge Dictionaries [\#66](https://github.com/fastly/fastly-ruby/issues/66) -- version.locked? method returns incorrect value of true for unlocked version [\#47](https://github.com/fastly/fastly-ruby/issues/47) +- Support Edge Dictionaries [#66](https://github.com/fastly/fastly-ruby/issues/66) +- version.locked? method returns incorrect value of true for unlocked version [#47](https://github.com/fastly/fastly-ruby/issues/47) **Merged pull requests:** -- build for all recent ruby patch-levels [\#90](https://github.com/fastly/fastly-ruby/pull/90) ([thommahoney](https://github.com/thommahoney)) -- add Fastly::Dictionary\#item [\#89](https://github.com/fastly/fastly-ruby/pull/89) ([lanej](https://github.com/lanej)) -- fix initialize [\#88](https://github.com/fastly/fastly-ruby/pull/88) ([lanej](https://github.com/lanej)) -- Raised ArgumentError if api\_key or user/pass are not passed in. [\#87](https://github.com/fastly/fastly-ruby/pull/87) ([andriantoniades](https://github.com/andriantoniades)) -- Add support for dictionary items [\#86](https://github.com/fastly/fastly-ruby/pull/86) ([icco](https://github.com/icco)) -- Reintroduced :locked so the version.locked? check works [\#83](https://github.com/fastly/fastly-ruby/pull/83) ([eddieroger](https://github.com/eddieroger)) +- build for all recent ruby patch-levels [#90](https://github.com/fastly/fastly-ruby/pull/90) ([thommahoney](https://github.com/thommahoney)) +- add Fastly::Dictionary#item [#89](https://github.com/fastly/fastly-ruby/pull/89) ([lanej](https://github.com/lanej)) +- fix initialize [#88](https://github.com/fastly/fastly-ruby/pull/88) ([lanej](https://github.com/lanej)) +- Raised ArgumentError if api_key or user/pass are not passed in. [#87](https://github.com/fastly/fastly-ruby/pull/87) ([andriantoniades](https://github.com/andriantoniades)) +- Add support for dictionary items [#86](https://github.com/fastly/fastly-ruby/pull/86) ([icco](https://github.com/icco)) +- Reintroduced :locked so the version.locked? check works [#83](https://github.com/fastly/fastly-ruby/pull/83) ([eddieroger](https://github.com/eddieroger)) ## [v1.4.2](https://github.com/fastly/fastly-ruby/tree/v1.4.2) (2016-05-23) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v1.4.1...v1.4.2) **Merged pull requests:** -- Version\#locked and \#active are boolean values [\#81](https://github.com/fastly/fastly-ruby/pull/81) ([lanej](https://github.com/lanej)) -- Update README [\#80](https://github.com/fastly/fastly-ruby/pull/80) ([tijmenb](https://github.com/tijmenb)) -- Add Edge Dictionaries [\#69](https://github.com/fastly/fastly-ruby/pull/69) ([alexmuller](https://github.com/alexmuller)) -- Validate was always returning true [\#55](https://github.com/fastly/fastly-ruby/pull/55) ([ljagiello](https://github.com/ljagiello)) +- Version#locked and #active are boolean values [#81](https://github.com/fastly/fastly-ruby/pull/81) ([lanej](https://github.com/lanej)) +- Update README [#80](https://github.com/fastly/fastly-ruby/pull/80) ([tijmenb](https://github.com/tijmenb)) +- Add Edge Dictionaries [#69](https://github.com/fastly/fastly-ruby/pull/69) ([alexmuller](https://github.com/alexmuller)) +- Validate was always returning true [#55](https://github.com/fastly/fastly-ruby/pull/55) ([ljagiello](https://github.com/ljagiello)) ## [v1.4.1](https://github.com/fastly/fastly-ruby/tree/v1.4.1) (2016-05-19) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v1.3.0...v1.4.1) **Merged pull requests:** -- Fixes string interpolation [\#79](https://github.com/fastly/fastly-ruby/pull/79) ([gschorkopf](https://github.com/gschorkopf)) -- Add a user agent key/value pair to client headers [\#78](https://github.com/fastly/fastly-ruby/pull/78) ([gschorkopf](https://github.com/gschorkopf)) -- Soft purge [\#62](https://github.com/fastly/fastly-ruby/pull/62) ([simonwistow](https://github.com/simonwistow)) +- Fixes string interpolation [#79](https://github.com/fastly/fastly-ruby/pull/79) ([gschorkopf](https://github.com/gschorkopf)) +- Add a user agent key/value pair to client headers [#78](https://github.com/fastly/fastly-ruby/pull/78) ([gschorkopf](https://github.com/gschorkopf)) +- Soft purge [#62](https://github.com/fastly/fastly-ruby/pull/62) ([simonwistow](https://github.com/simonwistow)) ## [v1.3.0](https://github.com/fastly/fastly-ruby/tree/v1.3.0) (2016-04-04) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v1.2.3...v1.3.0) **Closed issues:** -- Initializing Fastly.new with api\_key option fails on version 1.2.2 [\#73](https://github.com/fastly/fastly-ruby/issues/73) -- Release 1.2.1 Is a breaking change [\#65](https://github.com/fastly/fastly-ruby/issues/65) +- Initializing Fastly.new with api_key option fails on version 1.2.2 [#73](https://github.com/fastly/fastly-ruby/issues/73) +- Release 1.2.1 Is a breaking change [#65](https://github.com/fastly/fastly-ruby/issues/65) **Merged pull requests:** -- Added missing fields to S3Logging and syslog [\#76](https://github.com/fastly/fastly-ruby/pull/76) ([raybejjani](https://github.com/raybejjani)) -- Update gem with missing fields [\#75](https://github.com/fastly/fastly-ruby/pull/75) ([raybejjani](https://github.com/raybejjani)) -- URL escape names when used in URLs [\#74](https://github.com/fastly/fastly-ruby/pull/74) ([raybejjani](https://github.com/raybejjani)) +- Added missing fields to S3Logging and syslog [#76](https://github.com/fastly/fastly-ruby/pull/76) ([raybejjani](https://github.com/raybejjani)) +- Update gem with missing fields [#75](https://github.com/fastly/fastly-ruby/pull/75) ([raybejjani](https://github.com/raybejjani)) +- URL escape names when used in URLs [#74](https://github.com/fastly/fastly-ruby/pull/74) ([raybejjani](https://github.com/raybejjani)) ## [v1.2.3](https://github.com/fastly/fastly-ruby/tree/v1.2.3) (2016-03-15) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v1.2.2...v1.2.3) **Merged pull requests:** -- require 'openssl' [\#72](https://github.com/fastly/fastly-ruby/pull/72) ([cthomaspdx](https://github.com/cthomaspdx)) +- require 'openssl' [#72](https://github.com/fastly/fastly-ruby/pull/72) ([cthomaspdx](https://github.com/cthomaspdx)) ## [v1.2.2](https://github.com/fastly/fastly-ruby/tree/v1.2.2) (2016-03-09) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v1.2.1...v1.2.2) **Closed issues:** -- regexp should be regex [\#64](https://github.com/fastly/fastly-ruby/issues/64) +- regexp should be regex [#64](https://github.com/fastly/fastly-ruby/issues/64) **Merged pull requests:** -- rely on Net::HTTP default ca\_path [\#71](https://github.com/fastly/fastly-ruby/pull/71) ([thommahoney](https://github.com/thommahoney)) -- fix field name for regex [\#68](https://github.com/fastly/fastly-ruby/pull/68) ([thommahoney](https://github.com/thommahoney)) -- Remove `Fastly.commands` [\#67](https://github.com/fastly/fastly-ruby/pull/67) ([alexmuller](https://github.com/alexmuller)) +- rely on Net::HTTP default ca_path [#71](https://github.com/fastly/fastly-ruby/pull/71) ([thommahoney](https://github.com/thommahoney)) +- fix field name for regex [#68](https://github.com/fastly/fastly-ruby/pull/68) ([thommahoney](https://github.com/thommahoney)) +- Remove `Fastly.commands` [#67](https://github.com/fastly/fastly-ruby/pull/67) ([alexmuller](https://github.com/alexmuller)) ## [v1.2.1](https://github.com/fastly/fastly-ruby/tree/v1.2.1) (2016-01-08) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v1.2.0...v1.2.1) **Closed issues:** -- TLS certificates not validated [\#59](https://github.com/fastly/fastly-ruby/issues/59) -- Purge by key returns status 200 but purge does not seem to fire [\#54](https://github.com/fastly/fastly-ruby/issues/54) -- Does purge\_by\_key require more then API\_KEY to work? [\#52](https://github.com/fastly/fastly-ruby/issues/52) -- When chaining methods to purge by surrogate key, get\_service API call is executed every time [\#50](https://github.com/fastly/fastly-ruby/issues/50) +- TLS certificates not validated [#59](https://github.com/fastly/fastly-ruby/issues/59) +- Purge by key returns status 200 but purge does not seem to fire [#54](https://github.com/fastly/fastly-ruby/issues/54) +- Does purge_by_key require more then API_KEY to work? [#52](https://github.com/fastly/fastly-ruby/issues/52) +- When chaining methods to purge by surrogate key, get_service API call is executed every time [#50](https://github.com/fastly/fastly-ruby/issues/50) **Merged pull requests:** -- validate TLS certificates [\#61](https://github.com/fastly/fastly-ruby/pull/61) ([lanej](https://github.com/lanej)) -- Detect if client base\_uri is HTTPS [\#53](https://github.com/fastly/fastly-ruby/pull/53) ([mmay](https://github.com/mmay)) -- Improve examples of purging [\#51](https://github.com/fastly/fastly-ruby/pull/51) ([drbrain](https://github.com/drbrain)) -- having login\_opts examples in the readme [\#49](https://github.com/fastly/fastly-ruby/pull/49) ([phoet](https://github.com/phoet)) +- validate TLS certificates [#61](https://github.com/fastly/fastly-ruby/pull/61) ([lanej](https://github.com/lanej)) +- Detect if client base_uri is HTTPS [#53](https://github.com/fastly/fastly-ruby/pull/53) ([mmay](https://github.com/mmay)) +- Improve examples of purging [#51](https://github.com/fastly/fastly-ruby/pull/51) ([drbrain](https://github.com/drbrain)) +- having login_opts examples in the readme [#49](https://github.com/fastly/fastly-ruby/pull/49) ([phoet](https://github.com/phoet)) ## [v1.2.0](https://github.com/fastly/fastly-ruby/tree/v1.2.0) (2015-02-06) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v1.1.5...v1.2.0) **Closed issues:** -- Can you bump the gem version? [\#43](https://github.com/fastly/fastly-ruby/issues/43) -- service name change fails on save! [\#20](https://github.com/fastly/fastly-ruby/issues/20) -- purge method doesn't take options hash [\#7](https://github.com/fastly/fastly-ruby/issues/7) -- Make sure types are correct [\#2](https://github.com/fastly/fastly-ruby/issues/2) +- Can you bump the gem version? [#43](https://github.com/fastly/fastly-ruby/issues/43) +- service name change fails on save! [#20](https://github.com/fastly/fastly-ruby/issues/20) +- purge method doesn't take options hash [#7](https://github.com/fastly/fastly-ruby/issues/7) +- Make sure types are correct [#2](https://github.com/fastly/fastly-ruby/issues/2) **Merged pull requests:** -- Better error reporting [\#48](https://github.com/fastly/fastly-ruby/pull/48) ([mastfish](https://github.com/mastfish)) -- Remove curb-fu once and for all [\#44](https://github.com/fastly/fastly-ruby/pull/44) ([mmay](https://github.com/mmay)) +- Better error reporting [#48](https://github.com/fastly/fastly-ruby/pull/48) ([mastfish](https://github.com/mastfish)) +- Remove curb-fu once and for all [#44](https://github.com/fastly/fastly-ruby/pull/44) ([mmay](https://github.com/mmay)) ## [v1.1.5](https://github.com/fastly/fastly-ruby/tree/v1.1.5) (2014-12-16) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v1.1.4...v1.1.5) **Merged pull requests:** -- bump curb to 0.8.6 [\#45](https://github.com/fastly/fastly-ruby/pull/45) ([mmay](https://github.com/mmay)) -- Cleanup Style Issues [\#31](https://github.com/fastly/fastly-ruby/pull/31) ([ezkl](https://github.com/ezkl)) +- bump curb to 0.8.6 [#45](https://github.com/fastly/fastly-ruby/pull/45) ([mmay](https://github.com/mmay)) +- Cleanup Style Issues [#31](https://github.com/fastly/fastly-ruby/pull/31) ([ezkl](https://github.com/ezkl)) ## [v1.1.4](https://github.com/fastly/fastly-ruby/tree/v1.1.4) (2014-09-29) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v1.1.3...v1.1.4) **Merged pull requests:** -- Require key [\#38](https://github.com/fastly/fastly-ruby/pull/38) ([thommahoney](https://github.com/thommahoney)) +- Require key [#38](https://github.com/fastly/fastly-ruby/pull/38) ([thommahoney](https://github.com/thommahoney)) ## [v1.1.3](https://github.com/fastly/fastly-ruby/tree/v1.1.3) (2014-07-25) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v1.1.2...v1.1.3) **Merged pull requests:** -- Add create domain script [\#33](https://github.com/fastly/fastly-ruby/pull/33) ([mmay](https://github.com/mmay)) -- Clarify the gem name in the README [\#32](https://github.com/fastly/fastly-ruby/pull/32) ([adarsh](https://github.com/adarsh)) +- Add create domain script [#33](https://github.com/fastly/fastly-ruby/pull/33) ([mmay](https://github.com/mmay)) +- Clarify the gem name in the README [#32](https://github.com/fastly/fastly-ruby/pull/32) ([adarsh](https://github.com/adarsh)) ## [v1.1.2](https://github.com/fastly/fastly-ruby/tree/v1.1.2) (2014-06-12) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v1.1.1...v1.1.2) **Merged pull requests:** -- Checks for existence of String\#underscore prior to overriding [\#30](https://github.com/fastly/fastly-ruby/pull/30) ([spra85](https://github.com/spra85)) +- Checks for existence of String#underscore prior to overriding [#30](https://github.com/fastly/fastly-ruby/pull/30) ([spra85](https://github.com/spra85)) ## [v1.1.1](https://github.com/fastly/fastly-ruby/tree/v1.1.1) (2014-06-05) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v1.1.0...v1.1.1) **Merged pull requests:** -- Add VCL\#set\_main! [\#29](https://github.com/fastly/fastly-ruby/pull/29) ([ezkl](https://github.com/ezkl)) -- Minor project gardening [\#28](https://github.com/fastly/fastly-ruby/pull/28) ([ezkl](https://github.com/ezkl)) +- Add VCL#set_main! [#29](https://github.com/fastly/fastly-ruby/pull/29) ([ezkl](https://github.com/ezkl)) +- Minor project gardening [#28](https://github.com/fastly/fastly-ruby/pull/28) ([ezkl](https://github.com/ezkl)) ## [v1.1.0](https://github.com/fastly/fastly-ruby/tree/v1.1.0) (2014-06-04) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v1.02...v1.1.0) **Closed issues:** -- Using the API key instead of username + password [\#22](https://github.com/fastly/fastly-ruby/issues/22) -- Where to use full auth vs. token auth? [\#17](https://github.com/fastly/fastly-ruby/issues/17) -- License missing from gemspec [\#10](https://github.com/fastly/fastly-ruby/issues/10) +- Using the API key instead of username + password [#22](https://github.com/fastly/fastly-ruby/issues/22) +- Where to use full auth vs. token auth? [#17](https://github.com/fastly/fastly-ruby/issues/17) +- License missing from gemspec [#10](https://github.com/fastly/fastly-ruby/issues/10) **Merged pull requests:** -- Allow creating an entirely new version of a service, inheriting nothing ... [\#27](https://github.com/fastly/fastly-ruby/pull/27) ([ctdk](https://github.com/ctdk)) -- Fix s3 [\#26](https://github.com/fastly/fastly-ruby/pull/26) ([ctdk](https://github.com/ctdk)) -- Fix listing objects, add some API features [\#24](https://github.com/fastly/fastly-ruby/pull/24) ([ctdk](https://github.com/ctdk)) -- Wrap test framework dependencies [\#23](https://github.com/fastly/fastly-ruby/pull/23) ([sgerrand](https://github.com/sgerrand)) -- Readme updates for Testing [\#19](https://github.com/fastly/fastly-ruby/pull/19) ([phlipper](https://github.com/phlipper)) -- Streamline test suite [\#16](https://github.com/fastly/fastly-ruby/pull/16) ([aspires](https://github.com/aspires)) +- Allow creating an entirely new version of a service, inheriting nothing ... [#27](https://github.com/fastly/fastly-ruby/pull/27) ([ctdk](https://github.com/ctdk)) +- Fix s3 [#26](https://github.com/fastly/fastly-ruby/pull/26) ([ctdk](https://github.com/ctdk)) +- Fix listing objects, add some API features [#24](https://github.com/fastly/fastly-ruby/pull/24) ([ctdk](https://github.com/ctdk)) +- Wrap test framework dependencies [#23](https://github.com/fastly/fastly-ruby/pull/23) ([sgerrand](https://github.com/sgerrand)) +- Readme updates for Testing [#19](https://github.com/fastly/fastly-ruby/pull/19) ([phlipper](https://github.com/phlipper)) +- Streamline test suite [#16](https://github.com/fastly/fastly-ruby/pull/16) ([aspires](https://github.com/aspires)) ## [v1.02](https://github.com/fastly/fastly-ruby/tree/v1.02) (2013-11-26) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v1.01...v1.02) **Merged pull requests:** -- Fixing misspelled field \(quorom to quorum\) [\#15](https://github.com/fastly/fastly-ruby/pull/15) ([renholm](https://github.com/renholm)) +- Fixing misspelled field (quorom to quorum) [#15](https://github.com/fastly/fastly-ruby/pull/15) ([renholm](https://github.com/renholm)) ## [v1.01](https://github.com/fastly/fastly-ruby/tree/v1.01) (2013-10-03) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v1.0...v1.01) **Closed issues:** -- No method for deleting vlc's [\#8](https://github.com/fastly/fastly-ruby/issues/8) +- No method for deleting vlc's [#8](https://github.com/fastly/fastly-ruby/issues/8) **Merged pull requests:** -- README should use 'new\_version.activate!', not 'new\_version.activate' [\#13](https://github.com/fastly/fastly-ruby/pull/13) ([samjsharpe](https://github.com/samjsharpe)) -- Move Fastly::VERSION to dedicated file [\#12](https://github.com/fastly/fastly-ruby/pull/12) ([f3nry](https://github.com/f3nry)) -- fix purge\_all, purge\_by\_key and details at Fastly::Service [\#11](https://github.com/fastly/fastly-ruby/pull/11) ([kzk](https://github.com/kzk)) +- README should use 'new_version.activate!', not 'new_version.activate' [#13](https://github.com/fastly/fastly-ruby/pull/13) ([samjsharpe](https://github.com/samjsharpe)) +- Move Fastly::VERSION to dedicated file [#12](https://github.com/fastly/fastly-ruby/pull/12) ([f3nry](https://github.com/f3nry)) +- fix purge_all, purge_by_key and details at Fastly::Service [#11](https://github.com/fastly/fastly-ruby/pull/11) ([kzk](https://github.com/kzk)) ## [v1.0](https://github.com/fastly/fastly-ruby/tree/v1.0) (2013-07-16) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v0.99...v1.0) **Merged pull requests:** -- Fix for issue \#8 [\#9](https://github.com/fastly/fastly-ruby/pull/9) ([ajardan](https://github.com/ajardan)) +- Fix for issue #8 [#9](https://github.com/fastly/fastly-ruby/pull/9) ([ajardan](https://github.com/ajardan)) ## [v0.99](https://github.com/fastly/fastly-ruby/tree/v0.99) (2012-05-01) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v0.98...v0.99) **Merged pull requests:** -- Minor bug fix and README update [\#5](https://github.com/fastly/fastly-ruby/pull/5) ([ramezjm](https://github.com/ramezjm)) +- Minor bug fix and README update [#5](https://github.com/fastly/fastly-ruby/pull/5) ([ramezjm](https://github.com/ramezjm)) ## [v0.98](https://github.com/fastly/fastly-ruby/tree/v0.98) (2012-02-16) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v0.97...v0.98) ## [v0.97](https://github.com/fastly/fastly-ruby/tree/v0.97) (2012-01-27) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v0.96...v0.97) **Closed issues:** -- Every invocation of fastly\_upload\_vcl from v0.95 dies with an error [\#4](https://github.com/fastly/fastly-ruby/issues/4) +- Every invocation of fastly_upload_vcl from v0.95 dies with an error [#4](https://github.com/fastly/fastly-ruby/issues/4) ## [v0.96](https://github.com/fastly/fastly-ruby/tree/v0.96) (2012-01-17) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v0.95...v0.96) ## [v0.95](https://github.com/fastly/fastly-ruby/tree/v0.95) (2011-12-19) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v0.9...v0.95) **Closed issues:** -- Gem does not default site or port [\#3](https://github.com/fastly/fastly-ruby/issues/3) -- Update to new form of versions [\#1](https://github.com/fastly/fastly-ruby/issues/1) +- Gem does not default site or port [#3](https://github.com/fastly/fastly-ruby/issues/3) +- Update to new form of versions [#1](https://github.com/fastly/fastly-ruby/issues/1) ## [v0.9](https://github.com/fastly/fastly-ruby/tree/v0.9) (2011-12-15) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v0.8...v0.9) ## [v0.8](https://github.com/fastly/fastly-ruby/tree/v0.8) (2011-11-03) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v0.6...v0.8) ## [v0.6](https://github.com/fastly/fastly-ruby/tree/v0.6) (2011-11-03) + [Full Changelog](https://github.com/fastly/fastly-ruby/compare/v0.5...v0.6) ## [v0.5](https://github.com/fastly/fastly-ruby/tree/v0.5) (2011-11-01) -[Full Changelog](https://github.com/fastly/fastly-ruby/compare/2015-02-05 v1.2.0...v0.5) + +\[Full Changelog\](https://github.com/fastly/fastly-ruby/compare/2015-02-05 v1.2.0...v0.5) # HEAD ## 2015-02-05 v1.2.0 -* remove curb-fu. Net::HTTP is used instead - https://github.com/fastly/fastly-ruby/pull/44 -* better client error handling - https://github.com/fastly/fastly-ruby/pull/48 + +- remove curb-fu. Net::HTTP is used instead - https://github.com/fastly/fastly-ruby/pull/44 +- better client error handling - https://github.com/fastly/fastly-ruby/pull/48 ## 2014-12-15 v1.1.5 -* major refactor and reorganization of code (merged branch https://github.com/fastly/fastly-ruby/pull/31) -* bump curb dep to 0.8.6 for ruby 2.1 support (see https://github.com/fastly/fastly-ruby/issues/43) + +- major refactor and reorganization of code (merged branch https://github.com/fastly/fastly-ruby/pull/31) +- bump curb dep to 0.8.6 for ruby 2.1 support (see https://github.com/fastly/fastly-ruby/issues/43) ## 2014-09-29 v1.1.4 -* Require API Key for purge by key requests + +- Require API Key for purge by key requests ## 2014-07-25 v1.1.3 -* Add test:unit rake task -* Add Rubocop and some rubocop cleanup -* Clarify gem name in documentation -* Fix a bug in the `Fastly.get_options` method -* Add `bin/fastly_create_domain` script to easily create domain + +- Add test:unit rake task +- Add Rubocop and some rubocop cleanup +- Clarify gem name in documentation +- Fix a bug in the `Fastly.get_options` method +- Add `bin/fastly_create_domain` script to easily create domain ## 2014-06-12 v1.1.2 -* Replace `String#underscore` with `Fastly::Util.class_to_path` method. -* Add first true unit test -* Add `test_helper.rb` -* Add `pry` as dependency -* Add console Rake task + +- Replace `String#underscore` with `Fastly::Util.class_to_path` method. +- Add first true unit test +- Add `test_helper.rb` +- Add `pry` as dependency +- Add console Rake task ## 2013-11-26 v1.02 @@ -779,7 +847,7 @@ Add mapping from backends to directors and directors to origins ## 2011-11-03 v0.8 -Add list_* to all objects +Add list\_\* to all objects Add Healthchecks and Syslog endpoint streaming diff --git a/README.md b/README.md index ceb065e9..ab22d639 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ A Ruby client library for interacting with most facets of the [Fastly API](https To install via RubyGems, add the following to your project's `Gemfile`: ```ruby -gem 'fastly', '~> 8.0.1' +gem 'fastly', '~> 8.1.0' ``` Then run `bundle install`. @@ -94,6 +94,8 @@ Class | Method | Description [*Fastly::BillingAddressApi*](docs/BillingAddressApi.md) | [**delete_billing_addr**](docs/BillingAddressApi.md#delete_billing_addr) | Delete a billing address [*Fastly::BillingAddressApi*](docs/BillingAddressApi.md) | [**get_billing_addr**](docs/BillingAddressApi.md#get_billing_addr) | Get a billing address [*Fastly::BillingAddressApi*](docs/BillingAddressApi.md) | [**update_billing_addr**](docs/BillingAddressApi.md#update_billing_addr) | Update a billing address +[*Fastly::BillingInvoicesApi*](docs/BillingInvoicesApi.md) | [**get_invoice_by_invoice_id**](docs/BillingInvoicesApi.md#get_invoice_by_invoice_id) | Get invoice by ID. +[*Fastly::BillingInvoicesApi*](docs/BillingInvoicesApi.md) | [**list_invoices**](docs/BillingInvoicesApi.md#list_invoices) | List of invoices. [*Fastly::CacheSettingsApi*](docs/CacheSettingsApi.md) | [**create_cache_settings**](docs/CacheSettingsApi.md#create_cache_settings) | Create a cache settings object [*Fastly::CacheSettingsApi*](docs/CacheSettingsApi.md) | [**delete_cache_settings**](docs/CacheSettingsApi.md#delete_cache_settings) | Delete a cache settings object [*Fastly::CacheSettingsApi*](docs/CacheSettingsApi.md) | [**get_cache_settings**](docs/CacheSettingsApi.md#get_cache_settings) | Get a cache settings object @@ -509,6 +511,7 @@ Class | Method | Description [*Fastly::TlsConfigurationsApi*](docs/TlsConfigurationsApi.md) | [**get_tls_config**](docs/TlsConfigurationsApi.md#get_tls_config) | Get a TLS configuration [*Fastly::TlsConfigurationsApi*](docs/TlsConfigurationsApi.md) | [**list_tls_configs**](docs/TlsConfigurationsApi.md#list_tls_configs) | List TLS configurations [*Fastly::TlsConfigurationsApi*](docs/TlsConfigurationsApi.md) | [**update_tls_config**](docs/TlsConfigurationsApi.md#update_tls_config) | Update a TLS configuration +[*Fastly::TlsCsrsApi*](docs/TlsCsrsApi.md) | [**create_csr**](docs/TlsCsrsApi.md#create_csr) | Create CSR [*Fastly::TlsDomainsApi*](docs/TlsDomainsApi.md) | [**list_tls_domains**](docs/TlsDomainsApi.md#list_tls_domains) | List TLS domains [*Fastly::TlsPrivateKeysApi*](docs/TlsPrivateKeysApi.md) | [**create_tls_key**](docs/TlsPrivateKeysApi.md#create_tls_key) | Create a TLS private key [*Fastly::TlsPrivateKeysApi*](docs/TlsPrivateKeysApi.md) | [**delete_tls_key**](docs/TlsPrivateKeysApi.md#delete_tls_key) | Delete a TLS private key @@ -595,12 +598,15 @@ Class | Method | Description The fastly-ruby API client currently does not support the following endpoints: -- [`/resources/stores/kv/{store_id}/batch`](https://developer.fastly.com/reference/api/services/resources/kv-store-item) (PUT) -- [`/tls/activations/{tls_activation_id}`](https://developer.fastly.com/reference/api/tls/mutual-tls/activations) (GET, PATCH) -- [`/tls/activations`](https://developer.fastly.com/reference/api/tls/mutual-tls/activations) (GET) -- [`/v1/channel/{service_id}/ts/h/limit/{max_entries}`](https://developer.fastly.com/reference/api/metrics-stats/origin-insights) (GET) -- [`/v1/channel/{service_id}/ts/h`](https://developer.fastly.com/reference/api/metrics-stats/origin-insights) (GET) -- [`/v1/channel/{service_id}/ts/{start_timestamp}`](https://developer.fastly.com/reference/api/metrics-stats/origin-insights) (GET) +- [`/alerts/definitions/{definition_id}`](https://www.fastly.com/documentation/reference/api/observability/alerts/definitions) (DELETE, GET, PUT) +- [`/alerts/definitions`](https://www.fastly.com/documentation/reference/api/observability/alerts/definitions) (GET, POST) +- [`/alerts/history`](https://www.fastly.com/documentation/reference/api/observability/alerts/history) (GET) +- [`/resources/stores/kv/{store_id}/batch`](https://www.fastly.com/documentation/reference/api/services/resources/kv-store-item) (PUT) +- [`/tls/activations/{tls_activation_id}`](https://www.fastly.com/documentation/reference/api/tls/mutual-tls/activations) (GET, PATCH) +- [`/tls/activations`](https://www.fastly.com/documentation/reference/api/tls/mutual-tls/activations) (GET) +- [`/v1/channel/{service_id}/ts/h/limit/{max_entries}`](https://www.fastly.com/documentation/reference/api/metrics-stats/origin-insights) (GET) +- [`/v1/channel/{service_id}/ts/h`](https://www.fastly.com/documentation/reference/api/metrics-stats/origin-insights) (GET) +- [`/v1/channel/{service_id}/ts/{start_timestamp}`](https://www.fastly.com/documentation/reference/api/metrics-stats/origin-insights) (GET) If you encounter any non-security-related bug or unexpected behavior, please [file an issue][bug] diff --git a/docs/ErrorResponse.md b/docs/AutomationTokenErrorResponse.md similarity index 90% rename from docs/ErrorResponse.md rename to docs/AutomationTokenErrorResponse.md index 15bb2791..c91c79a0 100644 --- a/docs/ErrorResponse.md +++ b/docs/AutomationTokenErrorResponse.md @@ -1,4 +1,4 @@ -# Fastly::ErrorResponse +# Fastly::AutomationTokenErrorResponse ## Properties diff --git a/docs/AutomationTokensApi.md b/docs/AutomationTokensApi.md index b117eac7..7763e79f 100644 --- a/docs/AutomationTokensApi.md +++ b/docs/AutomationTokensApi.md @@ -174,7 +174,7 @@ end ## `revoke_automation_token_id()` ```ruby -revoke_automation_token_id(opts): # Revoke an Automation Token by ID +revoke_automation_token_id(opts): # Revoke an Automation Token by ID ``` Revoke an automation token by ID. @@ -204,7 +204,7 @@ end ### Return type -[**ErrorResponse**](ErrorResponse.md) +[**AutomationTokenErrorResponse**](AutomationTokenErrorResponse.md) [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Backend.md b/docs/Backend.md index 0318e9d8..545d93fb 100644 --- a/docs/Backend.md +++ b/docs/Backend.md @@ -28,7 +28,7 @@ | **ssl_ca_cert** | **String** | CA certificate attached to origin. | [optional] | | **ssl_cert_hostname** | **String** | Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. | [optional] | | **ssl_check_cert** | **Boolean** | Be strict on checking SSL certs. | [optional][default to true] | -| **ssl_ciphers** | **String** | List of [OpenSSL ciphers](https://www.openssl.org/docs/manmaster/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. | [optional] | +| **ssl_ciphers** | **String** | List of [OpenSSL ciphers](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. | [optional] | | **ssl_client_cert** | **String** | Client certificate attached to origin. | [optional] | | **ssl_client_key** | **String** | Client key attached to origin. | [optional] | | **ssl_hostname** | **String** | Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. | [optional] | diff --git a/docs/BackendApi.md b/docs/BackendApi.md index 42181762..434188c1 100644 --- a/docs/BackendApi.md +++ b/docs/BackendApi.md @@ -56,7 +56,7 @@ opts = { ssl_ca_cert: 'ssl_ca_cert_example', # String | CA certificate attached to origin. ssl_cert_hostname: 'ssl_cert_hostname_example', # String | Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. ssl_check_cert: true, # Boolean | Be strict on checking SSL certs. - ssl_ciphers: 'ssl_ciphers_example', # String | List of [OpenSSL ciphers](https://www.openssl.org/docs/manmaster/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. + ssl_ciphers: 'ssl_ciphers_example', # String | List of [OpenSSL ciphers](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. ssl_client_cert: 'ssl_client_cert_example', # String | Client certificate attached to origin. ssl_client_key: 'ssl_client_key_example', # String | Client key attached to origin. ssl_hostname: 'ssl_hostname_example', # String | Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. @@ -104,7 +104,7 @@ end | **ssl_ca_cert** | **String** | CA certificate attached to origin. | [optional] | | **ssl_cert_hostname** | **String** | Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. | [optional] | | **ssl_check_cert** | **Boolean** | Be strict on checking SSL certs. | [optional][default to true] | -| **ssl_ciphers** | **String** | List of [OpenSSL ciphers](https://www.openssl.org/docs/manmaster/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. | [optional] | +| **ssl_ciphers** | **String** | List of [OpenSSL ciphers](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. | [optional] | | **ssl_client_cert** | **String** | Client certificate attached to origin. | [optional] | | **ssl_client_key** | **String** | Client key attached to origin. | [optional] | | **ssl_hostname** | **String** | Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. | [optional] | @@ -279,7 +279,7 @@ opts = { ssl_ca_cert: 'ssl_ca_cert_example', # String | CA certificate attached to origin. ssl_cert_hostname: 'ssl_cert_hostname_example', # String | Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. ssl_check_cert: true, # Boolean | Be strict on checking SSL certs. - ssl_ciphers: 'ssl_ciphers_example', # String | List of [OpenSSL ciphers](https://www.openssl.org/docs/manmaster/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. + ssl_ciphers: 'ssl_ciphers_example', # String | List of [OpenSSL ciphers](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. ssl_client_cert: 'ssl_client_cert_example', # String | Client certificate attached to origin. ssl_client_key: 'ssl_client_key_example', # String | Client key attached to origin. ssl_hostname: 'ssl_hostname_example', # String | Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. @@ -328,7 +328,7 @@ end | **ssl_ca_cert** | **String** | CA certificate attached to origin. | [optional] | | **ssl_cert_hostname** | **String** | Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. | [optional] | | **ssl_check_cert** | **Boolean** | Be strict on checking SSL certs. | [optional][default to true] | -| **ssl_ciphers** | **String** | List of [OpenSSL ciphers](https://www.openssl.org/docs/manmaster/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. | [optional] | +| **ssl_ciphers** | **String** | List of [OpenSSL ciphers](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. | [optional] | | **ssl_client_cert** | **String** | Client certificate attached to origin. | [optional] | | **ssl_client_key** | **String** | Client key attached to origin. | [optional] | | **ssl_hostname** | **String** | Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. | [optional] | diff --git a/docs/BackendResponse.md b/docs/BackendResponse.md index e97231af..21209545 100644 --- a/docs/BackendResponse.md +++ b/docs/BackendResponse.md @@ -28,7 +28,7 @@ | **ssl_ca_cert** | **String** | CA certificate attached to origin. | [optional] | | **ssl_cert_hostname** | **String** | Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. | [optional] | | **ssl_check_cert** | **Boolean** | Be strict on checking SSL certs. | [optional][default to true] | -| **ssl_ciphers** | **String** | List of [OpenSSL ciphers](https://www.openssl.org/docs/manmaster/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. | [optional] | +| **ssl_ciphers** | **String** | List of [OpenSSL ciphers](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. | [optional] | | **ssl_client_cert** | **String** | Client certificate attached to origin. | [optional] | | **ssl_client_key** | **String** | Client key attached to origin. | [optional] | | **ssl_hostname** | **String** | Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. | [optional] | diff --git a/docs/BillingInvoicesApi.md b/docs/BillingInvoicesApi.md new file mode 100644 index 00000000..820a380d --- /dev/null +++ b/docs/BillingInvoicesApi.md @@ -0,0 +1,96 @@ +# Fastly::BillingInvoicesApi + + +```ruby +require 'fastly' +api_instance = Fastly::BillingInvoicesApi.new +``` + +## Methods + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**get_invoice_by_invoice_id**](BillingInvoicesApi.md#get_invoice_by_invoice_id) | **GET** /billing/v3/invoices/{invoice_id} | Get invoice by ID. | +| [**list_invoices**](BillingInvoicesApi.md#list_invoices) | **GET** /billing/v3/invoices | List of invoices. | + + +## `get_invoice_by_invoice_id()` + +```ruby +get_invoice_by_invoice_id(opts): # Get invoice by ID. +``` + +Returns invoice associated with the invoice id. + +### Examples + +```ruby +api_instance = Fastly::BillingInvoicesApi.new +opts = { + invoice_id: 'invoice_id_example', # String | Alphanumeric string identifying the invoice. +} + +begin + # Get invoice by ID. + result = api_instance.get_invoice_by_invoice_id(opts) + p result +rescue Fastly::ApiError => e + puts "Error when calling BillingInvoicesApi->get_invoice_by_invoice_id: #{e}" +end +``` + +### Options + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **invoice_id** | **String** | Alphanumeric string identifying the invoice. | | + +### Return type + +[**InvoiceResponse**](InvoiceResponse.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) +## `list_invoices()` + +```ruby +list_invoices(opts): # List of invoices. +``` + +Returns the list of invoices, sorted by billing start date (newest to oldest). + +### Examples + +```ruby +api_instance = Fastly::BillingInvoicesApi.new +opts = { + billing_start_date: '2023-01-01T00:00:00Z', # String | + billing_end_date: '2023-01-31T00:00:00Z', # String | + limit: 'limit_example', # String | Number of results per page. The maximum is 200. + cursor: 'cursor_example', # String | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. +} + +begin + # List of invoices. + result = api_instance.list_invoices(opts) + p result +rescue Fastly::ApiError => e + puts "Error when calling BillingInvoicesApi->list_invoices: #{e}" +end +``` + +### Options + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **billing_start_date** | **String** | | [optional] | +| **billing_end_date** | **String** | | [optional] | +| **limit** | **String** | Number of results per page. The maximum is 200. | [optional][default to '100'] | +| **cursor** | **String** | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. | [optional] | + +### Return type + +[**ListInvoicesResponse**](ListInvoicesResponse.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/Director.md b/docs/Director.md index 5465c73f..97d34bba 100644 --- a/docs/Director.md +++ b/docs/Director.md @@ -9,7 +9,7 @@ | **comment** | **String** | A freeform descriptive note. | [optional] | | **name** | **String** | Name for the Director. | [optional] | | **quorum** | **Integer** | The percentage of capacity that needs to be up for a director to be considered up. `0` to `100`. | [optional][default to 75] | -| **shield** | **String** | Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. | [optional][default to 'null'] | +| **shield** | **String** | Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. | [optional][default to 'null'] | | **type** | **Integer** | What type of load balance group to use. | [optional][default to TYPE::random] | | **retries** | **Integer** | How many backends to search if it fails. | [optional][default to 5] | diff --git a/docs/DirectorApi.md b/docs/DirectorApi.md index 8f9a0c09..356f0b76 100644 --- a/docs/DirectorApi.md +++ b/docs/DirectorApi.md @@ -37,7 +37,7 @@ opts = { comment: 'comment_example', # String | A freeform descriptive note. name: 'name_example', # String | Name for the Director. quorum: 56, # Integer | The percentage of capacity that needs to be up for a director to be considered up. `0` to `100`. - shield: 'shield_example', # String | Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. + shield: 'shield_example', # String | Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. type: 1, # Integer | What type of load balance group to use. retries: 56, # Integer | How many backends to search if it fails. } @@ -62,7 +62,7 @@ end | **comment** | **String** | A freeform descriptive note. | [optional] | | **name** | **String** | Name for the Director. | [optional] | | **quorum** | **Integer** | The percentage of capacity that needs to be up for a director to be considered up. `0` to `100`. | [optional][default to 75] | -| **shield** | **String** | Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. | [optional][default to 'null'] | +| **shield** | **String** | Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. | [optional][default to 'null'] | | **type** | **Integer** | What type of load balance group to use. | [optional][default to 1] | | **retries** | **Integer** | How many backends to search if it fails. | [optional][default to 5] | diff --git a/docs/DirectorResponse.md b/docs/DirectorResponse.md index 28f6a8eb..5f218c65 100644 --- a/docs/DirectorResponse.md +++ b/docs/DirectorResponse.md @@ -9,7 +9,7 @@ | **comment** | **String** | A freeform descriptive note. | [optional] | | **name** | **String** | Name for the Director. | [optional] | | **quorum** | **Integer** | The percentage of capacity that needs to be up for a director to be considered up. `0` to `100`. | [optional][default to 75] | -| **shield** | **String** | Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. | [optional][default to 'null'] | +| **shield** | **String** | Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. | [optional][default to 'null'] | | **type** | **Integer** | What type of load balance group to use. | [optional][default to TYPE::random] | | **retries** | **Integer** | How many backends to search if it fails. | [optional][default to 5] | | **service_id** | **String** | | [optional][readonly] | diff --git a/docs/DomainInspectorHistoricalApi.md b/docs/DomainInspectorHistoricalApi.md index 986aab13..28dc069f 100644 --- a/docs/DomainInspectorHistoricalApi.md +++ b/docs/DomainInspectorHistoricalApi.md @@ -30,10 +30,10 @@ opts = { start: '2021-08-01T00:00:00.000Z', # String | A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `downsample` value. _end: '2020-08-02T00:00:00.000Z', # String | A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `downsample` value. downsample: 'hour', # String | Duration of sample windows. - metric: 'resp_body_bytes,status_2xx', # String | The metric to retrieve. Up to ten comma-separated metrics are accepted. + metric: 'resp_body_bytes,status_2xx', # String | The metrics to retrieve. Multiple values should be comma-separated. group_by: 'domain', # String | Dimensions to return in the query. Multiple dimensions may be separated by commas. For example, `group_by=domain` will return one timeseries for every domain, as a total across all datacenters (POPs). limit: 'limit_example', # String | Number of results per page. The maximum is 200. - cursor: 'cursor_example', # String | Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. + cursor: 'cursor_example', # String | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. region: 'usa', # String | Limit query to one or more specific geographic regions. Values should be comma-separated. datacenter: 'SJC,STP', # String | Limit query to one or more specific POPs. Values should be comma-separated. domain: 'domain_1.com,domain_2.com', # String | Limit query to one or more specific domains. Values should be comma-separated. @@ -56,10 +56,10 @@ end | **start** | **String** | A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `downsample` value. | [optional] | | **_end** | **String** | A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `downsample` value. | [optional] | | **downsample** | **String** | Duration of sample windows. | [optional][default to 'hour'] | -| **metric** | **String** | The metric to retrieve. Up to ten comma-separated metrics are accepted. | [optional][default to 'edge_requests'] | +| **metric** | **String** | The metrics to retrieve. Multiple values should be comma-separated. | [optional][default to 'edge_requests'] | | **group_by** | **String** | Dimensions to return in the query. Multiple dimensions may be separated by commas. For example, `group_by=domain` will return one timeseries for every domain, as a total across all datacenters (POPs). | [optional] | | **limit** | **String** | Number of results per page. The maximum is 200. | [optional][default to '100'] | -| **cursor** | **String** | Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. | [optional] | +| **cursor** | **String** | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. | [optional] | | **region** | **String** | Limit query to one or more specific geographic regions. Values should be comma-separated. | [optional] | | **datacenter** | **String** | Limit query to one or more specific POPs. Values should be comma-separated. | [optional] | | **domain** | **String** | Limit query to one or more specific domains. Values should be comma-separated. | [optional] | diff --git a/docs/DomainInspectorRealtimeEntry.md b/docs/DomainInspectorRealtimeEntry.md index 43bd5a58..a9f6af74 100644 --- a/docs/DomainInspectorRealtimeEntry.md +++ b/docs/DomainInspectorRealtimeEntry.md @@ -6,7 +6,7 @@ | ---- | ---- | ----------- | ----- | | **recorded** | [**RecordedTimestamp**](RecordedTimestamp.md) | | [optional] | | **aggregated** | [**Hash<String, DomainInspectorMeasurements>**](DomainInspectorMeasurements.md) | Groups [measurements](#measurements-data-model) by backend name and then by IP address. | [optional] | -| **datacenter** | **Hash<String, Hash<String, DomainInspectorMeasurements>>** | Groups [measurements](#measurements-data-model) by POP, then backend name, and then IP address. See the [POPs API](/reference/api/utils/pops/) for details about POP identifiers. | [optional] | +| **datacenter** | **Hash<String, Hash<String, DomainInspectorMeasurements>>** | Groups [measurements](#measurements-data-model) by POP, then backend name, and then IP address. See the [POPs API](https://www.fastly.com/documentation/reference/api/utils/pops/) for details about POP identifiers. | [optional] | [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Error.md b/docs/Error.md new file mode 100644 index 00000000..44047058 --- /dev/null +++ b/docs/Error.md @@ -0,0 +1,13 @@ +# Fastly::Error + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **type** | **String** | | [optional] | +| **title** | **String** | | [optional] | +| **code** | **String** | | [optional] | +| **status** | **String** | | [optional] | + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + diff --git a/docs/ErrorResponseData.md b/docs/ErrorResponseData.md new file mode 100644 index 00000000..f5a4cbb3 --- /dev/null +++ b/docs/ErrorResponseData.md @@ -0,0 +1,11 @@ +# Fastly::ErrorResponseData + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **title** | **String** | | [optional] | +| **detail** | **String** | | [optional] | + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + diff --git a/docs/Invoice.md b/docs/Invoice.md new file mode 100644 index 00000000..0f296e97 --- /dev/null +++ b/docs/Invoice.md @@ -0,0 +1,18 @@ +# Fastly::Invoice + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **customer_id** | **String** | Customer ID associated with the invoice. | [optional] | +| **invoice_id** | **String** | Alphanumeric string identifying the invoice. | [optional] | +| **invoice_posted_on** | **Time** | Date and time invoice was posted on, in ISO 8601 format. | [optional] | +| **billing_start_date** | **Time** | Date and time (in ISO 8601 format) for initiation point of a billing cycle, signifying the start of charges for a service or subscription. | [optional] | +| **billing_end_date** | **Time** | Date and time (in ISO 8601 format) for termination point of a billing cycle, signifying the end of charges for a service or subscription. | [optional] | +| **statement_number** | **String** | Alphanumeric string identifying the statement number. | [optional] | +| **currency_code** | **String** | Three-letter code representing a specific currency used for financial transactions. | [optional] | +| **monthly_transaction_amount** | **Float** | Total billable amount for invoiced services charged within a single month. | [optional] | +| **transaction_line_items** | [**Array<Invoicelineitems>**](Invoicelineitems.md) | | [optional] | + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + diff --git a/docs/InvoiceResponse.md b/docs/InvoiceResponse.md new file mode 100644 index 00000000..b5da6206 --- /dev/null +++ b/docs/InvoiceResponse.md @@ -0,0 +1,18 @@ +# Fastly::InvoiceResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **customer_id** | **String** | Customer ID associated with the invoice. | [optional] | +| **invoice_id** | **String** | Alphanumeric string identifying the invoice. | [optional] | +| **invoice_posted_on** | **Time** | Date and time invoice was posted on, in ISO 8601 format. | [optional] | +| **billing_start_date** | **Time** | Date and time (in ISO 8601 format) for initiation point of a billing cycle, signifying the start of charges for a service or subscription. | [optional] | +| **billing_end_date** | **Time** | Date and time (in ISO 8601 format) for termination point of a billing cycle, signifying the end of charges for a service or subscription. | [optional] | +| **statement_number** | **String** | Alphanumeric string identifying the statement number. | [optional] | +| **currency_code** | **String** | Three-letter code representing a specific currency used for financial transactions. | [optional] | +| **monthly_transaction_amount** | **Float** | Total billable amount for invoiced services charged within a single month. | [optional] | +| **transaction_line_items** | [**Array<Invoicelineitems>**](Invoicelineitems.md) | | [optional] | + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + diff --git a/docs/Invoicelineitems.md b/docs/Invoicelineitems.md new file mode 100644 index 00000000..8f46e4f5 --- /dev/null +++ b/docs/Invoicelineitems.md @@ -0,0 +1,18 @@ +# Fastly::Invoicelineitems + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **description** | **String** | Invoice line item transaction name. | [optional] | +| **amount** | **Float** | Billed amount for line item. | [optional] | +| **credit_coupon_code** | **String** | Discount coupon associated with the invoice for any account or service credits. | [optional] | +| **rate** | **Float** | Price per unit. | [optional] | +| **units** | **Float** | Total number of units of usage. | [optional] | +| **product_name** | **String** | The name of the product. | [optional] | +| **product_group** | **String** | The broader classification of the product (e.g., `Compute` or `Full-Site Delivery`). | [optional] | +| **region** | **String** | The geographical area applicable for regionally based products. | [optional] | +| **usage_type** | **String** | The unit of measure (e.g., `requests` or `bandwidth`). | [optional] | + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + diff --git a/docs/KvStoreApi.md b/docs/KvStoreApi.md index e8fadb34..ba6d2d0e 100644 --- a/docs/KvStoreApi.md +++ b/docs/KvStoreApi.md @@ -159,7 +159,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **cursor** | **String** | | [optional] | -| **limit** | **Integer** | | [optional][default to 100] | +| **limit** | **Integer** | | [optional][default to 1000] | ### Return type diff --git a/docs/ListInvoicesResponse.md b/docs/ListInvoicesResponse.md new file mode 100644 index 00000000..ca6fe963 --- /dev/null +++ b/docs/ListInvoicesResponse.md @@ -0,0 +1,11 @@ +# Fastly::ListInvoicesResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **data** | [**Array<Invoice>**](Invoice.md) | | [optional] | +| **meta** | [**Metadata**](Metadata.md) | | [optional] | + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + diff --git a/docs/Listinvoices.md b/docs/Listinvoices.md new file mode 100644 index 00000000..0012a9ef --- /dev/null +++ b/docs/Listinvoices.md @@ -0,0 +1,11 @@ +# Fastly::Listinvoices + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **data** | [**Array<Invoice>**](Invoice.md) | | [optional] | +| **meta** | [**Metadata**](Metadata.md) | | [optional] | + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + diff --git a/docs/LoggingScalyrAdditional.md b/docs/LoggingScalyrAdditional.md index 6b736529..38596abf 100644 --- a/docs/LoggingScalyrAdditional.md +++ b/docs/LoggingScalyrAdditional.md @@ -5,7 +5,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **region** | **String** | The region that log data will be sent to. | [optional][default to 'US'] | -| **token** | **String** | The token to use for authentication ([https://www.scalyr.com/keys](https://www.scalyr.com/keys)). | [optional] | +| **token** | **String** | The token to use for authentication. | [optional] | | **project_id** | **String** | The name of the logfile within Scalyr. | [optional][default to 'logplex'] | [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/LoggingScalyrApi.md b/docs/LoggingScalyrApi.md index 216a32f2..8e113590 100644 --- a/docs/LoggingScalyrApi.md +++ b/docs/LoggingScalyrApi.md @@ -38,7 +38,7 @@ opts = { format: 'format_example', # String | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). format_version: 1, # Integer | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. region: 'US', # String | The region that log data will be sent to. - token: 'token_example', # String | The token to use for authentication ([https://www.scalyr.com/keys](https://www.scalyr.com/keys)). + token: 'token_example', # String | The token to use for authentication. project_id: 'project_id_example', # String | The name of the logfile within Scalyr. } @@ -63,7 +63,7 @@ end | **format** | **String** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional][default to '%h %l %u %t \"%r\" %&gt;s %b'] | | **format_version** | **Integer** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional][default to FORMAT_VERSION::v2] | | **region** | **String** | The region that log data will be sent to. | [optional][default to 'US'] | -| **token** | **String** | The token to use for authentication ([https://www.scalyr.com/keys](https://www.scalyr.com/keys)). | [optional] | +| **token** | **String** | The token to use for authentication. | [optional] | | **project_id** | **String** | The name of the logfile within Scalyr. | [optional][default to 'logplex'] | ### Return type @@ -215,7 +215,7 @@ opts = { format: 'format_example', # String | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). format_version: 1, # Integer | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. region: 'US', # String | The region that log data will be sent to. - token: 'token_example', # String | The token to use for authentication ([https://www.scalyr.com/keys](https://www.scalyr.com/keys)). + token: 'token_example', # String | The token to use for authentication. project_id: 'project_id_example', # String | The name of the logfile within Scalyr. } @@ -241,7 +241,7 @@ end | **format** | **String** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional][default to '%h %l %u %t \"%r\" %&gt;s %b'] | | **format_version** | **Integer** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional][default to FORMAT_VERSION::v2] | | **region** | **String** | The region that log data will be sent to. | [optional][default to 'US'] | -| **token** | **String** | The token to use for authentication ([https://www.scalyr.com/keys](https://www.scalyr.com/keys)). | [optional] | +| **token** | **String** | The token to use for authentication. | [optional] | | **project_id** | **String** | The name of the logfile within Scalyr. | [optional][default to 'logplex'] | ### Return type diff --git a/docs/LoggingScalyrResponse.md b/docs/LoggingScalyrResponse.md index 8938c522..36068d22 100644 --- a/docs/LoggingScalyrResponse.md +++ b/docs/LoggingScalyrResponse.md @@ -10,7 +10,7 @@ | **format** | **String** | A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). | [optional][default to '%h %l %u %t \"%r\" %&gt;s %b'] | | **format_version** | **String** | The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. | [optional][default to '2'] | | **region** | **String** | The region that log data will be sent to. | [optional][default to 'US'] | -| **token** | **String** | The token to use for authentication ([https://www.scalyr.com/keys](https://www.scalyr.com/keys)). | [optional] | +| **token** | **String** | The token to use for authentication. | [optional] | | **project_id** | **String** | The name of the logfile within Scalyr. | [optional][default to 'logplex'] | | **created_at** | **Time** | Date and time in ISO 8601 format. | [optional][readonly] | | **deleted_at** | **Time** | Date and time in ISO 8601 format. | [optional][readonly] | diff --git a/docs/Metadata.md b/docs/Metadata.md new file mode 100644 index 00000000..59db9466 --- /dev/null +++ b/docs/Metadata.md @@ -0,0 +1,13 @@ +# Fastly::Metadata + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **next_cursor** | **String** | The token used to request the next set of results. | [optional] | +| **limit** | **Integer** | The number of invoices included in the response. | [optional] | +| **sort** | **String** | The sort order of the invoices in the response. | [optional][default to 'billing_start_date'] | +| **total** | **Integer** | Total number of records available on the backend. | [optional] | + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + diff --git a/docs/OriginInspectorHistoricalApi.md b/docs/OriginInspectorHistoricalApi.md index 1afff5df..c3535803 100644 --- a/docs/OriginInspectorHistoricalApi.md +++ b/docs/OriginInspectorHistoricalApi.md @@ -30,10 +30,10 @@ opts = { start: '2021-08-01T00:00:00.000Z', # String | A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `downsample` value. _end: '2020-08-02T00:00:00.000Z', # String | A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `downsample` value. downsample: 'hour', # String | Duration of sample windows. - metric: 'resp_body_bytes,status_2xx', # String | The metric to retrieve. Up to ten comma-separated metrics are accepted. + metric: 'resp_body_bytes,status_2xx', # String | The metrics to retrieve. Multiple values should be comma-separated. group_by: 'host', # String | Dimensions to return in the query. Multiple dimensions may be separated by commas. For example, `group_by=host` will return one timeseries for every origin host, as a total across all POPs. limit: 'limit_example', # String | Number of results per page. The maximum is 200. - cursor: 'cursor_example', # String | Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. + cursor: 'cursor_example', # String | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. region: 'usa', # String | Limit query to one or more specific geographic regions. Values should be comma-separated. datacenter: 'SJC,STP', # String | Limit query to one or more specific POPs. Values should be comma-separated. host: 'origin_1,origin_2', # String | Limit query to one or more specific origin hosts. Values should be comma-separated. @@ -56,10 +56,10 @@ end | **start** | **String** | A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `downsample` value. | [optional] | | **_end** | **String** | A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `downsample` value. | [optional] | | **downsample** | **String** | Duration of sample windows. | [optional][default to 'hour'] | -| **metric** | **String** | The metric to retrieve. Up to ten comma-separated metrics are accepted. | [optional][default to 'responses'] | +| **metric** | **String** | The metrics to retrieve. Multiple values should be comma-separated. | [optional][default to 'responses'] | | **group_by** | **String** | Dimensions to return in the query. Multiple dimensions may be separated by commas. For example, `group_by=host` will return one timeseries for every origin host, as a total across all POPs. | [optional] | | **limit** | **String** | Number of results per page. The maximum is 200. | [optional][default to '100'] | -| **cursor** | **String** | Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. | [optional] | +| **cursor** | **String** | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. | [optional] | | **region** | **String** | Limit query to one or more specific geographic regions. Values should be comma-separated. | [optional] | | **datacenter** | **String** | Limit query to one or more specific POPs. Values should be comma-separated. | [optional] | | **host** | **String** | Limit query to one or more specific origin hosts. Values should be comma-separated. | [optional] | diff --git a/docs/OriginInspectorRealtimeEntry.md b/docs/OriginInspectorRealtimeEntry.md index a84f669b..dcc6ee20 100644 --- a/docs/OriginInspectorRealtimeEntry.md +++ b/docs/OriginInspectorRealtimeEntry.md @@ -6,7 +6,7 @@ | ---- | ---- | ----------- | ----- | | **recorded** | [**OriginInspectorRealtimeEntryRecorded**](OriginInspectorRealtimeEntryRecorded.md) | | [optional] | | **aggregated** | [**Hash<String, OriginInspectorMeasurements>**](OriginInspectorMeasurements.md) | Groups [measurements](#measurements-data-model) by backend name. | [optional] | -| **datacenter** | **Hash<String, Hash<String, OriginInspectorMeasurements>>** | Groups [measurements](#measurements-data-model) by POP, then backend name. See the [POPs API](/reference/api/utils/pops/) for details about POP identifiers. | [optional] | +| **datacenter** | **Hash<String, Hash<String, OriginInspectorMeasurements>>** | Groups [measurements](#measurements-data-model) by POP, then backend name. See the [POPs API](https://www.fastly.com/documentation/reference/api/utils/pops/) for details about POP identifiers. | [optional] | [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/PoolAdditional.md b/docs/PoolAdditional.md index 9d406964..ee84f9ae 100644 --- a/docs/PoolAdditional.md +++ b/docs/PoolAdditional.md @@ -5,7 +5,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **name** | **String** | Name for the Pool. | [optional] | -| **shield** | **String** | Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. | [optional][default to 'null'] | +| **shield** | **String** | Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. | [optional][default to 'null'] | | **request_condition** | **String** | Condition which, if met, will select this configuration during a request. Optional. | [optional] | | **tls_ciphers** | **String** | List of OpenSSL ciphers (see the [openssl.org manpages](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) for details). Optional. | [optional] | | **tls_sni_hostname** | **String** | SNI hostname. Optional. | [optional] | diff --git a/docs/PoolApi.md b/docs/PoolApi.md index 13555dde..64447e61 100644 --- a/docs/PoolApi.md +++ b/docs/PoolApi.md @@ -43,7 +43,7 @@ opts = { service_id: 'service_id_example', # String | version: 'version_example', # String | name: 'name_example', # String | Name for the Pool. - shield: 'shield_example', # String | Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. + shield: 'shield_example', # String | Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. request_condition: 'request_condition_example', # String | Condition which, if met, will select this configuration during a request. Optional. tls_ciphers: 'tls_ciphers_example', # String | List of OpenSSL ciphers (see the [openssl.org manpages](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) for details). Optional. tls_sni_hostname: 'tls_sni_hostname_example', # String | SNI hostname. Optional. @@ -87,7 +87,7 @@ end | **service_id** | **String** | | [optional] | | **version** | **String** | | [optional] | | **name** | **String** | Name for the Pool. | [optional] | -| **shield** | **String** | Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. | [optional][default to 'null'] | +| **shield** | **String** | Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. | [optional][default to 'null'] | | **request_condition** | **String** | Condition which, if met, will select this configuration during a request. Optional. | [optional] | | **tls_ciphers** | **String** | List of OpenSSL ciphers (see the [openssl.org manpages](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) for details). Optional. | [optional] | | **tls_sni_hostname** | **String** | SNI hostname. Optional. | [optional] | @@ -258,7 +258,7 @@ opts = { service_id: 'service_id_example', # String | version: 'version_example', # String | name: 'name_example', # String | Name for the Pool. - shield: 'shield_example', # String | Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. + shield: 'shield_example', # String | Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. request_condition: 'request_condition_example', # String | Condition which, if met, will select this configuration during a request. Optional. tls_ciphers: 'tls_ciphers_example', # String | List of OpenSSL ciphers (see the [openssl.org manpages](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) for details). Optional. tls_sni_hostname: 'tls_sni_hostname_example', # String | SNI hostname. Optional. @@ -303,7 +303,7 @@ end | **service_id** | **String** | | [optional] | | **version** | **String** | | [optional] | | **name** | **String** | Name for the Pool. | [optional] | -| **shield** | **String** | Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. | [optional][default to 'null'] | +| **shield** | **String** | Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. | [optional][default to 'null'] | | **request_condition** | **String** | Condition which, if met, will select this configuration during a request. Optional. | [optional] | | **tls_ciphers** | **String** | List of OpenSSL ciphers (see the [openssl.org manpages](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) for details). Optional. | [optional] | | **tls_sni_hostname** | **String** | SNI hostname. Optional. | [optional] | diff --git a/docs/PoolResponse.md b/docs/PoolResponse.md index 88f05e4e..61998e17 100644 --- a/docs/PoolResponse.md +++ b/docs/PoolResponse.md @@ -15,7 +15,7 @@ | **service_id** | **String** | | [optional][readonly] | | **version** | **String** | | [optional][readonly] | | **name** | **String** | Name for the Pool. | [optional] | -| **shield** | **String** | Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. | [optional][default to 'null'] | +| **shield** | **String** | Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. | [optional][default to 'null'] | | **request_condition** | **String** | Condition which, if met, will select this configuration during a request. Optional. | [optional] | | **tls_ciphers** | **String** | List of OpenSSL ciphers (see the [openssl.org manpages](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) for details). Optional. | [optional] | | **tls_sni_hostname** | **String** | SNI hostname. Optional. | [optional] | diff --git a/docs/PoolResponsePost.md b/docs/PoolResponsePost.md index 30b80ac1..5c780553 100644 --- a/docs/PoolResponsePost.md +++ b/docs/PoolResponsePost.md @@ -15,7 +15,7 @@ | **service_id** | **String** | | [optional][readonly] | | **version** | **String** | | [optional][readonly] | | **name** | **String** | Name for the Pool. | [optional] | -| **shield** | **String** | Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. | [optional][default to 'null'] | +| **shield** | **String** | Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. | [optional][default to 'null'] | | **request_condition** | **String** | Condition which, if met, will select this configuration during a request. Optional. | [optional] | | **tls_ciphers** | **String** | List of OpenSSL ciphers (see the [openssl.org manpages](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) for details). Optional. | [optional] | | **tls_sni_hostname** | **String** | SNI hostname. Optional. | [optional] | diff --git a/docs/Pop.md b/docs/Pop.md index 959346d2..1493866a 100644 --- a/docs/Pop.md +++ b/docs/Pop.md @@ -4,14 +4,14 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **code** | **String** | the three-letter code for the [POP](https://developer.fastly.com/learning/concepts/pop/) | | +| **code** | **String** | the three-letter code for the [POP](https://www.fastly.com/documentation/learning/concepts/pop/) | | | **name** | **String** | the name of the POP | | | **group** | **String** | | | | **region** | **String** | | | | **stats_region** | **String** | the region used for stats reporting | | | **billing_region** | **String** | the region used for billing | | | **coordinates** | [**PopCoordinates**](PopCoordinates.md) | | [optional] | -| **shield** | **String** | the name of the [shield code](https://developer.fastly.com/learning/concepts/shielding/#choosing-a-shield-location) if this POP is suitable for shielding | [optional] | +| **shield** | **String** | the name of the [shield code](https://www.fastly.com/documentation/learning/concepts/shielding/#choosing-a-shield-location) if this POP is suitable for shielding | [optional] | [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/PublishApi.md b/docs/PublishApi.md index 80102ec4..a59702b5 100644 --- a/docs/PublishApi.md +++ b/docs/PublishApi.md @@ -19,7 +19,7 @@ api_instance = Fastly::PublishApi.new publish(opts): String # Send messages to Fanout subscribers ``` -Send one or more messages to [Fanout](https://developer.fastly.com/learning/concepts/real-time-messaging/fanout) subscribers. Each message specifies a channel, and Fanout will deliver the message to all subscribers of its channel. > **IMPORTANT:** For compatibility with GRIP, this endpoint requires a trailing slash, and the API token may be provided in the `Authorization` header (instead of the `Fastly-Key` header) using the `Bearer` scheme. +Send one or more messages to [Fanout](https://www.fastly.com/documentation/learning/concepts/real-time-messaging/fanout) subscribers. Each message specifies a channel, and Fanout will deliver the message to all subscribers of its channel. > **IMPORTANT:** For compatibility with GRIP, this endpoint requires a trailing slash, and the API token may be provided in the `Authorization` header (instead of the `Fastly-Key` header) using the `Bearer` scheme. ### Examples diff --git a/docs/RealtimeEntry.md b/docs/RealtimeEntry.md index a64ec22e..b2a8cc87 100644 --- a/docs/RealtimeEntry.md +++ b/docs/RealtimeEntry.md @@ -6,7 +6,7 @@ | ---- | ---- | ----------- | ----- | | **recorded** | [**RealtimeEntryRecorded**](RealtimeEntryRecorded.md) | | [optional] | | **aggregated** | [**RealtimeEntryAggregated**](RealtimeEntryAggregated.md) | | [optional] | -| **datacenter** | [**Hash<String, RealtimeMeasurements>**](RealtimeMeasurements.md) | Groups [measurements](#measurements-data-model) by POP. See the [POPs API](/reference/api/utils/pops/) for details of POP identifiers. | [optional] | +| **datacenter** | [**Hash<String, RealtimeMeasurements>**](RealtimeMeasurements.md) | Groups [measurements](#measurements-data-model) by POP. See the [POPs API](https://www.fastly.com/documentation/reference/api/utils/pops/) for details of POP identifiers. | [optional] | [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Results.md b/docs/Results.md index aefae310..f164da15 100644 --- a/docs/Results.md +++ b/docs/Results.md @@ -83,8 +83,10 @@ | **imgopto** | **Integer** | Number of responses that came from the Fastly Image Optimizer service. If the service receives 10 requests for an image, this stat will be 10 regardless of how many times the image was transformed. | [optional] | | **imgopto_resp_body_bytes** | **Integer** | Total body bytes delivered from the Fastly Image Optimizer service, including shield traffic. | [optional] | | **imgopto_resp_header_bytes** | **Integer** | Total header bytes delivered from the Fastly Image Optimizer service, including shield traffic. | [optional] | +| **imgopto_shield** | **Integer** | Number of responses that came from the Fastly Image Optimizer service via a shield. | [optional] | | **imgopto_shield_resp_body_bytes** | **Integer** | Total body bytes delivered via a shield from the Fastly Image Optimizer service. | [optional] | | **imgopto_shield_resp_header_bytes** | **Integer** | Total header bytes delivered via a shield from the Fastly Image Optimizer service. | [optional] | +| **imgopto_transforms** | **Integer** | Number of transforms performed by the Fastly Image Optimizer service. | [optional] | | **imgvideo** | **Integer** | Number of video responses that came from the Fastly Image Optimizer service. | [optional] | | **imgvideo_frames** | **Integer** | Number of video frames that came from the Fastly Image Optimizer service. A video frame is an individual image within a sequence of video. | [optional] | | **imgvideo_resp_header_bytes** | **Integer** | Total header bytes of video delivered from the Fastly Image Optimizer service. | [optional] | diff --git a/docs/SecretStoreApi.md b/docs/SecretStoreApi.md index 35b80b0f..5d599948 100644 --- a/docs/SecretStoreApi.md +++ b/docs/SecretStoreApi.md @@ -173,8 +173,9 @@ Get all secret stores. ```ruby api_instance = Fastly::SecretStoreApi.new opts = { - cursor: 'cursor_example', # String | Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. + cursor: 'cursor_example', # String | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. limit: 'limit_example', # String | Number of results per page. The maximum is 200. + name: 'name_example', # String | Returns a one-element array containing the details for the named secret store. } begin @@ -190,8 +191,9 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **cursor** | **String** | Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. | [optional] | +| **cursor** | **String** | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. | [optional] | | **limit** | **String** | Number of results per page. The maximum is 200. | [optional][default to '100'] | +| **name** | **String** | Returns a one-element array containing the details for the named secret store. | [optional] | ### Return type diff --git a/docs/SecretStoreItemApi.md b/docs/SecretStoreItemApi.md index c5fce1ad..f0a133ae 100644 --- a/docs/SecretStoreItemApi.md +++ b/docs/SecretStoreItemApi.md @@ -148,7 +148,7 @@ List all secrets within a store. api_instance = Fastly::SecretStoreItemApi.new opts = { store_id: 'store_id_example', # String | - cursor: 'cursor_example', # String | Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. + cursor: 'cursor_example', # String | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. limit: 'limit_example', # String | Number of results per page. The maximum is 200. } @@ -166,7 +166,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **store_id** | **String** | | | -| **cursor** | **String** | Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. | [optional] | +| **cursor** | **String** | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. | [optional] | | **limit** | **String** | Number of results per page. The maximum is 200. | [optional][default to '100'] | ### Return type diff --git a/docs/ServiceDetail.md b/docs/ServiceDetail.md index 285e191d..18e965f8 100644 --- a/docs/ServiceDetail.md +++ b/docs/ServiceDetail.md @@ -14,7 +14,7 @@ | **id** | **String** | | [optional][readonly] | | **publish_key** | **String** | Unused at this time. | [optional] | | **paused** | **Boolean** | Whether the service is paused. Services are paused due to a lack of traffic for an extended period of time. Services are resumed either when a draft version is activated or a locked version is cloned and reactivated. | [optional] | -| **versions** | [**Array<SchemasVersionResponse>**](SchemasVersionResponse.md) | A list of [versions](/reference/api/services/version/) associated with the service. | [optional] | +| **versions** | [**Array<SchemasVersionResponse>**](SchemasVersionResponse.md) | A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service. | [optional] | | **active_version** | [**ServiceVersionDetailOrNull**](ServiceVersionDetailOrNull.md) | | [optional] | | **version** | [**ServiceVersionDetail**](ServiceVersionDetail.md) | | [optional] | diff --git a/docs/ServiceListResponse.md b/docs/ServiceListResponse.md index 832f3cc5..f6d0eea1 100644 --- a/docs/ServiceListResponse.md +++ b/docs/ServiceListResponse.md @@ -12,8 +12,8 @@ | **customer_id** | **String** | Alphanumeric string identifying the customer. | [optional] | | **type** | **String** | The type of this service. | [optional] | | **id** | **String** | | [optional][readonly] | -| **version** | **Integer** | Current [version](/reference/api/services/version/) of the service. | [optional] | -| **versions** | [**Array<SchemasVersionResponse>**](SchemasVersionResponse.md) | A list of [versions](/reference/api/services/version/) associated with the service. | [optional] | +| **version** | **Integer** | Current [version](https://www.fastly.com/documentation/reference/api/services/version/) of the service. | [optional] | +| **versions** | [**Array<SchemasVersionResponse>**](SchemasVersionResponse.md) | A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service. | [optional] | [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/ServiceListResponseAllOf.md b/docs/ServiceListResponseAllOf.md index 157ec9e9..fec375f1 100644 --- a/docs/ServiceListResponseAllOf.md +++ b/docs/ServiceListResponseAllOf.md @@ -5,8 +5,8 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | | [optional][readonly] | -| **version** | **Integer** | Current [version](/reference/api/services/version/) of the service. | [optional] | -| **versions** | [**Array<SchemasVersionResponse>**](SchemasVersionResponse.md) | A list of [versions](/reference/api/services/version/) associated with the service. | [optional] | +| **version** | **Integer** | Current [version](https://www.fastly.com/documentation/reference/api/services/version/) of the service. | [optional] | +| **versions** | [**Array<SchemasVersionResponse>**](SchemasVersionResponse.md) | A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service. | [optional] | [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/ServiceResponse.md b/docs/ServiceResponse.md index 59852c4e..83061884 100644 --- a/docs/ServiceResponse.md +++ b/docs/ServiceResponse.md @@ -14,7 +14,7 @@ | **id** | **String** | | [optional][readonly] | | **publish_key** | **String** | Unused at this time. | [optional] | | **paused** | **Boolean** | Whether the service is paused. Services are paused due to a lack of traffic for an extended period of time. Services are resumed either when a draft version is activated or a locked version is cloned and reactivated. | [optional] | -| **versions** | [**Array<SchemasVersionResponse>**](SchemasVersionResponse.md) | A list of [versions](/reference/api/services/version/) associated with the service. | [optional] | +| **versions** | [**Array<SchemasVersionResponse>**](SchemasVersionResponse.md) | A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service. | [optional] | [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/ServiceResponseAllOf.md b/docs/ServiceResponseAllOf.md index 839013eb..3b1388e2 100644 --- a/docs/ServiceResponseAllOf.md +++ b/docs/ServiceResponseAllOf.md @@ -7,7 +7,7 @@ | **id** | **String** | | [optional][readonly] | | **publish_key** | **String** | Unused at this time. | [optional] | | **paused** | **Boolean** | Whether the service is paused. Services are paused due to a lack of traffic for an extended period of time. Services are resumed either when a draft version is activated or a locked version is cloned and reactivated. | [optional] | -| **versions** | [**Array<SchemasVersionResponse>**](SchemasVersionResponse.md) | A list of [versions](/reference/api/services/version/) associated with the service. | [optional] | +| **versions** | [**Array<SchemasVersionResponse>**](SchemasVersionResponse.md) | A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service. | [optional] | [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/TlsConfigurationResponseAttributes.md b/docs/TlsConfigurationResponseAttributes.md index 783f2ac9..7775f8e6 100644 --- a/docs/TlsConfigurationResponseAttributes.md +++ b/docs/TlsConfigurationResponseAttributes.md @@ -7,7 +7,7 @@ | **created_at** | **Time** | Date and time in ISO 8601 format. | [optional][readonly] | | **deleted_at** | **Time** | Date and time in ISO 8601 format. | [optional][readonly] | | **updated_at** | **Time** | Date and time in ISO 8601 format. | [optional][readonly] | -| **default** | **Boolean** | Signifies whether or not Fastly will use this configuration as a default when creating a new [TLS Activation](/reference/api/tls/custom-certs/activations/). | [optional][readonly] | +| **default** | **Boolean** | Signifies whether or not Fastly will use this configuration as a default when creating a new [TLS Activation](https://www.fastly.com/documentation/reference/api/tls/custom-certs/activations/). | [optional][readonly] | | **http_protocols** | **Array<String>** | HTTP protocols available on your configuration. | [optional][readonly] | | **tls_protocols** | **Array<String>** | TLS protocols available on your configuration. | [optional][readonly] | | **bulk** | **Boolean** | Signifies whether the configuration is used for Platform TLS or not. | [optional][readonly] | diff --git a/docs/TlsConfigurationResponseAttributesAllOf.md b/docs/TlsConfigurationResponseAttributesAllOf.md index ae68a6ae..bf31548c 100644 --- a/docs/TlsConfigurationResponseAttributesAllOf.md +++ b/docs/TlsConfigurationResponseAttributesAllOf.md @@ -4,7 +4,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **default** | **Boolean** | Signifies whether or not Fastly will use this configuration as a default when creating a new [TLS Activation](/reference/api/tls/custom-certs/activations/). | [optional][readonly] | +| **default** | **Boolean** | Signifies whether or not Fastly will use this configuration as a default when creating a new [TLS Activation](https://www.fastly.com/documentation/reference/api/tls/custom-certs/activations/). | [optional][readonly] | | **http_protocols** | **Array<String>** | HTTP protocols available on your configuration. | [optional][readonly] | | **tls_protocols** | **Array<String>** | TLS protocols available on your configuration. | [optional][readonly] | | **bulk** | **Boolean** | Signifies whether the configuration is used for Platform TLS or not. | [optional][readonly] | diff --git a/docs/TlsCsr.md b/docs/TlsCsr.md new file mode 100644 index 00000000..0c5d8346 --- /dev/null +++ b/docs/TlsCsr.md @@ -0,0 +1,10 @@ +# Fastly::TlsCsr + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **data** | [**TlsCsrData**](TlsCsrData.md) | | [optional] | + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + diff --git a/docs/TlsCsrData.md b/docs/TlsCsrData.md new file mode 100644 index 00000000..9f38b33b --- /dev/null +++ b/docs/TlsCsrData.md @@ -0,0 +1,12 @@ +# Fastly::TlsCsrData + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **type** | [**TypeTlsCsr**](TypeTlsCsr.md) | | [optional][default to 'csr'] | +| **attributes** | [**TlsCsrDataAttributes**](TlsCsrDataAttributes.md) | | [optional] | +| **relationships** | [**RelationshipTlsPrivateKey**](RelationshipTlsPrivateKey.md) | | [optional] | + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + diff --git a/docs/TlsCsrDataAttributes.md b/docs/TlsCsrDataAttributes.md new file mode 100644 index 00000000..e29fcdc8 --- /dev/null +++ b/docs/TlsCsrDataAttributes.md @@ -0,0 +1,20 @@ +# Fastly::TlsCsrDataAttributes + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **sans** | **Array<String>** | Subject Alternate Names - An array of one or more fully qualified domain names or public IP addresses to be secured by this certificate. Required. | | +| **common_name** | **String** | Common Name (CN) - The fully qualified domain name (FQDN) to be secured by this certificate. The common name should be one of the entries in the SANs parameter. | [optional] | +| **country** | **String** | Country (C) - The two-letter ISO country code where the organization is located. | [optional] | +| **state** | **String** | State (S) - The state, province, region, or county where the organization is located. This should not be abbreviated. | [optional] | +| **city** | **String** | Locality (L) - The locality, city, town, or village where the organization is located. | [optional] | +| **postal_code** | **String** | Postal Code - The postal code where the organization is located. | [optional] | +| **street_address** | **String** | Street Address - The street address where the organization is located. | [optional] | +| **organization** | **String** | Organization (O) - The legal name of the organization, including any suffixes. This should not be abbreviated. | [optional] | +| **organizational_unit** | **String** | Organizational Unit (OU) - The internal division of the organization managing the certificate. | [optional] | +| **email** | **String** | Email Address (EMAIL) - The organizational contact for this. | [optional] | +| **key_type** | **String** | CSR Key Type. | [optional] | + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + diff --git a/docs/TlsCsrErrorResponse.md b/docs/TlsCsrErrorResponse.md new file mode 100644 index 00000000..99b5d31d --- /dev/null +++ b/docs/TlsCsrErrorResponse.md @@ -0,0 +1,10 @@ +# Fastly::TlsCsrErrorResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<ErrorResponseData>**](ErrorResponseData.md) | | [optional] | + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + diff --git a/docs/TlsCsrResponse.md b/docs/TlsCsrResponse.md new file mode 100644 index 00000000..3d869c72 --- /dev/null +++ b/docs/TlsCsrResponse.md @@ -0,0 +1,10 @@ +# Fastly::TlsCsrResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **data** | [**TlsCsrResponseData**](TlsCsrResponseData.md) | | [optional] | + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + diff --git a/docs/TlsCsrResponseAttributes.md b/docs/TlsCsrResponseAttributes.md new file mode 100644 index 00000000..12d25583 --- /dev/null +++ b/docs/TlsCsrResponseAttributes.md @@ -0,0 +1,10 @@ +# Fastly::TlsCsrResponseAttributes + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **content** | **String** | The PEM encoded CSR. | [optional] | + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + diff --git a/docs/TlsCsrResponseData.md b/docs/TlsCsrResponseData.md new file mode 100644 index 00000000..9f6c2ed5 --- /dev/null +++ b/docs/TlsCsrResponseData.md @@ -0,0 +1,13 @@ +# Fastly::TlsCsrResponseData + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | | [optional] | +| **type** | [**TypeTlsCsr**](TypeTlsCsr.md) | | [optional][default to 'csr'] | +| **attributes** | [**TlsCsrResponseAttributes**](TlsCsrResponseAttributes.md) | | [optional] | +| **relationships** | [**RelationshipTlsPrivateKey**](RelationshipTlsPrivateKey.md) | | [optional] | + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + diff --git a/docs/TlsCsrsApi.md b/docs/TlsCsrsApi.md new file mode 100644 index 00000000..f9b55c29 --- /dev/null +++ b/docs/TlsCsrsApi.md @@ -0,0 +1,52 @@ +# Fastly::TlsCsrsApi + + +```ruby +require 'fastly' +api_instance = Fastly::TlsCsrsApi.new +``` + +## Methods + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**create_csr**](TlsCsrsApi.md#create_csr) | **POST** /tls/certificate_signing_requests | Create CSR | + + +## `create_csr()` + +```ruby +create_csr(opts): # Create CSR +``` + +Creates a certificate signing request (CSR). + +### Examples + +```ruby +api_instance = Fastly::TlsCsrsApi.new +opts = { + tls_csr: Fastly::TlsCsr.new, # TlsCsr | +} + +begin + # Create CSR + result = api_instance.create_csr(opts) + p result +rescue Fastly::ApiError => e + puts "Error when calling TlsCsrsApi->create_csr: #{e}" +end +``` + +### Options + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **tls_csr** | [**TlsCsr**](TlsCsr.md) | | [optional] | + +### Return type + +[**TlsCsrResponse**](TlsCsrResponse.md) + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to README]](../../README.md) diff --git a/docs/TlsSubscriptionResponseAttributes.md b/docs/TlsSubscriptionResponseAttributes.md index faf3eccf..31c6897f 100644 --- a/docs/TlsSubscriptionResponseAttributes.md +++ b/docs/TlsSubscriptionResponseAttributes.md @@ -8,6 +8,7 @@ | **deleted_at** | **Time** | Date and time in ISO 8601 format. | [optional][readonly] | | **updated_at** | **Time** | Date and time in ISO 8601 format. | [optional][readonly] | | **state** | **String** | The current state of your subscription. | [optional] | +| **has_active_order** | **Boolean** | Subscription has an active order | [optional] | [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/TlsSubscriptionResponseAttributesAllOf.md b/docs/TlsSubscriptionResponseAttributesAllOf.md index b123c34e..f30a44f2 100644 --- a/docs/TlsSubscriptionResponseAttributesAllOf.md +++ b/docs/TlsSubscriptionResponseAttributesAllOf.md @@ -5,6 +5,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **state** | **String** | The current state of your subscription. | [optional] | +| **has_active_order** | **Boolean** | Subscription has an active order | [optional] | [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/TokensApi.md b/docs/TokensApi.md index 85bc593c..b8ca627d 100644 --- a/docs/TokensApi.md +++ b/docs/TokensApi.md @@ -62,7 +62,7 @@ nil (empty response body) create_token: # Create a token ``` -Create an API token. If two-factor authentication is enabled for your account, review [the instructions](/reference/api/auth-tokens/user/) for including a one-time password in the request. +Create an API token. If two-factor authentication is enabled for your account, review [the instructions](https://www.fastly.com/documentation/reference/api/auth-tokens/user/) for including a one-time password in the request. ### Examples diff --git a/docs/TypeTlsCsr.md b/docs/TypeTlsCsr.md new file mode 100644 index 00000000..4ba2160a --- /dev/null +++ b/docs/TypeTlsCsr.md @@ -0,0 +1,9 @@ +# Fastly::TypeTlsCsr + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | + +[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) + diff --git a/docs/VclApi.md b/docs/VclApi.md index ebd57d05..9ba8f03a 100644 --- a/docs/VclApi.md +++ b/docs/VclApi.md @@ -160,7 +160,7 @@ end get_custom_vcl_boilerplate(opts): String # Get boilerplate VCL ``` -Return boilerplate VCL with the service's TTL from the [settings](/reference/api/vcl-services/settings/). +Return boilerplate VCL with the service's TTL from the [settings](https://www.fastly.com/documentation/reference/api/vcl-services/settings/). ### Examples diff --git a/docs/WafActiveRulesApi.md b/docs/WafActiveRulesApi.md index 65b0294e..dd0ab54d 100644 --- a/docs/WafActiveRulesApi.md +++ b/docs/WafActiveRulesApi.md @@ -66,7 +66,7 @@ nil (empty response body) bulk_update_waf_active_rules(opts) # Update multiple active rules ``` -Bulk update all active rules on a [firewall version](https://developer.fastly.com/reference/api/waf/firewall-version/). This endpoint will not add new active rules, only update existing active rules. +Bulk update all active rules on a [firewall version](https://www.fastly.com/documentation/reference/api/waf/firewall-version/). This endpoint will not add new active rules, only update existing active rules. ### Examples diff --git a/lib/fastly.rb b/lib/fastly.rb index 91c505d3..a0428c20 100644 --- a/lib/fastly.rb +++ b/lib/fastly.rb @@ -28,6 +28,7 @@ require 'fastly/models/automation_token_create_request_attributes' require 'fastly/models/automation_token_create_response' require 'fastly/models/automation_token_create_response_all_of' +require 'fastly/models/automation_token_error_response' require 'fastly/models/automation_token_response' require 'fastly/models/automation_token_response_all_of' require 'fastly/models/aws_region' @@ -105,7 +106,8 @@ require 'fastly/models/enabled_product_response_links' require 'fastly/models/enabled_product_response_product' require 'fastly/models/enabled_product_response_service' -require 'fastly/models/error_response' +require 'fastly/models/error' +require 'fastly/models/error_response_data' require 'fastly/models/event' require 'fastly/models/event_attributes' require 'fastly/models/event_data' @@ -183,6 +185,9 @@ require 'fastly/models/invitation_response_data_all_of' require 'fastly/models/invitations_response' require 'fastly/models/invitations_response_all_of' +require 'fastly/models/invoice' +require 'fastly/models/invoice_response' +require 'fastly/models/invoicelineitems' require 'fastly/models/legacy_waf_configuration_set' require 'fastly/models/legacy_waf_firewall' require 'fastly/models/legacy_waf_owasp' @@ -193,6 +198,8 @@ require 'fastly/models/legacy_waf_update_status' require 'fastly/models/line_item_data' require 'fastly/models/line_item_data_read_only_invoice_id' +require 'fastly/models/list_invoices_response' +require 'fastly/models/listinvoices' require 'fastly/models/logging_address_and_port' require 'fastly/models/logging_azureblob_additional' require 'fastly/models/logging_azureblob_response' @@ -266,6 +273,7 @@ require 'fastly/models/logging_syslog_response' require 'fastly/models/logging_tls_common' require 'fastly/models/logging_use_tls' +require 'fastly/models/metadata' require 'fastly/models/mutual_authentication' require 'fastly/models/mutual_authentication_data' require 'fastly/models/mutual_authentication_data_attributes' @@ -543,6 +551,13 @@ require 'fastly/models/tls_configuration_response_data_all_of' require 'fastly/models/tls_configurations_response' require 'fastly/models/tls_configurations_response_all_of' +require 'fastly/models/tls_csr' +require 'fastly/models/tls_csr_data' +require 'fastly/models/tls_csr_data_attributes' +require 'fastly/models/tls_csr_error_response' +require 'fastly/models/tls_csr_response' +require 'fastly/models/tls_csr_response_attributes' +require 'fastly/models/tls_csr_response_data' require 'fastly/models/tls_dns_record' require 'fastly/models/tls_domain_data' require 'fastly/models/tls_domains_response' @@ -586,6 +601,7 @@ require 'fastly/models/type_tls_bulk_certificate' require 'fastly/models/type_tls_certificate' require 'fastly/models/type_tls_configuration' +require 'fastly/models/type_tls_csr' require 'fastly/models/type_tls_dns_record' require 'fastly/models/type_tls_domain' require 'fastly/models/type_tls_private_key' @@ -692,6 +708,7 @@ require 'fastly/api/backend_api' require 'fastly/api/billing_api' require 'fastly/api/billing_address_api' +require 'fastly/api/billing_invoices_api' require 'fastly/api/cache_settings_api' require 'fastly/api/condition_api' require 'fastly/api/config_store_api' @@ -786,6 +803,7 @@ require 'fastly/api/tls_bulk_certificates_api' require 'fastly/api/tls_certificates_api' require 'fastly/api/tls_configurations_api' +require 'fastly/api/tls_csrs_api' require 'fastly/api/tls_domains_api' require 'fastly/api/tls_private_keys_api' require 'fastly/api/tls_subscriptions_api' diff --git a/lib/fastly/api/automation_tokens_api.rb b/lib/fastly/api/automation_tokens_api.rb index c38b537e..da65f4b8 100644 --- a/lib/fastly/api/automation_tokens_api.rb +++ b/lib/fastly/api/automation_tokens_api.rb @@ -277,7 +277,7 @@ def list_automation_tokens_with_http_info(opts = {}) # Revoke an Automation Token by ID # Revoke an automation token by ID. # @option opts [String] :id (required) - # @return [ErrorResponse] + # @return [AutomationTokenErrorResponse] def revoke_automation_token_id(opts = {}) data, _status_code, _headers = revoke_automation_token_id_with_http_info(opts) data @@ -286,7 +286,7 @@ def revoke_automation_token_id(opts = {}) # Revoke an Automation Token by ID # Revoke an automation token by ID. # @option opts [String] :id (required) - # @return [Array<(ErrorResponse, Integer, Hash)>] ErrorResponse data, response status code and response headers + # @return [Array<(AutomationTokenErrorResponse, Integer, Hash)>] AutomationTokenErrorResponse data, response status code and response headers def revoke_automation_token_id_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AutomationTokensApi.revoke_automation_token_id ...' @@ -315,7 +315,7 @@ def revoke_automation_token_id_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'ErrorResponse' + return_type = opts[:debug_return_type] || 'AutomationTokenErrorResponse' # auth_names auth_names = opts[:debug_auth_names] || ['token'] diff --git a/lib/fastly/api/backend_api.rb b/lib/fastly/api/backend_api.rb index 12ea8dd8..c59c93d9 100644 --- a/lib/fastly/api/backend_api.rb +++ b/lib/fastly/api/backend_api.rb @@ -45,7 +45,7 @@ def initialize(api_client = ApiClient.default) # @option opts [String] :ssl_ca_cert CA certificate attached to origin. # @option opts [String] :ssl_cert_hostname Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. # @option opts [Boolean] :ssl_check_cert Be strict on checking SSL certs. (default to true) - # @option opts [String] :ssl_ciphers List of [OpenSSL ciphers](https://www.openssl.org/docs/manmaster/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. + # @option opts [String] :ssl_ciphers List of [OpenSSL ciphers](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. # @option opts [String] :ssl_client_cert Client certificate attached to origin. # @option opts [String] :ssl_client_key Client key attached to origin. # @option opts [String] :ssl_hostname Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. @@ -86,7 +86,7 @@ def create_backend(opts = {}) # @option opts [String] :ssl_ca_cert CA certificate attached to origin. # @option opts [String] :ssl_cert_hostname Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. # @option opts [Boolean] :ssl_check_cert Be strict on checking SSL certs. (default to true) - # @option opts [String] :ssl_ciphers List of [OpenSSL ciphers](https://www.openssl.org/docs/manmaster/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. + # @option opts [String] :ssl_ciphers List of [OpenSSL ciphers](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. # @option opts [String] :ssl_client_cert Client certificate attached to origin. # @option opts [String] :ssl_client_key Client key attached to origin. # @option opts [String] :ssl_hostname Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. @@ -443,7 +443,7 @@ def list_backends_with_http_info(opts = {}) # @option opts [String] :ssl_ca_cert CA certificate attached to origin. # @option opts [String] :ssl_cert_hostname Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. # @option opts [Boolean] :ssl_check_cert Be strict on checking SSL certs. (default to true) - # @option opts [String] :ssl_ciphers List of [OpenSSL ciphers](https://www.openssl.org/docs/manmaster/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. + # @option opts [String] :ssl_ciphers List of [OpenSSL ciphers](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. # @option opts [String] :ssl_client_cert Client certificate attached to origin. # @option opts [String] :ssl_client_key Client key attached to origin. # @option opts [String] :ssl_hostname Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. @@ -485,7 +485,7 @@ def update_backend(opts = {}) # @option opts [String] :ssl_ca_cert CA certificate attached to origin. # @option opts [String] :ssl_cert_hostname Overrides `ssl_hostname`, but only for cert verification. Does not affect SNI at all. # @option opts [Boolean] :ssl_check_cert Be strict on checking SSL certs. (default to true) - # @option opts [String] :ssl_ciphers List of [OpenSSL ciphers](https://www.openssl.org/docs/manmaster/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. + # @option opts [String] :ssl_ciphers List of [OpenSSL ciphers](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. # @option opts [String] :ssl_client_cert Client certificate attached to origin. # @option opts [String] :ssl_client_key Client key attached to origin. # @option opts [String] :ssl_hostname Use `ssl_cert_hostname` and `ssl_sni_hostname` to configure certificate validation. diff --git a/lib/fastly/api/billing_invoices_api.rb b/lib/fastly/api/billing_invoices_api.rb new file mode 100644 index 00000000..e5de7474 --- /dev/null +++ b/lib/fastly/api/billing_invoices_api.rb @@ -0,0 +1,151 @@ +=begin +#Fastly API + +#Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'cgi' + +module Fastly + class BillingInvoicesApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Get invoice by ID. + # Returns invoice associated with the invoice id. + # @option opts [String] :invoice_id Alphanumeric string identifying the invoice. (required) + # @return [InvoiceResponse] + def get_invoice_by_invoice_id(opts = {}) + data, _status_code, _headers = get_invoice_by_invoice_id_with_http_info(opts) + data + end + + # Get invoice by ID. + # Returns invoice associated with the invoice id. + # @option opts [String] :invoice_id Alphanumeric string identifying the invoice. (required) + # @return [Array<(InvoiceResponse, Integer, Hash)>] InvoiceResponse data, response status code and response headers + def get_invoice_by_invoice_id_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: BillingInvoicesApi.get_invoice_by_invoice_id ...' + end + # unbox the parameters from the hash + invoice_id = opts[:'invoice_id'] + # verify the required parameter 'invoice_id' is set + if @api_client.config.client_side_validation && invoice_id.nil? + fail ArgumentError, "Missing the required parameter 'invoice_id' when calling BillingInvoicesApi.get_invoice_by_invoice_id" + end + # resource path + local_var_path = '/billing/v3/invoices/{invoice_id}'.sub('{' + 'invoice_id' + '}', CGI.escape(invoice_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'InvoiceResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['token'] + + new_options = opts.merge( + :operation => :"BillingInvoicesApi.get_invoice_by_invoice_id", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: BillingInvoicesApi#get_invoice_by_invoice_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List of invoices. + # Returns the list of invoices, sorted by billing start date (newest to oldest). + # @option opts [String] :billing_start_date + # @option opts [String] :billing_end_date + # @option opts [String] :limit Number of results per page. The maximum is 200. (default to '100') + # @option opts [String] :cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. + # @return [ListInvoicesResponse] + def list_invoices(opts = {}) + data, _status_code, _headers = list_invoices_with_http_info(opts) + data + end + + # List of invoices. + # Returns the list of invoices, sorted by billing start date (newest to oldest). + # @option opts [String] :billing_start_date + # @option opts [String] :billing_end_date + # @option opts [String] :limit Number of results per page. The maximum is 200. (default to '100') + # @option opts [String] :cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. + # @return [Array<(ListInvoicesResponse, Integer, Hash)>] ListInvoicesResponse data, response status code and response headers + def list_invoices_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: BillingInvoicesApi.list_invoices ...' + end + # unbox the parameters from the hash + # resource path + local_var_path = '/billing/v3/invoices' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'billing_start_date'] = opts[:'billing_start_date'] if !opts[:'billing_start_date'].nil? + query_params[:'billing_end_date'] = opts[:'billing_end_date'] if !opts[:'billing_end_date'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ListInvoicesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['token'] + + new_options = opts.merge( + :operation => :"BillingInvoicesApi.list_invoices", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: BillingInvoicesApi#list_invoices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/fastly/api/director_api.rb b/lib/fastly/api/director_api.rb index 1564fb99..1acd4ab2 100644 --- a/lib/fastly/api/director_api.rb +++ b/lib/fastly/api/director_api.rb @@ -26,7 +26,7 @@ def initialize(api_client = ApiClient.default) # @option opts [String] :comment A freeform descriptive note. # @option opts [String] :name Name for the Director. # @option opts [Integer] :quorum The percentage of capacity that needs to be up for a director to be considered up. `0` to `100`. (default to 75) - # @option opts [String] :shield Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. (default to 'null') + # @option opts [String] :shield Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. (default to 'null') # @option opts [Integer] :type What type of load balance group to use. (default to 1) # @option opts [Integer] :retries How many backends to search if it fails. (default to 5) # @return [DirectorResponse] @@ -44,7 +44,7 @@ def create_director(opts = {}) # @option opts [String] :comment A freeform descriptive note. # @option opts [String] :name Name for the Director. # @option opts [Integer] :quorum The percentage of capacity that needs to be up for a director to be considered up. `0` to `100`. (default to 75) - # @option opts [String] :shield Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. (default to 'null') + # @option opts [String] :shield Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. (default to 'null') # @option opts [Integer] :type What type of load balance group to use. (default to 1) # @option opts [Integer] :retries How many backends to search if it fails. (default to 5) # @return [Array<(DirectorResponse, Integer, Hash)>] DirectorResponse data, response status code and response headers diff --git a/lib/fastly/api/domain_inspector_historical_api.rb b/lib/fastly/api/domain_inspector_historical_api.rb index f8f3057a..6a9b5374 100644 --- a/lib/fastly/api/domain_inspector_historical_api.rb +++ b/lib/fastly/api/domain_inspector_historical_api.rb @@ -23,10 +23,10 @@ def initialize(api_client = ApiClient.default) # @option opts [String] :start A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `downsample` value. # @option opts [String] :_end A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `downsample` value. # @option opts [String] :downsample Duration of sample windows. (default to 'hour') - # @option opts [String] :metric The metric to retrieve. Up to ten comma-separated metrics are accepted. (default to 'edge_requests') + # @option opts [String] :metric The metrics to retrieve. Multiple values should be comma-separated. (default to 'edge_requests') # @option opts [String] :group_by Dimensions to return in the query. Multiple dimensions may be separated by commas. For example, `group_by=domain` will return one timeseries for every domain, as a total across all datacenters (POPs). # @option opts [String] :limit Number of results per page. The maximum is 200. (default to '100') - # @option opts [String] :cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. + # @option opts [String] :cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. # @option opts [String] :region Limit query to one or more specific geographic regions. Values should be comma-separated. # @option opts [String] :datacenter Limit query to one or more specific POPs. Values should be comma-separated. # @option opts [String] :domain Limit query to one or more specific domains. Values should be comma-separated. @@ -42,10 +42,10 @@ def get_domain_inspector_historical(opts = {}) # @option opts [String] :start A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `downsample` value. # @option opts [String] :_end A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `downsample` value. # @option opts [String] :downsample Duration of sample windows. (default to 'hour') - # @option opts [String] :metric The metric to retrieve. Up to ten comma-separated metrics are accepted. (default to 'edge_requests') + # @option opts [String] :metric The metrics to retrieve. Multiple values should be comma-separated. (default to 'edge_requests') # @option opts [String] :group_by Dimensions to return in the query. Multiple dimensions may be separated by commas. For example, `group_by=domain` will return one timeseries for every domain, as a total across all datacenters (POPs). # @option opts [String] :limit Number of results per page. The maximum is 200. (default to '100') - # @option opts [String] :cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. + # @option opts [String] :cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. # @option opts [String] :region Limit query to one or more specific geographic regions. Values should be comma-separated. # @option opts [String] :datacenter Limit query to one or more specific POPs. Values should be comma-separated. # @option opts [String] :domain Limit query to one or more specific domains. Values should be comma-separated. diff --git a/lib/fastly/api/kv_store_api.rb b/lib/fastly/api/kv_store_api.rb index 8a5c4449..c90bf123 100644 --- a/lib/fastly/api/kv_store_api.rb +++ b/lib/fastly/api/kv_store_api.rb @@ -210,7 +210,7 @@ def get_store_with_http_info(opts = {}) # List KV stores. # Get all stores for a given customer. # @option opts [String] :cursor - # @option opts [Integer] :limit (default to 100) + # @option opts [Integer] :limit (default to 1000) # @return [InlineResponse2003] def get_stores(opts = {}) data, _status_code, _headers = get_stores_with_http_info(opts) @@ -220,7 +220,7 @@ def get_stores(opts = {}) # List KV stores. # Get all stores for a given customer. # @option opts [String] :cursor - # @option opts [Integer] :limit (default to 100) + # @option opts [Integer] :limit (default to 1000) # @return [Array<(InlineResponse2003, Integer, Hash)>] InlineResponse2003 data, response status code and response headers def get_stores_with_http_info(opts = {}) if @api_client.config.debugging diff --git a/lib/fastly/api/logging_scalyr_api.rb b/lib/fastly/api/logging_scalyr_api.rb index 6f1cd36b..0b91cabc 100644 --- a/lib/fastly/api/logging_scalyr_api.rb +++ b/lib/fastly/api/logging_scalyr_api.rb @@ -27,7 +27,7 @@ def initialize(api_client = ApiClient.default) # @option opts [String] :format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (default to '%h %l %u %t \"%r\" %>s %b') # @option opts [Integer] :format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (default to FORMAT_VERSION::v2) # @option opts [String] :region The region that log data will be sent to. (default to 'US') - # @option opts [String] :token The token to use for authentication ([https://www.scalyr.com/keys](https://www.scalyr.com/keys)). + # @option opts [String] :token The token to use for authentication. # @option opts [String] :project_id The name of the logfile within Scalyr. (default to 'logplex') # @return [LoggingScalyrResponse] def create_log_scalyr(opts = {}) @@ -45,7 +45,7 @@ def create_log_scalyr(opts = {}) # @option opts [String] :format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (default to '%h %l %u %t \"%r\" %>s %b') # @option opts [Integer] :format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (default to FORMAT_VERSION::v2) # @option opts [String] :region The region that log data will be sent to. (default to 'US') - # @option opts [String] :token The token to use for authentication ([https://www.scalyr.com/keys](https://www.scalyr.com/keys)). + # @option opts [String] :token The token to use for authentication. # @option opts [String] :project_id The name of the logfile within Scalyr. (default to 'logplex') # @return [Array<(LoggingScalyrResponse, Integer, Hash)>] LoggingScalyrResponse data, response status code and response headers def create_log_scalyr_with_http_info(opts = {}) @@ -363,7 +363,7 @@ def list_log_scalyr_with_http_info(opts = {}) # @option opts [String] :format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (default to '%h %l %u %t \"%r\" %>s %b') # @option opts [Integer] :format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (default to FORMAT_VERSION::v2) # @option opts [String] :region The region that log data will be sent to. (default to 'US') - # @option opts [String] :token The token to use for authentication ([https://www.scalyr.com/keys](https://www.scalyr.com/keys)). + # @option opts [String] :token The token to use for authentication. # @option opts [String] :project_id The name of the logfile within Scalyr. (default to 'logplex') # @return [LoggingScalyrResponse] def update_log_scalyr(opts = {}) @@ -382,7 +382,7 @@ def update_log_scalyr(opts = {}) # @option opts [String] :format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (default to '%h %l %u %t \"%r\" %>s %b') # @option opts [Integer] :format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (default to FORMAT_VERSION::v2) # @option opts [String] :region The region that log data will be sent to. (default to 'US') - # @option opts [String] :token The token to use for authentication ([https://www.scalyr.com/keys](https://www.scalyr.com/keys)). + # @option opts [String] :token The token to use for authentication. # @option opts [String] :project_id The name of the logfile within Scalyr. (default to 'logplex') # @return [Array<(LoggingScalyrResponse, Integer, Hash)>] LoggingScalyrResponse data, response status code and response headers def update_log_scalyr_with_http_info(opts = {}) diff --git a/lib/fastly/api/origin_inspector_historical_api.rb b/lib/fastly/api/origin_inspector_historical_api.rb index 77d7a498..75301e14 100644 --- a/lib/fastly/api/origin_inspector_historical_api.rb +++ b/lib/fastly/api/origin_inspector_historical_api.rb @@ -23,10 +23,10 @@ def initialize(api_client = ApiClient.default) # @option opts [String] :start A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `downsample` value. # @option opts [String] :_end A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `downsample` value. # @option opts [String] :downsample Duration of sample windows. (default to 'hour') - # @option opts [String] :metric The metric to retrieve. Up to ten comma-separated metrics are accepted. (default to 'responses') + # @option opts [String] :metric The metrics to retrieve. Multiple values should be comma-separated. (default to 'responses') # @option opts [String] :group_by Dimensions to return in the query. Multiple dimensions may be separated by commas. For example, `group_by=host` will return one timeseries for every origin host, as a total across all POPs. # @option opts [String] :limit Number of results per page. The maximum is 200. (default to '100') - # @option opts [String] :cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. + # @option opts [String] :cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. # @option opts [String] :region Limit query to one or more specific geographic regions. Values should be comma-separated. # @option opts [String] :datacenter Limit query to one or more specific POPs. Values should be comma-separated. # @option opts [String] :host Limit query to one or more specific origin hosts. Values should be comma-separated. @@ -42,10 +42,10 @@ def get_origin_inspector_historical(opts = {}) # @option opts [String] :start A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the inclusive start of the query time range. If not provided, a default is chosen based on the provided `downsample` value. # @option opts [String] :_end A valid ISO-8601-formatted date and time, or UNIX timestamp, indicating the exclusive end of the query time range. If not provided, a default is chosen based on the provided `downsample` value. # @option opts [String] :downsample Duration of sample windows. (default to 'hour') - # @option opts [String] :metric The metric to retrieve. Up to ten comma-separated metrics are accepted. (default to 'responses') + # @option opts [String] :metric The metrics to retrieve. Multiple values should be comma-separated. (default to 'responses') # @option opts [String] :group_by Dimensions to return in the query. Multiple dimensions may be separated by commas. For example, `group_by=host` will return one timeseries for every origin host, as a total across all POPs. # @option opts [String] :limit Number of results per page. The maximum is 200. (default to '100') - # @option opts [String] :cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. + # @option opts [String] :cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. # @option opts [String] :region Limit query to one or more specific geographic regions. Values should be comma-separated. # @option opts [String] :datacenter Limit query to one or more specific POPs. Values should be comma-separated. # @option opts [String] :host Limit query to one or more specific origin hosts. Values should be comma-separated. diff --git a/lib/fastly/api/pool_api.rb b/lib/fastly/api/pool_api.rb index 8c818acf..bba45b6c 100644 --- a/lib/fastly/api/pool_api.rb +++ b/lib/fastly/api/pool_api.rb @@ -32,7 +32,7 @@ def initialize(api_client = ApiClient.default) # @option opts [String] :service_id # @option opts [String] :version # @option opts [String] :name Name for the Pool. - # @option opts [String] :shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. (default to 'null') + # @option opts [String] :shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. (default to 'null') # @option opts [String] :request_condition Condition which, if met, will select this configuration during a request. Optional. # @option opts [String] :tls_ciphers List of OpenSSL ciphers (see the [openssl.org manpages](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) for details). Optional. # @option opts [String] :tls_sni_hostname SNI hostname. Optional. @@ -69,7 +69,7 @@ def create_server_pool(opts = {}) # @option opts [String] :service_id # @option opts [String] :version # @option opts [String] :name Name for the Pool. - # @option opts [String] :shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. (default to 'null') + # @option opts [String] :shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. (default to 'null') # @option opts [String] :request_condition Condition which, if met, will select this configuration during a request. Optional. # @option opts [String] :tls_ciphers List of OpenSSL ciphers (see the [openssl.org manpages](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) for details). Optional. # @option opts [String] :tls_sni_hostname SNI hostname. Optional. @@ -429,7 +429,7 @@ def list_server_pools_with_http_info(opts = {}) # @option opts [String] :service_id # @option opts [String] :version # @option opts [String] :name Name for the Pool. - # @option opts [String] :shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. (default to 'null') + # @option opts [String] :shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. (default to 'null') # @option opts [String] :request_condition Condition which, if met, will select this configuration during a request. Optional. # @option opts [String] :tls_ciphers List of OpenSSL ciphers (see the [openssl.org manpages](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) for details). Optional. # @option opts [String] :tls_sni_hostname SNI hostname. Optional. @@ -467,7 +467,7 @@ def update_server_pool(opts = {}) # @option opts [String] :service_id # @option opts [String] :version # @option opts [String] :name Name for the Pool. - # @option opts [String] :shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. (default to 'null') + # @option opts [String] :shield Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. (default to 'null') # @option opts [String] :request_condition Condition which, if met, will select this configuration during a request. Optional. # @option opts [String] :tls_ciphers List of OpenSSL ciphers (see the [openssl.org manpages](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) for details). Optional. # @option opts [String] :tls_sni_hostname SNI hostname. Optional. diff --git a/lib/fastly/api/publish_api.rb b/lib/fastly/api/publish_api.rb index d1191576..44b18017 100644 --- a/lib/fastly/api/publish_api.rb +++ b/lib/fastly/api/publish_api.rb @@ -18,7 +18,7 @@ def initialize(api_client = ApiClient.default) @api_client = api_client end # Send messages to Fanout subscribers - # Send one or more messages to [Fanout](https://developer.fastly.com/learning/concepts/real-time-messaging/fanout) subscribers. Each message specifies a channel, and Fanout will deliver the message to all subscribers of its channel. > **IMPORTANT:** For compatibility with GRIP, this endpoint requires a trailing slash, and the API token may be provided in the `Authorization` header (instead of the `Fastly-Key` header) using the `Bearer` scheme. + # Send one or more messages to [Fanout](https://www.fastly.com/documentation/learning/concepts/real-time-messaging/fanout) subscribers. Each message specifies a channel, and Fanout will deliver the message to all subscribers of its channel. > **IMPORTANT:** For compatibility with GRIP, this endpoint requires a trailing slash, and the API token may be provided in the `Authorization` header (instead of the `Fastly-Key` header) using the `Bearer` scheme. # @option opts [String] :service_id Alphanumeric string identifying the service. (required) # @option opts [PublishRequest] :publish_request # @return [String] @@ -28,7 +28,7 @@ def publish(opts = {}) end # Send messages to Fanout subscribers - # Send one or more messages to [Fanout](https://developer.fastly.com/learning/concepts/real-time-messaging/fanout) subscribers. Each message specifies a channel, and Fanout will deliver the message to all subscribers of its channel. > **IMPORTANT:** For compatibility with GRIP, this endpoint requires a trailing slash, and the API token may be provided in the `Authorization` header (instead of the `Fastly-Key` header) using the `Bearer` scheme. + # Send one or more messages to [Fanout](https://www.fastly.com/documentation/learning/concepts/real-time-messaging/fanout) subscribers. Each message specifies a channel, and Fanout will deliver the message to all subscribers of its channel. > **IMPORTANT:** For compatibility with GRIP, this endpoint requires a trailing slash, and the API token may be provided in the `Authorization` header (instead of the `Fastly-Key` header) using the `Bearer` scheme. # @option opts [String] :service_id Alphanumeric string identifying the service. (required) # @option opts [PublishRequest] :publish_request # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers diff --git a/lib/fastly/api/secret_store_api.rb b/lib/fastly/api/secret_store_api.rb index 1a26a6b8..4cddb3a0 100644 --- a/lib/fastly/api/secret_store_api.rb +++ b/lib/fastly/api/secret_store_api.rb @@ -262,8 +262,9 @@ def get_secret_store_with_http_info(opts = {}) # Get all secret stores # Get all secret stores. - # @option opts [String] :cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. + # @option opts [String] :cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. # @option opts [String] :limit Number of results per page. The maximum is 200. (default to '100') + # @option opts [String] :name Returns a one-element array containing the details for the named secret store. # @return [InlineResponse2005] def get_secret_stores(opts = {}) data, _status_code, _headers = get_secret_stores_with_http_info(opts) @@ -272,8 +273,9 @@ def get_secret_stores(opts = {}) # Get all secret stores # Get all secret stores. - # @option opts [String] :cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. + # @option opts [String] :cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. # @option opts [String] :limit Number of results per page. The maximum is 200. (default to '100') + # @option opts [String] :name Returns a one-element array containing the details for the named secret store. # @return [Array<(InlineResponse2005, Integer, Hash)>] InlineResponse2005 data, response status code and response headers def get_secret_stores_with_http_info(opts = {}) if @api_client.config.debugging @@ -287,6 +289,7 @@ def get_secret_stores_with_http_info(opts = {}) query_params = opts[:query_params] || {} query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil? # header parameters header_params = opts[:header_params] || {} diff --git a/lib/fastly/api/secret_store_item_api.rb b/lib/fastly/api/secret_store_item_api.rb index 3893f364..3e700412 100644 --- a/lib/fastly/api/secret_store_item_api.rb +++ b/lib/fastly/api/secret_store_item_api.rb @@ -228,7 +228,7 @@ def get_secret_with_http_info(opts = {}) # List secrets within a store. # List all secrets within a store. # @option opts [String] :store_id (required) - # @option opts [String] :cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. + # @option opts [String] :cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. # @option opts [String] :limit Number of results per page. The maximum is 200. (default to '100') # @return [InlineResponse2006] def get_secrets(opts = {}) @@ -239,7 +239,7 @@ def get_secrets(opts = {}) # List secrets within a store. # List all secrets within a store. # @option opts [String] :store_id (required) - # @option opts [String] :cursor Cursor value from a previous response to retrieve the next page. To request the first page, this should be empty. + # @option opts [String] :cursor Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty. # @option opts [String] :limit Number of results per page. The maximum is 200. (default to '100') # @return [Array<(InlineResponse2006, Integer, Hash)>] InlineResponse2006 data, response status code and response headers def get_secrets_with_http_info(opts = {}) diff --git a/lib/fastly/api/tls_csrs_api.rb b/lib/fastly/api/tls_csrs_api.rb new file mode 100644 index 00000000..5e908eb8 --- /dev/null +++ b/lib/fastly/api/tls_csrs_api.rb @@ -0,0 +1,83 @@ +=begin +#Fastly API + +#Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'cgi' + +module Fastly + class TlsCsrsApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Create CSR + # Creates a certificate signing request (CSR). + # @option opts [TlsCsr] :tls_csr + # @return [TlsCsrResponse] + def create_csr(opts = {}) + data, _status_code, _headers = create_csr_with_http_info(opts) + data + end + + # Create CSR + # Creates a certificate signing request (CSR). + # @option opts [TlsCsr] :tls_csr + # @return [Array<(TlsCsrResponse, Integer, Hash)>] TlsCsrResponse data, response status code and response headers + def create_csr_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TlsCsrsApi.create_csr ...' + end + # unbox the parameters from the hash + # resource path + local_var_path = '/tls/certificate_signing_requests' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/vnd.api+json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'tls_csr']) + + # return_type + return_type = opts[:debug_return_type] || 'TlsCsrResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['token'] + + new_options = opts.merge( + :operation => :"TlsCsrsApi.create_csr", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TlsCsrsApi#create_csr\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/fastly/api/tokens_api.rb b/lib/fastly/api/tokens_api.rb index 01df70a9..4353c40f 100644 --- a/lib/fastly/api/tokens_api.rb +++ b/lib/fastly/api/tokens_api.rb @@ -79,7 +79,7 @@ def bulk_revoke_tokens_with_http_info(opts = {}) end # Create a token - # Create an API token. If two-factor authentication is enabled for your account, review [the instructions](/reference/api/auth-tokens/user/) for including a one-time password in the request. + # Create an API token. If two-factor authentication is enabled for your account, review [the instructions](https://www.fastly.com/documentation/reference/api/auth-tokens/user/) for including a one-time password in the request. # @return [TokenCreatedResponse] def create_token(opts = {}) data, _status_code, _headers = create_token_with_http_info(opts) @@ -87,7 +87,7 @@ def create_token(opts = {}) end # Create a token - # Create an API token. If two-factor authentication is enabled for your account, review [the instructions](/reference/api/auth-tokens/user/) for including a one-time password in the request. + # Create an API token. If two-factor authentication is enabled for your account, review [the instructions](https://www.fastly.com/documentation/reference/api/auth-tokens/user/) for including a one-time password in the request. # @return [Array<(TokenCreatedResponse, Integer, Hash)>] TokenCreatedResponse data, response status code and response headers def create_token_with_http_info(opts = {}) if @api_client.config.debugging diff --git a/lib/fastly/api/vcl_api.rb b/lib/fastly/api/vcl_api.rb index 875ea259..56c446be 100644 --- a/lib/fastly/api/vcl_api.rb +++ b/lib/fastly/api/vcl_api.rb @@ -259,7 +259,7 @@ def get_custom_vcl_with_http_info(opts = {}) end # Get boilerplate VCL - # Return boilerplate VCL with the service's TTL from the [settings](/reference/api/vcl-services/settings/). + # Return boilerplate VCL with the service's TTL from the [settings](https://www.fastly.com/documentation/reference/api/vcl-services/settings/). # @option opts [String] :service_id Alphanumeric string identifying the service. (required) # @option opts [Integer] :version_id Integer identifying a service version. (required) # @return [String] @@ -269,7 +269,7 @@ def get_custom_vcl_boilerplate(opts = {}) end # Get boilerplate VCL - # Return boilerplate VCL with the service's TTL from the [settings](/reference/api/vcl-services/settings/). + # Return boilerplate VCL with the service's TTL from the [settings](https://www.fastly.com/documentation/reference/api/vcl-services/settings/). # @option opts [String] :service_id Alphanumeric string identifying the service. (required) # @option opts [Integer] :version_id Integer identifying a service version. (required) # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers diff --git a/lib/fastly/api/waf_active_rules_api.rb b/lib/fastly/api/waf_active_rules_api.rb index 2d3b3aca..0073b989 100644 --- a/lib/fastly/api/waf_active_rules_api.rb +++ b/lib/fastly/api/waf_active_rules_api.rb @@ -93,7 +93,7 @@ def bulk_delete_waf_active_rules_with_http_info(opts = {}) end # Update multiple active rules - # Bulk update all active rules on a [firewall version](https://developer.fastly.com/reference/api/waf/firewall-version/). This endpoint will not add new active rules, only update existing active rules. + # Bulk update all active rules on a [firewall version](https://www.fastly.com/documentation/reference/api/waf/firewall-version/). This endpoint will not add new active rules, only update existing active rules. # @option opts [String] :firewall_id Alphanumeric string identifying a WAF Firewall. (required) # @option opts [Integer] :version_id Integer identifying a service version. (required) # @option opts [WafActiveRuleData] :body @@ -104,7 +104,7 @@ def bulk_update_waf_active_rules(opts = {}) end # Update multiple active rules - # Bulk update all active rules on a [firewall version](https://developer.fastly.com/reference/api/waf/firewall-version/). This endpoint will not add new active rules, only update existing active rules. + # Bulk update all active rules on a [firewall version](https://www.fastly.com/documentation/reference/api/waf/firewall-version/). This endpoint will not add new active rules, only update existing active rules. # @option opts [String] :firewall_id Alphanumeric string identifying a WAF Firewall. (required) # @option opts [Integer] :version_id Integer identifying a service version. (required) # @option opts [WafActiveRuleData] :body diff --git a/lib/fastly/configuration.rb b/lib/fastly/configuration.rb index aa72acc2..356055ba 100644 --- a/lib/fastly/configuration.rb +++ b/lib/fastly/configuration.rb @@ -476,6 +476,18 @@ def operation_server_settings description: "No description provided", } ], + "BillingInvoicesApi.get_invoice_by_invoice_id": [ + { + url: "https://api.fastly.com", + description: "No description provided", + } + ], + "BillingInvoicesApi.list_invoices": [ + { + url: "https://api.fastly.com", + description: "No description provided", + } + ], "CacheSettingsApi.create_cache_settings": [ { url: "https://api.fastly.com", @@ -2966,6 +2978,12 @@ def operation_server_settings description: "No description provided", } ], + "TlsCsrsApi.create_csr": [ + { + url: "https://api.fastly.com", + description: "No description provided", + } + ], "TlsDomainsApi.list_tls_domains": [ { url: "https://api.fastly.com", diff --git a/lib/fastly/models/error_response.rb b/lib/fastly/models/automation_token_error_response.rb similarity index 96% rename from lib/fastly/models/error_response.rb rename to lib/fastly/models/automation_token_error_response.rb index 88169057..b48c7a9f 100644 --- a/lib/fastly/models/error_response.rb +++ b/lib/fastly/models/automation_token_error_response.rb @@ -12,7 +12,7 @@ require 'time' module Fastly - class ErrorResponse + class AutomationTokenErrorResponse attr_accessor :detail attr_accessor :errors @@ -56,13 +56,13 @@ def self.fastly_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::ErrorResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::AutomationTokenErrorResponse` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::ErrorResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::AutomationTokenErrorResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } diff --git a/lib/fastly/models/backend.rb b/lib/fastly/models/backend.rb index ce1a1341..1fc80b43 100644 --- a/lib/fastly/models/backend.rb +++ b/lib/fastly/models/backend.rb @@ -85,7 +85,7 @@ class Backend # Be strict on checking SSL certs. attr_accessor :ssl_check_cert - # List of [OpenSSL ciphers](https://www.openssl.org/docs/manmaster/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. + # List of [OpenSSL ciphers](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. attr_accessor :ssl_ciphers # Client certificate attached to origin. diff --git a/lib/fastly/models/backend_response.rb b/lib/fastly/models/backend_response.rb index 0d8e4590..28d3639c 100644 --- a/lib/fastly/models/backend_response.rb +++ b/lib/fastly/models/backend_response.rb @@ -85,7 +85,7 @@ class BackendResponse # Be strict on checking SSL certs. attr_accessor :ssl_check_cert - # List of [OpenSSL ciphers](https://www.openssl.org/docs/manmaster/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. + # List of [OpenSSL ciphers](https://www.openssl.org/docs/man1.1.1/man1/ciphers.html) to support for connections to this origin. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated. attr_accessor :ssl_ciphers # Client certificate attached to origin. diff --git a/lib/fastly/models/director.rb b/lib/fastly/models/director.rb index ef2d6eed..9f61da9c 100644 --- a/lib/fastly/models/director.rb +++ b/lib/fastly/models/director.rb @@ -28,7 +28,7 @@ class Director # The percentage of capacity that needs to be up for a director to be considered up. `0` to `100`. attr_accessor :quorum - # Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. + # Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. attr_accessor :shield # What type of load balance group to use. diff --git a/lib/fastly/models/director_response.rb b/lib/fastly/models/director_response.rb index 26a5ecd3..ba5c68fc 100644 --- a/lib/fastly/models/director_response.rb +++ b/lib/fastly/models/director_response.rb @@ -28,7 +28,7 @@ class DirectorResponse # The percentage of capacity that needs to be up for a director to be considered up. `0` to `100`. attr_accessor :quorum - # Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. + # Selected POP to serve as a shield for the backends. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. attr_accessor :shield # What type of load balance group to use. diff --git a/lib/fastly/models/domain_inspector_realtime_entry.rb b/lib/fastly/models/domain_inspector_realtime_entry.rb index 074fb2b4..fc6736d9 100644 --- a/lib/fastly/models/domain_inspector_realtime_entry.rb +++ b/lib/fastly/models/domain_inspector_realtime_entry.rb @@ -19,7 +19,7 @@ class DomainInspectorRealtimeEntry # Groups [measurements](#measurements-data-model) by backend name and then by IP address. attr_accessor :aggregated - # Groups [measurements](#measurements-data-model) by POP, then backend name, and then IP address. See the [POPs API](/reference/api/utils/pops/) for details about POP identifiers. + # Groups [measurements](#measurements-data-model) by POP, then backend name, and then IP address. See the [POPs API](https://www.fastly.com/documentation/reference/api/utils/pops/) for details about POP identifiers. attr_accessor :datacenter # Attribute mapping from ruby-style variable name to JSON key. diff --git a/lib/fastly/models/error.rb b/lib/fastly/models/error.rb new file mode 100644 index 00000000..55bf9b93 --- /dev/null +++ b/lib/fastly/models/error.rb @@ -0,0 +1,243 @@ +=begin +#Fastly API + +#Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'date' +require 'time' + +module Fastly + class Error + attr_accessor :type + + attr_accessor :title + + attr_accessor :code + + attr_accessor :status + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'title' => :'title', + :'code' => :'code', + :'status' => :'status' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.fastly_types + { + :'type' => :'String', + :'title' => :'String', + :'code' => :'String', + :'status' => :'String' + } + end + + # List of attributes with nullable: true + def self.fastly_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::Error` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::Error`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + end + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + title == o.title && + code == o.code && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, title, code, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.fastly_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Fastly.const_get(type) + klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.fastly_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/fastly/models/error_response_data.rb b/lib/fastly/models/error_response_data.rb new file mode 100644 index 00000000..c71b7641 --- /dev/null +++ b/lib/fastly/models/error_response_data.rb @@ -0,0 +1,225 @@ +=begin +#Fastly API + +#Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'date' +require 'time' + +module Fastly + class ErrorResponseData + attr_accessor :title + + attr_accessor :detail + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'title' => :'title', + :'detail' => :'detail' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.fastly_types + { + :'title' => :'String', + :'detail' => :'String' + } + end + + # List of attributes with nullable: true + def self.fastly_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::ErrorResponseData` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::ErrorResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'title') + self.title = attributes[:'title'] + end + + if attributes.key?(:'detail') + self.detail = attributes[:'detail'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + title == o.title && + detail == o.detail + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [title, detail].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.fastly_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Fastly.const_get(type) + klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.fastly_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/fastly/models/event_attributes.rb b/lib/fastly/models/event_attributes.rb index 842959b4..8a05a818 100644 --- a/lib/fastly/models/event_attributes.rb +++ b/lib/fastly/models/event_attributes.rb @@ -173,7 +173,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - event_type_validator = EnumAttributeValidator.new('String', ["api_key.create", "acl.create", "acl.delete", "acl.update", "address.create", "address.delete", "address.update", "backend.create", "backend.delete", "backend.update", "billing.contact_update", "cache_settings.create", "cache_settings.delete", "cache_settings.update", "customer.create", "customer.pricing", "customer.update", "customer_feature.create", "customer_feature.delete", "director.create", "director.delete", "director.update", "director_backend.create", "director_backend.delete", "domain.create", "domain.delete", "domain.update", "gzip.create", "gzip.delete", "gzip.update", "header.create", "header.delete", "header.update", "healthcheck.create", "healthcheck.delete", "healthcheck.update", "invitation.accept", "invitation.sent", "invoice.failed_payment", "invoice.payment", "io_settings.create", "io_settings.delete", "io_settings.update", "logging.create", "logging.delete", "logging.update", "pool.create", "pool.delete", "pool.update", "request_settings.create", "request_settings.delete", "request_settings.update", "response_object.create", "response_object.delete", "response_object.update", "rule_status.update", "rule_status.upsert", "server.create", "server.delete", "server.update", "service.create", "service.delete", "service.move", "service.move_destination", "service.move_source", "service.purge_all", "service.update", "service_authorization.create", "service_authorization.delete", "service_authorization.update", "tls.bulk_certificate.create", "tls.bulk_certificate.delete", "tls.bulk_certificate.update", "tls.certificate.create", "tls.certificate.expiration_email", "tls.certificate.update", "tls.certificate.delete", "tls.configuration.update", "tls.private_key.create", "tls.private_key.delete", "tls.activation.enable", "tls.activation.update", "tls.activation.disable", "tls.globalsign.domain.create", "tls.globalsign.domain.verify", "tls.globalsign.domain.delete", "tls.subscription.create", "tls.subscription.delete", "tls.subscription.dns_check_email", "token.create", "token.destroy", "two_factor_auth.disable", "two_factor_auth.enable", "user.create", "user.destroy", "user.lock", "user.login", "user.login_failure", "user.logout", "user.password_update", "user.unlock", "user.update", "vcl.create", "vcl.delete", "vcl.update", "version.activate", "version.clone", "version.copy", "version.copy_destination", "version.copy_source", "version.create", "version.deactivate", "version.lock", "version.update", "waf.configuration_set_update", "waf.create", "waf.delete", "waf.update", "waf.enable", "waf.disable", "waf.owasp.create", "waf.owasp.update", "waf.ruleset.deploy", "waf.ruleset.deploy_failure", "wordpress.create", "wordpress.delete", "wordpress.update"]) + event_type_validator = EnumAttributeValidator.new('String', ["api_key.create", "acl.create", "acl.delete", "acl.update", "address.create", "address.delete", "address.update", "alerts.definition.create", "alerts.definition.delete", "alerts.definition.test", "alerts.definition.update", "backend.create", "backend.delete", "backend.update", "billing.contact_update", "cache_settings.create", "cache_settings.delete", "cache_settings.update", "customer.create", "customer.pricing", "customer.update", "customer_feature.create", "customer_feature.delete", "director.create", "director.delete", "director.update", "director_backend.create", "director_backend.delete", "domain.create", "domain.delete", "domain.update", "gzip.create", "gzip.delete", "gzip.update", "header.create", "header.delete", "header.update", "healthcheck.create", "healthcheck.delete", "healthcheck.update", "invitation.accept", "invitation.sent", "invoice.failed_payment", "invoice.payment", "io_settings.create", "io_settings.delete", "io_settings.update", "logging.create", "logging.delete", "logging.update", "pool.create", "pool.delete", "pool.update", "request_settings.create", "request_settings.delete", "request_settings.update", "response_object.create", "response_object.delete", "response_object.update", "rule_status.update", "rule_status.upsert", "server.create", "server.delete", "server.update", "service.create", "service.delete", "service.move", "service.move_destination", "service.move_source", "service.purge_all", "service.update", "service_authorization.create", "service_authorization.delete", "service_authorization.update", "tls.bulk_certificate.create", "tls.bulk_certificate.delete", "tls.bulk_certificate.update", "tls.certificate.create", "tls.certificate.expiration_email", "tls.certificate.update", "tls.certificate.delete", "tls.configuration.update", "tls.private_key.create", "tls.private_key.delete", "tls.activation.enable", "tls.activation.update", "tls.activation.disable", "tls.globalsign.domain.create", "tls.globalsign.domain.verify", "tls.globalsign.domain.delete", "tls.subscription.create", "tls.subscription.delete", "tls.subscription.dns_check_email", "token.create", "token.destroy", "two_factor_auth.disable", "two_factor_auth.enable", "user.create", "user.destroy", "user.lock", "user.login", "user.login_failure", "user.logout", "user.password_update", "user.unlock", "user.update", "vcl.create", "vcl.delete", "vcl.update", "version.activate", "version.clone", "version.copy", "version.copy_destination", "version.copy_source", "version.create", "version.deactivate", "version.lock", "version.update", "waf.configuration_set_update", "waf.create", "waf.delete", "waf.update", "waf.enable", "waf.disable", "waf.owasp.create", "waf.owasp.update", "waf.ruleset.deploy", "waf.ruleset.deploy_failure", "wordpress.create", "wordpress.delete", "wordpress.update"]) return false unless event_type_validator.valid?(@event_type) true end @@ -181,7 +181,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] event_type Object to be assigned def event_type=(event_type) - validator = EnumAttributeValidator.new('String', ["api_key.create", "acl.create", "acl.delete", "acl.update", "address.create", "address.delete", "address.update", "backend.create", "backend.delete", "backend.update", "billing.contact_update", "cache_settings.create", "cache_settings.delete", "cache_settings.update", "customer.create", "customer.pricing", "customer.update", "customer_feature.create", "customer_feature.delete", "director.create", "director.delete", "director.update", "director_backend.create", "director_backend.delete", "domain.create", "domain.delete", "domain.update", "gzip.create", "gzip.delete", "gzip.update", "header.create", "header.delete", "header.update", "healthcheck.create", "healthcheck.delete", "healthcheck.update", "invitation.accept", "invitation.sent", "invoice.failed_payment", "invoice.payment", "io_settings.create", "io_settings.delete", "io_settings.update", "logging.create", "logging.delete", "logging.update", "pool.create", "pool.delete", "pool.update", "request_settings.create", "request_settings.delete", "request_settings.update", "response_object.create", "response_object.delete", "response_object.update", "rule_status.update", "rule_status.upsert", "server.create", "server.delete", "server.update", "service.create", "service.delete", "service.move", "service.move_destination", "service.move_source", "service.purge_all", "service.update", "service_authorization.create", "service_authorization.delete", "service_authorization.update", "tls.bulk_certificate.create", "tls.bulk_certificate.delete", "tls.bulk_certificate.update", "tls.certificate.create", "tls.certificate.expiration_email", "tls.certificate.update", "tls.certificate.delete", "tls.configuration.update", "tls.private_key.create", "tls.private_key.delete", "tls.activation.enable", "tls.activation.update", "tls.activation.disable", "tls.globalsign.domain.create", "tls.globalsign.domain.verify", "tls.globalsign.domain.delete", "tls.subscription.create", "tls.subscription.delete", "tls.subscription.dns_check_email", "token.create", "token.destroy", "two_factor_auth.disable", "two_factor_auth.enable", "user.create", "user.destroy", "user.lock", "user.login", "user.login_failure", "user.logout", "user.password_update", "user.unlock", "user.update", "vcl.create", "vcl.delete", "vcl.update", "version.activate", "version.clone", "version.copy", "version.copy_destination", "version.copy_source", "version.create", "version.deactivate", "version.lock", "version.update", "waf.configuration_set_update", "waf.create", "waf.delete", "waf.update", "waf.enable", "waf.disable", "waf.owasp.create", "waf.owasp.update", "waf.ruleset.deploy", "waf.ruleset.deploy_failure", "wordpress.create", "wordpress.delete", "wordpress.update"]) + validator = EnumAttributeValidator.new('String', ["api_key.create", "acl.create", "acl.delete", "acl.update", "address.create", "address.delete", "address.update", "alerts.definition.create", "alerts.definition.delete", "alerts.definition.test", "alerts.definition.update", "backend.create", "backend.delete", "backend.update", "billing.contact_update", "cache_settings.create", "cache_settings.delete", "cache_settings.update", "customer.create", "customer.pricing", "customer.update", "customer_feature.create", "customer_feature.delete", "director.create", "director.delete", "director.update", "director_backend.create", "director_backend.delete", "domain.create", "domain.delete", "domain.update", "gzip.create", "gzip.delete", "gzip.update", "header.create", "header.delete", "header.update", "healthcheck.create", "healthcheck.delete", "healthcheck.update", "invitation.accept", "invitation.sent", "invoice.failed_payment", "invoice.payment", "io_settings.create", "io_settings.delete", "io_settings.update", "logging.create", "logging.delete", "logging.update", "pool.create", "pool.delete", "pool.update", "request_settings.create", "request_settings.delete", "request_settings.update", "response_object.create", "response_object.delete", "response_object.update", "rule_status.update", "rule_status.upsert", "server.create", "server.delete", "server.update", "service.create", "service.delete", "service.move", "service.move_destination", "service.move_source", "service.purge_all", "service.update", "service_authorization.create", "service_authorization.delete", "service_authorization.update", "tls.bulk_certificate.create", "tls.bulk_certificate.delete", "tls.bulk_certificate.update", "tls.certificate.create", "tls.certificate.expiration_email", "tls.certificate.update", "tls.certificate.delete", "tls.configuration.update", "tls.private_key.create", "tls.private_key.delete", "tls.activation.enable", "tls.activation.update", "tls.activation.disable", "tls.globalsign.domain.create", "tls.globalsign.domain.verify", "tls.globalsign.domain.delete", "tls.subscription.create", "tls.subscription.delete", "tls.subscription.dns_check_email", "token.create", "token.destroy", "two_factor_auth.disable", "two_factor_auth.enable", "user.create", "user.destroy", "user.lock", "user.login", "user.login_failure", "user.logout", "user.password_update", "user.unlock", "user.update", "vcl.create", "vcl.delete", "vcl.update", "version.activate", "version.clone", "version.copy", "version.copy_destination", "version.copy_source", "version.create", "version.deactivate", "version.lock", "version.update", "waf.configuration_set_update", "waf.create", "waf.delete", "waf.update", "waf.enable", "waf.disable", "waf.owasp.create", "waf.owasp.update", "waf.ruleset.deploy", "waf.ruleset.deploy_failure", "wordpress.create", "wordpress.delete", "wordpress.update"]) unless validator.valid?(event_type) fail ArgumentError, "invalid value for \"event_type\", must be one of #{validator.allowable_values}." end diff --git a/lib/fastly/models/invoice.rb b/lib/fastly/models/invoice.rb new file mode 100644 index 00000000..5cf7f181 --- /dev/null +++ b/lib/fastly/models/invoice.rb @@ -0,0 +1,298 @@ +=begin +#Fastly API + +#Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'date' +require 'time' + +module Fastly + class Invoice + # Customer ID associated with the invoice. + attr_accessor :customer_id + + # Alphanumeric string identifying the invoice. + attr_accessor :invoice_id + + # Date and time invoice was posted on, in ISO 8601 format. + attr_accessor :invoice_posted_on + + # Date and time (in ISO 8601 format) for initiation point of a billing cycle, signifying the start of charges for a service or subscription. + attr_accessor :billing_start_date + + # Date and time (in ISO 8601 format) for termination point of a billing cycle, signifying the end of charges for a service or subscription. + attr_accessor :billing_end_date + + # Alphanumeric string identifying the statement number. + attr_accessor :statement_number + + # Three-letter code representing a specific currency used for financial transactions. + attr_accessor :currency_code + + # Total billable amount for invoiced services charged within a single month. + attr_accessor :monthly_transaction_amount + + attr_accessor :transaction_line_items + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'customer_id' => :'customer_id', + :'invoice_id' => :'invoice_id', + :'invoice_posted_on' => :'invoice_posted_on', + :'billing_start_date' => :'billing_start_date', + :'billing_end_date' => :'billing_end_date', + :'statement_number' => :'statement_number', + :'currency_code' => :'currency_code', + :'monthly_transaction_amount' => :'monthly_transaction_amount', + :'transaction_line_items' => :'transaction_line_items' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.fastly_types + { + :'customer_id' => :'String', + :'invoice_id' => :'String', + :'invoice_posted_on' => :'Time', + :'billing_start_date' => :'Time', + :'billing_end_date' => :'Time', + :'statement_number' => :'String', + :'currency_code' => :'String', + :'monthly_transaction_amount' => :'Float', + :'transaction_line_items' => :'Array' + } + end + + # List of attributes with nullable: true + def self.fastly_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::Invoice` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::Invoice`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'customer_id') + self.customer_id = attributes[:'customer_id'] + end + + if attributes.key?(:'invoice_id') + self.invoice_id = attributes[:'invoice_id'] + end + + if attributes.key?(:'invoice_posted_on') + self.invoice_posted_on = attributes[:'invoice_posted_on'] + end + + if attributes.key?(:'billing_start_date') + self.billing_start_date = attributes[:'billing_start_date'] + end + + if attributes.key?(:'billing_end_date') + self.billing_end_date = attributes[:'billing_end_date'] + end + + if attributes.key?(:'statement_number') + self.statement_number = attributes[:'statement_number'] + end + + if attributes.key?(:'currency_code') + self.currency_code = attributes[:'currency_code'] + end + + if attributes.key?(:'monthly_transaction_amount') + self.monthly_transaction_amount = attributes[:'monthly_transaction_amount'] + end + + if attributes.key?(:'transaction_line_items') + if (value = attributes[:'transaction_line_items']).is_a?(Array) + self.transaction_line_items = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + customer_id == o.customer_id && + invoice_id == o.invoice_id && + invoice_posted_on == o.invoice_posted_on && + billing_start_date == o.billing_start_date && + billing_end_date == o.billing_end_date && + statement_number == o.statement_number && + currency_code == o.currency_code && + monthly_transaction_amount == o.monthly_transaction_amount && + transaction_line_items == o.transaction_line_items + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [customer_id, invoice_id, invoice_posted_on, billing_start_date, billing_end_date, statement_number, currency_code, monthly_transaction_amount, transaction_line_items].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.fastly_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Fastly.const_get(type) + klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.fastly_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/fastly/models/invoice_response.rb b/lib/fastly/models/invoice_response.rb new file mode 100644 index 00000000..d0f73f98 --- /dev/null +++ b/lib/fastly/models/invoice_response.rb @@ -0,0 +1,305 @@ +=begin +#Fastly API + +#Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'date' +require 'time' + +module Fastly + class InvoiceResponse + # Customer ID associated with the invoice. + attr_accessor :customer_id + + # Alphanumeric string identifying the invoice. + attr_accessor :invoice_id + + # Date and time invoice was posted on, in ISO 8601 format. + attr_accessor :invoice_posted_on + + # Date and time (in ISO 8601 format) for initiation point of a billing cycle, signifying the start of charges for a service or subscription. + attr_accessor :billing_start_date + + # Date and time (in ISO 8601 format) for termination point of a billing cycle, signifying the end of charges for a service or subscription. + attr_accessor :billing_end_date + + # Alphanumeric string identifying the statement number. + attr_accessor :statement_number + + # Three-letter code representing a specific currency used for financial transactions. + attr_accessor :currency_code + + # Total billable amount for invoiced services charged within a single month. + attr_accessor :monthly_transaction_amount + + attr_accessor :transaction_line_items + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'customer_id' => :'customer_id', + :'invoice_id' => :'invoice_id', + :'invoice_posted_on' => :'invoice_posted_on', + :'billing_start_date' => :'billing_start_date', + :'billing_end_date' => :'billing_end_date', + :'statement_number' => :'statement_number', + :'currency_code' => :'currency_code', + :'monthly_transaction_amount' => :'monthly_transaction_amount', + :'transaction_line_items' => :'transaction_line_items' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.fastly_types + { + :'customer_id' => :'String', + :'invoice_id' => :'String', + :'invoice_posted_on' => :'Time', + :'billing_start_date' => :'Time', + :'billing_end_date' => :'Time', + :'statement_number' => :'String', + :'currency_code' => :'String', + :'monthly_transaction_amount' => :'Float', + :'transaction_line_items' => :'Array' + } + end + + # List of attributes with nullable: true + def self.fastly_nullable + Set.new([ + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.fastly_all_of + [ + :'Invoice' + ] + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::InvoiceResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::InvoiceResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'customer_id') + self.customer_id = attributes[:'customer_id'] + end + + if attributes.key?(:'invoice_id') + self.invoice_id = attributes[:'invoice_id'] + end + + if attributes.key?(:'invoice_posted_on') + self.invoice_posted_on = attributes[:'invoice_posted_on'] + end + + if attributes.key?(:'billing_start_date') + self.billing_start_date = attributes[:'billing_start_date'] + end + + if attributes.key?(:'billing_end_date') + self.billing_end_date = attributes[:'billing_end_date'] + end + + if attributes.key?(:'statement_number') + self.statement_number = attributes[:'statement_number'] + end + + if attributes.key?(:'currency_code') + self.currency_code = attributes[:'currency_code'] + end + + if attributes.key?(:'monthly_transaction_amount') + self.monthly_transaction_amount = attributes[:'monthly_transaction_amount'] + end + + if attributes.key?(:'transaction_line_items') + if (value = attributes[:'transaction_line_items']).is_a?(Array) + self.transaction_line_items = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + customer_id == o.customer_id && + invoice_id == o.invoice_id && + invoice_posted_on == o.invoice_posted_on && + billing_start_date == o.billing_start_date && + billing_end_date == o.billing_end_date && + statement_number == o.statement_number && + currency_code == o.currency_code && + monthly_transaction_amount == o.monthly_transaction_amount && + transaction_line_items == o.transaction_line_items + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [customer_id, invoice_id, invoice_posted_on, billing_start_date, billing_end_date, statement_number, currency_code, monthly_transaction_amount, transaction_line_items].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.fastly_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Fastly.const_get(type) + klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.fastly_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/fastly/models/invoicelineitems.rb b/lib/fastly/models/invoicelineitems.rb new file mode 100644 index 00000000..23473bc7 --- /dev/null +++ b/lib/fastly/models/invoicelineitems.rb @@ -0,0 +1,297 @@ +=begin +#Fastly API + +#Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'date' +require 'time' + +module Fastly + class Invoicelineitems + # Invoice line item transaction name. + attr_accessor :description + + # Billed amount for line item. + attr_accessor :amount + + # Discount coupon associated with the invoice for any account or service credits. + attr_accessor :credit_coupon_code + + # Price per unit. + attr_accessor :rate + + # Total number of units of usage. + attr_accessor :units + + # The name of the product. + attr_accessor :product_name + + # The broader classification of the product (e.g., `Compute` or `Full-Site Delivery`). + attr_accessor :product_group + + # The geographical area applicable for regionally based products. + attr_accessor :region + + # The unit of measure (e.g., `requests` or `bandwidth`). + attr_accessor :usage_type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'description' => :'description', + :'amount' => :'amount', + :'credit_coupon_code' => :'credit_coupon_code', + :'rate' => :'rate', + :'units' => :'units', + :'product_name' => :'ProductName', + :'product_group' => :'ProductGroup', + :'region' => :'Region', + :'usage_type' => :'UsageType' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.fastly_types + { + :'description' => :'String', + :'amount' => :'Float', + :'credit_coupon_code' => :'String', + :'rate' => :'Float', + :'units' => :'Float', + :'product_name' => :'String', + :'product_group' => :'String', + :'region' => :'String', + :'usage_type' => :'String' + } + end + + # List of attributes with nullable: true + def self.fastly_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::Invoicelineitems` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::Invoicelineitems`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'amount') + self.amount = attributes[:'amount'] + end + + if attributes.key?(:'credit_coupon_code') + self.credit_coupon_code = attributes[:'credit_coupon_code'] + end + + if attributes.key?(:'rate') + self.rate = attributes[:'rate'] + end + + if attributes.key?(:'units') + self.units = attributes[:'units'] + end + + if attributes.key?(:'product_name') + self.product_name = attributes[:'product_name'] + end + + if attributes.key?(:'product_group') + self.product_group = attributes[:'product_group'] + end + + if attributes.key?(:'region') + self.region = attributes[:'region'] + end + + if attributes.key?(:'usage_type') + self.usage_type = attributes[:'usage_type'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + description == o.description && + amount == o.amount && + credit_coupon_code == o.credit_coupon_code && + rate == o.rate && + units == o.units && + product_name == o.product_name && + product_group == o.product_group && + region == o.region && + usage_type == o.usage_type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [description, amount, credit_coupon_code, rate, units, product_name, product_group, region, usage_type].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.fastly_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Fastly.const_get(type) + klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.fastly_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/fastly/models/list_invoices_response.rb b/lib/fastly/models/list_invoices_response.rb new file mode 100644 index 00000000..55d349cd --- /dev/null +++ b/lib/fastly/models/list_invoices_response.rb @@ -0,0 +1,234 @@ +=begin +#Fastly API + +#Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'date' +require 'time' + +module Fastly + class ListInvoicesResponse + attr_accessor :data + + attr_accessor :meta + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'data' => :'data', + :'meta' => :'meta' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.fastly_types + { + :'data' => :'Array', + :'meta' => :'Metadata' + } + end + + # List of attributes with nullable: true + def self.fastly_nullable + Set.new([ + ]) + end + + # List of class defined in allOf (OpenAPI v3) + def self.fastly_all_of + [ + :'Listinvoices' + ] + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::ListInvoicesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::ListInvoicesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + meta == o.meta + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [data, meta].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.fastly_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Fastly.const_get(type) + klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.fastly_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/fastly/models/listinvoices.rb b/lib/fastly/models/listinvoices.rb new file mode 100644 index 00000000..290bf5a5 --- /dev/null +++ b/lib/fastly/models/listinvoices.rb @@ -0,0 +1,227 @@ +=begin +#Fastly API + +#Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'date' +require 'time' + +module Fastly + class Listinvoices + attr_accessor :data + + attr_accessor :meta + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'data' => :'data', + :'meta' => :'meta' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.fastly_types + { + :'data' => :'Array', + :'meta' => :'Metadata' + } + end + + # List of attributes with nullable: true + def self.fastly_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::Listinvoices` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::Listinvoices`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + meta == o.meta + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [data, meta].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.fastly_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Fastly.const_get(type) + klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.fastly_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/fastly/models/logging_scalyr_additional.rb b/lib/fastly/models/logging_scalyr_additional.rb index 376be524..f6495007 100644 --- a/lib/fastly/models/logging_scalyr_additional.rb +++ b/lib/fastly/models/logging_scalyr_additional.rb @@ -16,7 +16,7 @@ class LoggingScalyrAdditional # The region that log data will be sent to. attr_accessor :region - # The token to use for authentication ([https://www.scalyr.com/keys](https://www.scalyr.com/keys)). + # The token to use for authentication. attr_accessor :token # The name of the logfile within Scalyr. diff --git a/lib/fastly/models/logging_scalyr_response.rb b/lib/fastly/models/logging_scalyr_response.rb index 12a2e8d9..03fa8fd9 100644 --- a/lib/fastly/models/logging_scalyr_response.rb +++ b/lib/fastly/models/logging_scalyr_response.rb @@ -31,7 +31,7 @@ class LoggingScalyrResponse # The region that log data will be sent to. attr_accessor :region - # The token to use for authentication ([https://www.scalyr.com/keys](https://www.scalyr.com/keys)). + # The token to use for authentication. attr_accessor :token # The name of the logfile within Scalyr. diff --git a/lib/fastly/models/metadata.rb b/lib/fastly/models/metadata.rb new file mode 100644 index 00000000..7b7c310c --- /dev/null +++ b/lib/fastly/models/metadata.rb @@ -0,0 +1,250 @@ +=begin +#Fastly API + +#Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'date' +require 'time' + +module Fastly + # Pagination metadata + class Metadata + # The token used to request the next set of results. + attr_accessor :next_cursor + + # The number of invoices included in the response. + attr_accessor :limit + + # The sort order of the invoices in the response. + attr_accessor :sort + + # Total number of records available on the backend. + attr_accessor :total + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'next_cursor' => :'next_cursor', + :'limit' => :'limit', + :'sort' => :'sort', + :'total' => :'total' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.fastly_types + { + :'next_cursor' => :'String', + :'limit' => :'Integer', + :'sort' => :'String', + :'total' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.fastly_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::Metadata` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::Metadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'next_cursor') + self.next_cursor = attributes[:'next_cursor'] + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.key?(:'sort') + self.sort = attributes[:'sort'] + else + self.sort = 'billing_start_date' + end + + if attributes.key?(:'total') + self.total = attributes[:'total'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + next_cursor == o.next_cursor && + limit == o.limit && + sort == o.sort && + total == o.total + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [next_cursor, limit, sort, total].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.fastly_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Fastly.const_get(type) + klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.fastly_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/fastly/models/origin_inspector_realtime_entry.rb b/lib/fastly/models/origin_inspector_realtime_entry.rb index 27f11bf9..4d14c9d1 100644 --- a/lib/fastly/models/origin_inspector_realtime_entry.rb +++ b/lib/fastly/models/origin_inspector_realtime_entry.rb @@ -19,7 +19,7 @@ class OriginInspectorRealtimeEntry # Groups [measurements](#measurements-data-model) by backend name. attr_accessor :aggregated - # Groups [measurements](#measurements-data-model) by POP, then backend name. See the [POPs API](/reference/api/utils/pops/) for details about POP identifiers. + # Groups [measurements](#measurements-data-model) by POP, then backend name. See the [POPs API](https://www.fastly.com/documentation/reference/api/utils/pops/) for details about POP identifiers. attr_accessor :datacenter # Attribute mapping from ruby-style variable name to JSON key. diff --git a/lib/fastly/models/pool_additional.rb b/lib/fastly/models/pool_additional.rb index acd5f599..afd953b3 100644 --- a/lib/fastly/models/pool_additional.rb +++ b/lib/fastly/models/pool_additional.rb @@ -16,7 +16,7 @@ class PoolAdditional # Name for the Pool. attr_accessor :name - # Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. + # Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. attr_accessor :shield # Condition which, if met, will select this configuration during a request. Optional. diff --git a/lib/fastly/models/pool_response.rb b/lib/fastly/models/pool_response.rb index b4ad56da..a5871468 100644 --- a/lib/fastly/models/pool_response.rb +++ b/lib/fastly/models/pool_response.rb @@ -44,7 +44,7 @@ class PoolResponse # Name for the Pool. attr_accessor :name - # Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. + # Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. attr_accessor :shield # Condition which, if met, will select this configuration during a request. Optional. diff --git a/lib/fastly/models/pool_response_post.rb b/lib/fastly/models/pool_response_post.rb index 4285dd5d..979de548 100644 --- a/lib/fastly/models/pool_response_post.rb +++ b/lib/fastly/models/pool_response_post.rb @@ -44,7 +44,7 @@ class PoolResponsePost # Name for the Pool. attr_accessor :name - # Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](/reference/api/utils/pops/) to get a list of available POPs used for shielding. + # Selected POP to serve as a shield for the servers. Defaults to `null` meaning no origin shielding if not set. Refer to the [POPs API endpoint](https://www.fastly.com/documentation/reference/api/utils/pops/) to get a list of available POPs used for shielding. attr_accessor :shield # Condition which, if met, will select this configuration during a request. Optional. diff --git a/lib/fastly/models/pop.rb b/lib/fastly/models/pop.rb index d4f74ddb..2265cd49 100644 --- a/lib/fastly/models/pop.rb +++ b/lib/fastly/models/pop.rb @@ -13,7 +13,7 @@ module Fastly class Pop - # the three-letter code for the [POP](https://developer.fastly.com/learning/concepts/pop/) + # the three-letter code for the [POP](https://www.fastly.com/documentation/learning/concepts/pop/) attr_accessor :code # the name of the POP @@ -31,7 +31,7 @@ class Pop attr_accessor :coordinates - # the name of the [shield code](https://developer.fastly.com/learning/concepts/shielding/#choosing-a-shield-location) if this POP is suitable for shielding + # the name of the [shield code](https://www.fastly.com/documentation/learning/concepts/shielding/#choosing-a-shield-location) if this POP is suitable for shielding attr_accessor :shield class EnumAttributeValidator diff --git a/lib/fastly/models/realtime_entry.rb b/lib/fastly/models/realtime_entry.rb index 7f4dc642..0a43e906 100644 --- a/lib/fastly/models/realtime_entry.rb +++ b/lib/fastly/models/realtime_entry.rb @@ -18,7 +18,7 @@ class RealtimeEntry attr_accessor :aggregated - # Groups [measurements](#measurements-data-model) by POP. See the [POPs API](/reference/api/utils/pops/) for details of POP identifiers. + # Groups [measurements](#measurements-data-model) by POP. See the [POPs API](https://www.fastly.com/documentation/reference/api/utils/pops/) for details of POP identifiers. attr_accessor :datacenter # Attribute mapping from ruby-style variable name to JSON key. diff --git a/lib/fastly/models/relationship_tls_certificate.rb b/lib/fastly/models/relationship_tls_certificate.rb index fddb9d57..f0b16d00 100644 --- a/lib/fastly/models/relationship_tls_certificate.rb +++ b/lib/fastly/models/relationship_tls_certificate.rb @@ -12,7 +12,7 @@ require 'time' module Fastly - # The [TLS certificate](/reference/api/tls/custom-certs/certificates/) being used to terminate TLS traffic for a domain. Required. + # The [TLS certificate](https://www.fastly.com/documentation/reference/api/tls/custom-certs/certificates/) being used to terminate TLS traffic for a domain. Required. class RelationshipTlsCertificate attr_accessor :tls_certificate diff --git a/lib/fastly/models/relationship_tls_configuration.rb b/lib/fastly/models/relationship_tls_configuration.rb index 431ea9b1..4eee571f 100644 --- a/lib/fastly/models/relationship_tls_configuration.rb +++ b/lib/fastly/models/relationship_tls_configuration.rb @@ -12,7 +12,7 @@ require 'time' module Fastly - # The [TLS configuration](/reference/api/tls/custom-certs/configuration/) being used to terminate TLS traffic. Optional. + # The [TLS configuration](https://www.fastly.com/documentation/reference/api/tls/custom-certs/configuration/) being used to terminate TLS traffic. Optional. class RelationshipTlsConfiguration attr_accessor :tls_configuration diff --git a/lib/fastly/models/results.rb b/lib/fastly/models/results.rb index 7f8cf65f..9a684e21 100644 --- a/lib/fastly/models/results.rb +++ b/lib/fastly/models/results.rb @@ -251,12 +251,18 @@ class Results # Total header bytes delivered from the Fastly Image Optimizer service, including shield traffic. attr_accessor :imgopto_resp_header_bytes + # Number of responses that came from the Fastly Image Optimizer service via a shield. + attr_accessor :imgopto_shield + # Total body bytes delivered via a shield from the Fastly Image Optimizer service. attr_accessor :imgopto_shield_resp_body_bytes # Total header bytes delivered via a shield from the Fastly Image Optimizer service. attr_accessor :imgopto_shield_resp_header_bytes + # Number of transforms performed by the Fastly Image Optimizer service. + attr_accessor :imgopto_transforms + # Number of video responses that came from the Fastly Image Optimizer service. attr_accessor :imgvideo @@ -776,8 +782,10 @@ def self.attribute_map :'imgopto' => :'imgopto', :'imgopto_resp_body_bytes' => :'imgopto_resp_body_bytes', :'imgopto_resp_header_bytes' => :'imgopto_resp_header_bytes', + :'imgopto_shield' => :'imgopto_shield', :'imgopto_shield_resp_body_bytes' => :'imgopto_shield_resp_body_bytes', :'imgopto_shield_resp_header_bytes' => :'imgopto_shield_resp_header_bytes', + :'imgopto_transforms' => :'imgopto_transforms', :'imgvideo' => :'imgvideo', :'imgvideo_frames' => :'imgvideo_frames', :'imgvideo_resp_header_bytes' => :'imgvideo_resp_header_bytes', @@ -1014,8 +1022,10 @@ def self.fastly_types :'imgopto' => :'Integer', :'imgopto_resp_body_bytes' => :'Integer', :'imgopto_resp_header_bytes' => :'Integer', + :'imgopto_shield' => :'Integer', :'imgopto_shield_resp_body_bytes' => :'Integer', :'imgopto_shield_resp_header_bytes' => :'Integer', + :'imgopto_transforms' => :'Integer', :'imgvideo' => :'Integer', :'imgvideo_frames' => :'Integer', :'imgvideo_resp_header_bytes' => :'Integer', @@ -1503,6 +1513,10 @@ def initialize(attributes = {}) self.imgopto_resp_header_bytes = attributes[:'imgopto_resp_header_bytes'] end + if attributes.key?(:'imgopto_shield') + self.imgopto_shield = attributes[:'imgopto_shield'] + end + if attributes.key?(:'imgopto_shield_resp_body_bytes') self.imgopto_shield_resp_body_bytes = attributes[:'imgopto_shield_resp_body_bytes'] end @@ -1511,6 +1525,10 @@ def initialize(attributes = {}) self.imgopto_shield_resp_header_bytes = attributes[:'imgopto_shield_resp_header_bytes'] end + if attributes.key?(:'imgopto_transforms') + self.imgopto_transforms = attributes[:'imgopto_transforms'] + end + if attributes.key?(:'imgvideo') self.imgvideo = attributes[:'imgvideo'] end @@ -2193,8 +2211,10 @@ def ==(o) imgopto == o.imgopto && imgopto_resp_body_bytes == o.imgopto_resp_body_bytes && imgopto_resp_header_bytes == o.imgopto_resp_header_bytes && + imgopto_shield == o.imgopto_shield && imgopto_shield_resp_body_bytes == o.imgopto_shield_resp_body_bytes && imgopto_shield_resp_header_bytes == o.imgopto_shield_resp_header_bytes && + imgopto_transforms == o.imgopto_transforms && imgvideo == o.imgvideo && imgvideo_frames == o.imgvideo_frames && imgvideo_resp_header_bytes == o.imgvideo_resp_header_bytes && @@ -2352,7 +2372,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [requests, hits, hits_time, miss, miss_time, pass, pass_time, errors, restarts, hit_ratio, bandwidth, body_size, header_size, req_body_bytes, req_header_bytes, resp_body_bytes, resp_header_bytes, bereq_body_bytes, bereq_header_bytes, uncacheable, pipe, synth, tls, tls_v10, tls_v11, tls_v12, tls_v13, edge_requests, edge_resp_header_bytes, edge_resp_body_bytes, edge_hit_requests, edge_miss_requests, origin_fetches, origin_fetch_header_bytes, origin_fetch_body_bytes, origin_fetch_resp_header_bytes, origin_fetch_resp_body_bytes, origin_revalidations, origin_cache_fetches, shield, shield_resp_body_bytes, shield_resp_header_bytes, shield_fetches, shield_fetch_header_bytes, shield_fetch_body_bytes, shield_fetch_resp_header_bytes, shield_fetch_resp_body_bytes, shield_revalidations, shield_cache_fetches, ipv6, otfp, otfp_resp_body_bytes, otfp_resp_header_bytes, otfp_shield_resp_body_bytes, otfp_shield_resp_header_bytes, otfp_manifests, otfp_deliver_time, otfp_shield_time, video, pci, log, log_bytes, http2, http3, waf_logged, waf_blocked, waf_passed, attack_req_body_bytes, attack_req_header_bytes, attack_logged_req_body_bytes, attack_logged_req_header_bytes, attack_blocked_req_body_bytes, attack_blocked_req_header_bytes, attack_passed_req_body_bytes, attack_passed_req_header_bytes, attack_resp_synth_bytes, imgopto, imgopto_resp_body_bytes, imgopto_resp_header_bytes, imgopto_shield_resp_body_bytes, imgopto_shield_resp_header_bytes, imgvideo, imgvideo_frames, imgvideo_resp_header_bytes, imgvideo_resp_body_bytes, imgvideo_shield_resp_header_bytes, imgvideo_shield_resp_body_bytes, imgvideo_shield, imgvideo_shield_frames, status_200, status_204, status_206, status_301, status_302, status_304, status_400, status_401, status_403, status_404, status_406, status_416, status_429, status_500, status_501, status_502, status_503, status_504, status_505, status_1xx, status_2xx, status_3xx, status_4xx, status_5xx, object_size_1k, object_size_10k, object_size_100k, object_size_1m, object_size_10m, object_size_100m, object_size_1g, recv_sub_time, recv_sub_count, hash_sub_time, hash_sub_count, miss_sub_time, miss_sub_count, fetch_sub_time, fetch_sub_count, pass_sub_time, pass_sub_count, pipe_sub_time, pipe_sub_count, deliver_sub_time, deliver_sub_count, error_sub_time, error_sub_count, hit_sub_time, hit_sub_count, prehash_sub_time, prehash_sub_count, predeliver_sub_time, predeliver_sub_count, tls_handshake_sent_bytes, hit_resp_body_bytes, miss_resp_body_bytes, pass_resp_body_bytes, segblock_origin_fetches, segblock_shield_fetches, compute_requests, compute_request_time_ms, compute_request_time_billed_ms, compute_ram_used, compute_execution_time_ms, compute_req_header_bytes, compute_req_body_bytes, compute_resp_header_bytes, compute_resp_body_bytes, compute_resp_status_1xx, compute_resp_status_2xx, compute_resp_status_3xx, compute_resp_status_4xx, compute_resp_status_5xx, compute_bereq_header_bytes, compute_bereq_body_bytes, compute_beresp_header_bytes, compute_beresp_body_bytes, compute_bereqs, compute_bereq_errors, compute_resource_limit_exceeded, compute_heap_limit_exceeded, compute_stack_limit_exceeded, compute_globals_limit_exceeded, compute_guest_errors, compute_runtime_errors, edge_hit_resp_body_bytes, edge_hit_resp_header_bytes, edge_miss_resp_body_bytes, edge_miss_resp_header_bytes, origin_cache_fetch_resp_body_bytes, origin_cache_fetch_resp_header_bytes, shield_hit_requests, shield_miss_requests, shield_hit_resp_header_bytes, shield_hit_resp_body_bytes, shield_miss_resp_header_bytes, shield_miss_resp_body_bytes, websocket_req_header_bytes, websocket_req_body_bytes, websocket_resp_header_bytes, websocket_resp_body_bytes, websocket_bereq_header_bytes, websocket_bereq_body_bytes, websocket_beresp_header_bytes, websocket_beresp_body_bytes, websocket_conn_time_ms, fanout_recv_publishes, fanout_send_publishes, kv_store_class_a_operations, kv_store_class_b_operations, object_store_class_a_operations, object_store_class_b_operations, fanout_req_header_bytes, fanout_req_body_bytes, fanout_resp_header_bytes, fanout_resp_body_bytes, fanout_bereq_header_bytes, fanout_bereq_body_bytes, fanout_beresp_header_bytes, fanout_beresp_body_bytes, fanout_conn_time_ms, ddos_action_limit_streams_connections, ddos_action_limit_streams_requests, ddos_action_tarpit_accept, ddos_action_tarpit, ddos_action_close, ddos_action_blackhole, bot_challenge_starts, bot_challenge_complete_tokens_passed, bot_challenge_complete_tokens_failed, bot_challenge_complete_tokens_checked, bot_challenge_complete_tokens_disabled, bot_challenge_complete_tokens_issued, bot_challenges_issued, bot_challenges_succeeded, bot_challenges_failed, service_id, start_time].hash + [requests, hits, hits_time, miss, miss_time, pass, pass_time, errors, restarts, hit_ratio, bandwidth, body_size, header_size, req_body_bytes, req_header_bytes, resp_body_bytes, resp_header_bytes, bereq_body_bytes, bereq_header_bytes, uncacheable, pipe, synth, tls, tls_v10, tls_v11, tls_v12, tls_v13, edge_requests, edge_resp_header_bytes, edge_resp_body_bytes, edge_hit_requests, edge_miss_requests, origin_fetches, origin_fetch_header_bytes, origin_fetch_body_bytes, origin_fetch_resp_header_bytes, origin_fetch_resp_body_bytes, origin_revalidations, origin_cache_fetches, shield, shield_resp_body_bytes, shield_resp_header_bytes, shield_fetches, shield_fetch_header_bytes, shield_fetch_body_bytes, shield_fetch_resp_header_bytes, shield_fetch_resp_body_bytes, shield_revalidations, shield_cache_fetches, ipv6, otfp, otfp_resp_body_bytes, otfp_resp_header_bytes, otfp_shield_resp_body_bytes, otfp_shield_resp_header_bytes, otfp_manifests, otfp_deliver_time, otfp_shield_time, video, pci, log, log_bytes, http2, http3, waf_logged, waf_blocked, waf_passed, attack_req_body_bytes, attack_req_header_bytes, attack_logged_req_body_bytes, attack_logged_req_header_bytes, attack_blocked_req_body_bytes, attack_blocked_req_header_bytes, attack_passed_req_body_bytes, attack_passed_req_header_bytes, attack_resp_synth_bytes, imgopto, imgopto_resp_body_bytes, imgopto_resp_header_bytes, imgopto_shield, imgopto_shield_resp_body_bytes, imgopto_shield_resp_header_bytes, imgopto_transforms, imgvideo, imgvideo_frames, imgvideo_resp_header_bytes, imgvideo_resp_body_bytes, imgvideo_shield_resp_header_bytes, imgvideo_shield_resp_body_bytes, imgvideo_shield, imgvideo_shield_frames, status_200, status_204, status_206, status_301, status_302, status_304, status_400, status_401, status_403, status_404, status_406, status_416, status_429, status_500, status_501, status_502, status_503, status_504, status_505, status_1xx, status_2xx, status_3xx, status_4xx, status_5xx, object_size_1k, object_size_10k, object_size_100k, object_size_1m, object_size_10m, object_size_100m, object_size_1g, recv_sub_time, recv_sub_count, hash_sub_time, hash_sub_count, miss_sub_time, miss_sub_count, fetch_sub_time, fetch_sub_count, pass_sub_time, pass_sub_count, pipe_sub_time, pipe_sub_count, deliver_sub_time, deliver_sub_count, error_sub_time, error_sub_count, hit_sub_time, hit_sub_count, prehash_sub_time, prehash_sub_count, predeliver_sub_time, predeliver_sub_count, tls_handshake_sent_bytes, hit_resp_body_bytes, miss_resp_body_bytes, pass_resp_body_bytes, segblock_origin_fetches, segblock_shield_fetches, compute_requests, compute_request_time_ms, compute_request_time_billed_ms, compute_ram_used, compute_execution_time_ms, compute_req_header_bytes, compute_req_body_bytes, compute_resp_header_bytes, compute_resp_body_bytes, compute_resp_status_1xx, compute_resp_status_2xx, compute_resp_status_3xx, compute_resp_status_4xx, compute_resp_status_5xx, compute_bereq_header_bytes, compute_bereq_body_bytes, compute_beresp_header_bytes, compute_beresp_body_bytes, compute_bereqs, compute_bereq_errors, compute_resource_limit_exceeded, compute_heap_limit_exceeded, compute_stack_limit_exceeded, compute_globals_limit_exceeded, compute_guest_errors, compute_runtime_errors, edge_hit_resp_body_bytes, edge_hit_resp_header_bytes, edge_miss_resp_body_bytes, edge_miss_resp_header_bytes, origin_cache_fetch_resp_body_bytes, origin_cache_fetch_resp_header_bytes, shield_hit_requests, shield_miss_requests, shield_hit_resp_header_bytes, shield_hit_resp_body_bytes, shield_miss_resp_header_bytes, shield_miss_resp_body_bytes, websocket_req_header_bytes, websocket_req_body_bytes, websocket_resp_header_bytes, websocket_resp_body_bytes, websocket_bereq_header_bytes, websocket_bereq_body_bytes, websocket_beresp_header_bytes, websocket_beresp_body_bytes, websocket_conn_time_ms, fanout_recv_publishes, fanout_send_publishes, kv_store_class_a_operations, kv_store_class_b_operations, object_store_class_a_operations, object_store_class_b_operations, fanout_req_header_bytes, fanout_req_body_bytes, fanout_resp_header_bytes, fanout_resp_body_bytes, fanout_bereq_header_bytes, fanout_bereq_body_bytes, fanout_beresp_header_bytes, fanout_beresp_body_bytes, fanout_conn_time_ms, ddos_action_limit_streams_connections, ddos_action_limit_streams_requests, ddos_action_tarpit_accept, ddos_action_tarpit, ddos_action_close, ddos_action_blackhole, bot_challenge_starts, bot_challenge_complete_tokens_passed, bot_challenge_complete_tokens_failed, bot_challenge_complete_tokens_checked, bot_challenge_complete_tokens_disabled, bot_challenge_complete_tokens_issued, bot_challenges_issued, bot_challenges_succeeded, bot_challenges_failed, service_id, start_time].hash end # Builds the object from hash diff --git a/lib/fastly/models/service_detail.rb b/lib/fastly/models/service_detail.rb index 1b1e619d..e31c2898 100644 --- a/lib/fastly/models/service_detail.rb +++ b/lib/fastly/models/service_detail.rb @@ -42,7 +42,7 @@ class ServiceDetail # Whether the service is paused. Services are paused due to a lack of traffic for an extended period of time. Services are resumed either when a draft version is activated or a locked version is cloned and reactivated. attr_accessor :paused - # A list of [versions](/reference/api/services/version/) associated with the service. + # A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service. attr_accessor :versions attr_accessor :active_version diff --git a/lib/fastly/models/service_list_response.rb b/lib/fastly/models/service_list_response.rb index 30b32296..efac69bf 100644 --- a/lib/fastly/models/service_list_response.rb +++ b/lib/fastly/models/service_list_response.rb @@ -36,10 +36,10 @@ class ServiceListResponse attr_accessor :id - # Current [version](/reference/api/services/version/) of the service. + # Current [version](https://www.fastly.com/documentation/reference/api/services/version/) of the service. attr_accessor :version - # A list of [versions](/reference/api/services/version/) associated with the service. + # A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service. attr_accessor :versions class EnumAttributeValidator diff --git a/lib/fastly/models/service_list_response_all_of.rb b/lib/fastly/models/service_list_response_all_of.rb index dc661f1f..1295dc81 100644 --- a/lib/fastly/models/service_list_response_all_of.rb +++ b/lib/fastly/models/service_list_response_all_of.rb @@ -15,10 +15,10 @@ module Fastly class ServiceListResponseAllOf attr_accessor :id - # Current [version](/reference/api/services/version/) of the service. + # Current [version](https://www.fastly.com/documentation/reference/api/services/version/) of the service. attr_accessor :version - # A list of [versions](/reference/api/services/version/) associated with the service. + # A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service. attr_accessor :versions # Attribute mapping from ruby-style variable name to JSON key. diff --git a/lib/fastly/models/service_response.rb b/lib/fastly/models/service_response.rb index bb7371af..57fba8f1 100644 --- a/lib/fastly/models/service_response.rb +++ b/lib/fastly/models/service_response.rb @@ -42,7 +42,7 @@ class ServiceResponse # Whether the service is paused. Services are paused due to a lack of traffic for an extended period of time. Services are resumed either when a draft version is activated or a locked version is cloned and reactivated. attr_accessor :paused - # A list of [versions](/reference/api/services/version/) associated with the service. + # A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service. attr_accessor :versions class EnumAttributeValidator diff --git a/lib/fastly/models/service_response_all_of.rb b/lib/fastly/models/service_response_all_of.rb index 910ad80c..41de77d1 100644 --- a/lib/fastly/models/service_response_all_of.rb +++ b/lib/fastly/models/service_response_all_of.rb @@ -21,7 +21,7 @@ class ServiceResponseAllOf # Whether the service is paused. Services are paused due to a lack of traffic for an extended period of time. Services are resumed either when a draft version is activated or a locked version is cloned and reactivated. attr_accessor :paused - # A list of [versions](/reference/api/services/version/) associated with the service. + # A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service. attr_accessor :versions # Attribute mapping from ruby-style variable name to JSON key. diff --git a/lib/fastly/models/tls_configuration_response_attributes.rb b/lib/fastly/models/tls_configuration_response_attributes.rb index 79001acd..711f83b0 100644 --- a/lib/fastly/models/tls_configuration_response_attributes.rb +++ b/lib/fastly/models/tls_configuration_response_attributes.rb @@ -22,7 +22,7 @@ class TlsConfigurationResponseAttributes # Date and time in ISO 8601 format. attr_accessor :updated_at - # Signifies whether or not Fastly will use this configuration as a default when creating a new [TLS Activation](/reference/api/tls/custom-certs/activations/). + # Signifies whether or not Fastly will use this configuration as a default when creating a new [TLS Activation](https://www.fastly.com/documentation/reference/api/tls/custom-certs/activations/). attr_accessor :default # HTTP protocols available on your configuration. diff --git a/lib/fastly/models/tls_configuration_response_attributes_all_of.rb b/lib/fastly/models/tls_configuration_response_attributes_all_of.rb index b847a180..46b1abf3 100644 --- a/lib/fastly/models/tls_configuration_response_attributes_all_of.rb +++ b/lib/fastly/models/tls_configuration_response_attributes_all_of.rb @@ -13,7 +13,7 @@ module Fastly class TlsConfigurationResponseAttributesAllOf - # Signifies whether or not Fastly will use this configuration as a default when creating a new [TLS Activation](/reference/api/tls/custom-certs/activations/). + # Signifies whether or not Fastly will use this configuration as a default when creating a new [TLS Activation](https://www.fastly.com/documentation/reference/api/tls/custom-certs/activations/). attr_accessor :default # HTTP protocols available on your configuration. diff --git a/lib/fastly/models/tls_csr.rb b/lib/fastly/models/tls_csr.rb new file mode 100644 index 00000000..f782998e --- /dev/null +++ b/lib/fastly/models/tls_csr.rb @@ -0,0 +1,216 @@ +=begin +#Fastly API + +#Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'date' +require 'time' + +module Fastly + class TlsCsr + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'data' => :'data' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.fastly_types + { + :'data' => :'TlsCsrData' + } + end + + # List of attributes with nullable: true + def self.fastly_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::TlsCsr` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::TlsCsr`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [data].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.fastly_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Fastly.const_get(type) + klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.fastly_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/fastly/models/tls_csr_data.rb b/lib/fastly/models/tls_csr_data.rb new file mode 100644 index 00000000..a475e882 --- /dev/null +++ b/lib/fastly/models/tls_csr_data.rb @@ -0,0 +1,236 @@ +=begin +#Fastly API + +#Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'date' +require 'time' + +module Fastly + class TlsCsrData + attr_accessor :type + + attr_accessor :attributes + + attr_accessor :relationships + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'attributes' => :'attributes', + :'relationships' => :'relationships' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.fastly_types + { + :'type' => :'TypeTlsCsr', + :'attributes' => :'TlsCsrDataAttributes', + :'relationships' => :'RelationshipTlsPrivateKey' + } + end + + # List of attributes with nullable: true + def self.fastly_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::TlsCsrData` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::TlsCsrData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + else + self.type = 'csr' + end + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'relationships') + self.relationships = attributes[:'relationships'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + attributes == o.attributes && + relationships == o.relationships + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, attributes, relationships].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.fastly_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Fastly.const_get(type) + klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.fastly_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/fastly/models/tls_csr_data_attributes.rb b/lib/fastly/models/tls_csr_data_attributes.rb new file mode 100644 index 00000000..08a037b9 --- /dev/null +++ b/lib/fastly/models/tls_csr_data_attributes.rb @@ -0,0 +1,358 @@ +=begin +#Fastly API + +#Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'date' +require 'time' + +module Fastly + class TlsCsrDataAttributes + # Subject Alternate Names - An array of one or more fully qualified domain names or public IP addresses to be secured by this certificate. Required. + attr_accessor :sans + + # Common Name (CN) - The fully qualified domain name (FQDN) to be secured by this certificate. The common name should be one of the entries in the SANs parameter. + attr_accessor :common_name + + # Country (C) - The two-letter ISO country code where the organization is located. + attr_accessor :country + + # State (S) - The state, province, region, or county where the organization is located. This should not be abbreviated. + attr_accessor :state + + # Locality (L) - The locality, city, town, or village where the organization is located. + attr_accessor :city + + # Postal Code - The postal code where the organization is located. + attr_accessor :postal_code + + # Street Address - The street address where the organization is located. + attr_accessor :street_address + + # Organization (O) - The legal name of the organization, including any suffixes. This should not be abbreviated. + attr_accessor :organization + + # Organizational Unit (OU) - The internal division of the organization managing the certificate. + attr_accessor :organizational_unit + + # Email Address (EMAIL) - The organizational contact for this. + attr_accessor :email + + # CSR Key Type. + attr_accessor :key_type + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'sans' => :'sans', + :'common_name' => :'common_name', + :'country' => :'country', + :'state' => :'state', + :'city' => :'city', + :'postal_code' => :'postal_code', + :'street_address' => :'street_address', + :'organization' => :'organization', + :'organizational_unit' => :'organizational_unit', + :'email' => :'email', + :'key_type' => :'key_type' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.fastly_types + { + :'sans' => :'Array', + :'common_name' => :'String', + :'country' => :'String', + :'state' => :'String', + :'city' => :'String', + :'postal_code' => :'String', + :'street_address' => :'String', + :'organization' => :'String', + :'organizational_unit' => :'String', + :'email' => :'String', + :'key_type' => :'String' + } + end + + # List of attributes with nullable: true + def self.fastly_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::TlsCsrDataAttributes` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::TlsCsrDataAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'sans') + if (value = attributes[:'sans']).is_a?(Array) + self.sans = value + end + end + + if attributes.key?(:'common_name') + self.common_name = attributes[:'common_name'] + end + + if attributes.key?(:'country') + self.country = attributes[:'country'] + end + + if attributes.key?(:'state') + self.state = attributes[:'state'] + end + + if attributes.key?(:'city') + self.city = attributes[:'city'] + end + + if attributes.key?(:'postal_code') + self.postal_code = attributes[:'postal_code'] + end + + if attributes.key?(:'street_address') + self.street_address = attributes[:'street_address'] + end + + if attributes.key?(:'organization') + self.organization = attributes[:'organization'] + end + + if attributes.key?(:'organizational_unit') + self.organizational_unit = attributes[:'organizational_unit'] + end + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'key_type') + self.key_type = attributes[:'key_type'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @sans.nil? + invalid_properties.push('invalid value for "sans", sans cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @sans.nil? + key_type_validator = EnumAttributeValidator.new('String', ["RSA2048", "ECDSA256"]) + return false unless key_type_validator.valid?(@key_type) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] key_type Object to be assigned + def key_type=(key_type) + validator = EnumAttributeValidator.new('String', ["RSA2048", "ECDSA256"]) + unless validator.valid?(key_type) + fail ArgumentError, "invalid value for \"key_type\", must be one of #{validator.allowable_values}." + end + @key_type = key_type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + sans == o.sans && + common_name == o.common_name && + country == o.country && + state == o.state && + city == o.city && + postal_code == o.postal_code && + street_address == o.street_address && + organization == o.organization && + organizational_unit == o.organizational_unit && + email == o.email && + key_type == o.key_type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [sans, common_name, country, state, city, postal_code, street_address, organization, organizational_unit, email, key_type].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.fastly_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Fastly.const_get(type) + klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.fastly_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/fastly/models/tls_csr_error_response.rb b/lib/fastly/models/tls_csr_error_response.rb new file mode 100644 index 00000000..068a731d --- /dev/null +++ b/lib/fastly/models/tls_csr_error_response.rb @@ -0,0 +1,218 @@ +=begin +#Fastly API + +#Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'date' +require 'time' + +module Fastly + class TlsCsrErrorResponse + attr_accessor :errors + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'errors' => :'errors' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.fastly_types + { + :'errors' => :'Array' + } + end + + # List of attributes with nullable: true + def self.fastly_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::TlsCsrErrorResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::TlsCsrErrorResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'errors') + if (value = attributes[:'errors']).is_a?(Array) + self.errors = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + errors == o.errors + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [errors].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.fastly_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Fastly.const_get(type) + klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.fastly_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/fastly/models/tls_csr_response.rb b/lib/fastly/models/tls_csr_response.rb new file mode 100644 index 00000000..66863d69 --- /dev/null +++ b/lib/fastly/models/tls_csr_response.rb @@ -0,0 +1,216 @@ +=begin +#Fastly API + +#Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'date' +require 'time' + +module Fastly + class TlsCsrResponse + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'data' => :'data' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.fastly_types + { + :'data' => :'TlsCsrResponseData' + } + end + + # List of attributes with nullable: true + def self.fastly_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::TlsCsrResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::TlsCsrResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [data].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.fastly_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Fastly.const_get(type) + klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.fastly_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/fastly/models/tls_csr_response_attributes.rb b/lib/fastly/models/tls_csr_response_attributes.rb new file mode 100644 index 00000000..6b616583 --- /dev/null +++ b/lib/fastly/models/tls_csr_response_attributes.rb @@ -0,0 +1,217 @@ +=begin +#Fastly API + +#Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'date' +require 'time' + +module Fastly + class TlsCsrResponseAttributes + # The PEM encoded CSR. + attr_accessor :content + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'content' => :'content' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.fastly_types + { + :'content' => :'String' + } + end + + # List of attributes with nullable: true + def self.fastly_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::TlsCsrResponseAttributes` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::TlsCsrResponseAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'content') + self.content = attributes[:'content'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + content == o.content + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [content].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.fastly_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Fastly.const_get(type) + klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.fastly_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/fastly/models/tls_csr_response_data.rb b/lib/fastly/models/tls_csr_response_data.rb new file mode 100644 index 00000000..f5a2d564 --- /dev/null +++ b/lib/fastly/models/tls_csr_response_data.rb @@ -0,0 +1,245 @@ +=begin +#Fastly API + +#Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'date' +require 'time' + +module Fastly + class TlsCsrResponseData + attr_accessor :id + + attr_accessor :type + + attr_accessor :attributes + + attr_accessor :relationships + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type', + :'attributes' => :'attributes', + :'relationships' => :'relationships' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.fastly_types + { + :'id' => :'String', + :'type' => :'TypeTlsCsr', + :'attributes' => :'TlsCsrResponseAttributes', + :'relationships' => :'RelationshipTlsPrivateKey' + } + end + + # List of attributes with nullable: true + def self.fastly_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::TlsCsrResponseData` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::TlsCsrResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + else + self.type = 'csr' + end + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'relationships') + self.relationships = attributes[:'relationships'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + attributes == o.attributes && + relationships == o.relationships + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, type, attributes, relationships].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.fastly_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Fastly.const_get(type) + klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.fastly_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/fastly/models/tls_subscription_data_attributes.rb b/lib/fastly/models/tls_subscription_data_attributes.rb index 2e1d8b50..cfd30857 100644 --- a/lib/fastly/models/tls_subscription_data_attributes.rb +++ b/lib/fastly/models/tls_subscription_data_attributes.rb @@ -93,7 +93,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - certificate_authority_validator = EnumAttributeValidator.new('String', ["lets-encrypt", "globalsign"]) + certificate_authority_validator = EnumAttributeValidator.new('String', ["lets-encrypt", "certainly", "globalsign"]) return false unless certificate_authority_validator.valid?(@certificate_authority) true end @@ -101,7 +101,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] certificate_authority Object to be assigned def certificate_authority=(certificate_authority) - validator = EnumAttributeValidator.new('String', ["lets-encrypt", "globalsign"]) + validator = EnumAttributeValidator.new('String', ["lets-encrypt", "certainly", "globalsign"]) unless validator.valid?(certificate_authority) fail ArgumentError, "invalid value for \"certificate_authority\", must be one of #{validator.allowable_values}." end diff --git a/lib/fastly/models/tls_subscription_response_attributes.rb b/lib/fastly/models/tls_subscription_response_attributes.rb index 4c0bb543..88e1e668 100644 --- a/lib/fastly/models/tls_subscription_response_attributes.rb +++ b/lib/fastly/models/tls_subscription_response_attributes.rb @@ -25,6 +25,9 @@ class TlsSubscriptionResponseAttributes # The current state of your subscription. attr_accessor :state + # Subscription has an active order + attr_accessor :has_active_order + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -53,7 +56,8 @@ def self.attribute_map :'created_at' => :'created_at', :'deleted_at' => :'deleted_at', :'updated_at' => :'updated_at', - :'state' => :'state' + :'state' => :'state', + :'has_active_order' => :'has_active_order' } end @@ -68,7 +72,8 @@ def self.fastly_types :'created_at' => :'Time', :'deleted_at' => :'Time', :'updated_at' => :'Time', - :'state' => :'String' + :'state' => :'String', + :'has_active_order' => :'Boolean' } end @@ -119,6 +124,10 @@ def initialize(attributes = {}) if attributes.key?(:'state') self.state = attributes[:'state'] end + + if attributes.key?(:'has_active_order') + self.has_active_order = attributes[:'has_active_order'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -154,7 +163,8 @@ def ==(o) created_at == o.created_at && deleted_at == o.deleted_at && updated_at == o.updated_at && - state == o.state + state == o.state && + has_active_order == o.has_active_order end # @see the `==` method @@ -166,7 +176,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [created_at, deleted_at, updated_at, state].hash + [created_at, deleted_at, updated_at, state, has_active_order].hash end # Builds the object from hash diff --git a/lib/fastly/models/tls_subscription_response_attributes_all_of.rb b/lib/fastly/models/tls_subscription_response_attributes_all_of.rb index b05e28f2..d9c8df45 100644 --- a/lib/fastly/models/tls_subscription_response_attributes_all_of.rb +++ b/lib/fastly/models/tls_subscription_response_attributes_all_of.rb @@ -16,6 +16,9 @@ class TlsSubscriptionResponseAttributesAllOf # The current state of your subscription. attr_accessor :state + # Subscription has an active order + attr_accessor :has_active_order + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -41,7 +44,8 @@ def valid?(value) # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'state' => :'state' + :'state' => :'state', + :'has_active_order' => :'has_active_order' } end @@ -53,7 +57,8 @@ def self.acceptable_attributes # Attribute type mapping. def self.fastly_types { - :'state' => :'String' + :'state' => :'String', + :'has_active_order' => :'Boolean' } end @@ -81,6 +86,10 @@ def initialize(attributes = {}) if attributes.key?(:'state') self.state = attributes[:'state'] end + + if attributes.key?(:'has_active_order') + self.has_active_order = attributes[:'has_active_order'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -113,7 +122,8 @@ def state=(state) def ==(o) return true if self.equal?(o) self.class == o.class && - state == o.state + state == o.state && + has_active_order == o.has_active_order end # @see the `==` method @@ -125,7 +135,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [state].hash + [state, has_active_order].hash end # Builds the object from hash diff --git a/lib/fastly/models/type_tls_csr.rb b/lib/fastly/models/type_tls_csr.rb new file mode 100644 index 00000000..0e390294 --- /dev/null +++ b/lib/fastly/models/type_tls_csr.rb @@ -0,0 +1,34 @@ +=begin +#Fastly API + +#Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/) + +The version of the OpenAPI document: 1.0.0 +Contact: oss@fastly.com + +=end + +require 'date' +require 'time' + +module Fastly + class TypeTlsCsr + CSR = "csr".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + constantValues = TypeTlsCsr.constants.select { |c| TypeTlsCsr::const_get(c) == value } + raise "Invalid ENUM value #{value} for class #TypeTlsCsr" if constantValues.empty? + value + end + end +end diff --git a/lib/fastly/version.rb b/lib/fastly/version.rb index 41d9f327..3bf89101 100644 --- a/lib/fastly/version.rb +++ b/lib/fastly/version.rb @@ -9,5 +9,5 @@ =end module Fastly - VERSION = '8.0.1' + VERSION = '8.1.0' end diff --git a/sig.json b/sig.json index 203b64ec..3e89073b 100644 --- a/sig.json +++ b/sig.json @@ -1 +1 @@ -{"G": "40613202", "D": "01d08f3f"} +{"G": "fba34a94", "D": "3069431b"}