From c40b11047d23895bce706cbe23676fe7ce7a72d6 Mon Sep 17 00:00:00 2001 From: Rett Behrens Date: Wed, 2 Nov 2022 11:39:14 -0600 Subject: [PATCH 1/2] generates xero-ruby 3.15.0 from OAS 2.31.0 --- README.md | 2 +- docs/accounting/LineItem.md | 4 +- docs/accounting/index.html | 6 +- docs/app_store/AppStoreApi.md | 199 +++++++ docs/app_store/CreateUsageRecord.md | 19 + docs/app_store/UpdateUsageRecord.md | 17 + docs/app_store/UsageRecord.md | 31 ++ docs/app_store/UsageRecordsList.md | 17 + docs/app_store/index.html | 505 +++++++++++++++++- docs/assets/index.html | 2 +- docs/files/index.html | 2 +- docs/finance/index.html | 2 +- docs/payroll_au/index.html | 2 +- docs/payroll_nz/index.html | 2 +- docs/payroll_uk/index.html | 2 +- docs/projects/index.html | 2 +- lib/xero-ruby.rb | 4 + lib/xero-ruby/api/app_store_api.rb | 238 +++++++++ lib/xero-ruby/models/accounting/line_item.rb | 4 +- .../models/app_store/create_usage_record.rb | 243 +++++++++ .../models/app_store/update_usage_record.rb | 228 ++++++++ .../models/app_store/usage_record.rb | 332 ++++++++++++ .../models/app_store/usage_records_list.rb | 230 ++++++++ lib/xero-ruby/version.rb | 4 +- 24 files changed, 2079 insertions(+), 18 deletions(-) create mode 100644 docs/app_store/CreateUsageRecord.md create mode 100644 docs/app_store/UpdateUsageRecord.md create mode 100644 docs/app_store/UsageRecord.md create mode 100644 docs/app_store/UsageRecordsList.md create mode 100644 lib/xero-ruby/models/app_store/create_usage_record.rb create mode 100644 lib/xero-ruby/models/app_store/update_usage_record.rb create mode 100644 lib/xero-ruby/models/app_store/usage_record.rb create mode 100644 lib/xero-ruby/models/app_store/usage_records_list.rb diff --git a/README.md b/README.md index d443aeb8..9052275e 100644 --- a/README.md +++ b/README.md @@ -175,7 +175,7 @@ xero_app_store_client ||= XeroRuby::ApiClient.new(credentials: { client_id: ENV['CLIENT_ID'], client_secret: ENV['CLIENT_SECRET'], grant_type: 'client_credentials' - scopes: 'marketplace.billing openid profile email' + scopes: ['marketplace.billing'] }) xero_app_store_client.get_client_credentials_token diff --git a/docs/accounting/LineItem.md b/docs/accounting/LineItem.md index 38b4e9dc..8d690d3c 100644 --- a/docs/accounting/LineItem.md +++ b/docs/accounting/LineItem.md @@ -14,10 +14,10 @@ Name | Type | Description | Notes **tax_type** | **String** | The tax type from TaxRates | [optional] **tax_amount** | **BigDecimal** | The tax amount is auto calculated as a percentage of the line amount (see below) based on the tax rate. This value can be overriden if the calculated <TaxAmount> is not correct. | [optional] **item** | [**LineItemItem**](LineItemItem.md) | | [optional] -**line_amount** | **BigDecimal** | If you wish to omit either of the <Quantity> or <UnitAmount> you can provide a LineAmount and Xero will calculate the missing amount for you. The line amount reflects the discounted price if a DiscountRate has been used . i.e LineAmount = Quantity * Unit Amount * ((100 – DiscountRate)/100) | [optional] +**line_amount** | **BigDecimal** | If you wish to omit either the Quantity or UnitAmount you can provide a LineAmount and Xero will calculate the missing amount for you. The line amount reflects the discounted price if either a DiscountRate or DiscountAmount has been used i.e. LineAmount = Quantity * Unit Amount * ((100 - DiscountRate)/100) or LineAmount = (Quantity * UnitAmount) - DiscountAmount | [optional] **tracking** | [**Array<LineItemTracking>**](LineItemTracking.md) | Optional Tracking Category – see Tracking. Any LineItem can have a maximum of 2 <TrackingCategory> elements. | [optional] **discount_rate** | **BigDecimal** | Percentage discount being applied to a line item (only supported on ACCREC invoices – ACC PAY invoices and credit notes in Xero do not support discounts | [optional] -**discount_amount** | **BigDecimal** | Discount amount being applied to a line item. Only supported on ACCREC invoices - ACCPAY invoices and credit notes in Xero do not support discounts. | [optional] +**discount_amount** | **BigDecimal** | Discount amount being applied to a line item. Only supported on ACCREC invoices and quotes. ACCPAY invoices and credit notes in Xero do not support discounts. | [optional] **repeating_invoice_id** | **String** | The Xero identifier for a Repeating Invoice | [optional] ## Code Sample diff --git a/docs/accounting/index.html b/docs/accounting/index.html index 49ec3474..e71cee26 100644 --- a/docs/accounting/index.html +++ b/docs/accounting/index.html @@ -3577,7 +3577,7 @@ }, "LineAmount" : { "type" : "number", - "description" : "If you wish to omit either of the or you can provide a LineAmount and Xero will calculate the missing amount for you. The line amount reflects the discounted price if a DiscountRate has been used . i.e LineAmount = Quantity * Unit Amount * ((100 – DiscountRate)/100)", + "description" : "If you wish to omit either the Quantity or UnitAmount you can provide a LineAmount and Xero will calculate the missing amount for you. The line amount reflects the discounted price if either a DiscountRate or DiscountAmount has been used i.e. LineAmount = Quantity * Unit Amount * ((100 - DiscountRate)/100) or LineAmount = (Quantity * UnitAmount) - DiscountAmount", "format" : "double", "x-is-money" : true }, @@ -3596,7 +3596,7 @@ }, "DiscountAmount" : { "type" : "number", - "description" : "Discount amount being applied to a line item. Only supported on ACCREC invoices - ACCPAY invoices and credit notes in Xero do not support discounts.", + "description" : "Discount amount being applied to a line item. Only supported on ACCREC invoices and quotes. ACCPAY invoices and credit notes in Xero do not support discounts.", "format" : "double", "x-is-money" : true }, @@ -6069,7 +6069,7 @@