You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/accounting/LineItem.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -14,10 +14,10 @@ Name | Type | Description | Notes
14
14
**tax_type** | **String** | The tax type from TaxRates | [optional]
15
15
**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]
**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]
17
+
**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]
18
18
**tracking** | [**Array<LineItemTracking>**](LineItemTracking.md) | Optional Tracking Category – see Tracking. Any LineItem can have a maximum of 2 <TrackingCategory> elements. | [optional]
19
19
**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]
20
-
**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]
20
+
**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]
21
21
**repeating_invoice_id** | **String** | The Xero identifier for a Repeating Invoice | [optional]
Copy file name to clipboardExpand all lines: docs/accounting/index.html
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -3577,7 +3577,7 @@
3577
3577
},
3578
3578
"LineAmount" : {
3579
3579
"type" : "number",
3580
-
"description" : "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)",
3580
+
"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",
3581
3581
"format" : "double",
3582
3582
"x-is-money" : true
3583
3583
},
@@ -3596,7 +3596,7 @@
3596
3596
},
3597
3597
"DiscountAmount" : {
3598
3598
"type" : "number",
3599
-
"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.",
3599
+
"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.",
Copy file name to clipboardExpand all lines: docs/app_store/AppStoreApi.md
+199Lines changed: 199 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,9 @@ All URIs are relative to *https://api.xero.com/appstore/2.0*
5
5
Method | HTTP request | Description
6
6
------------- | ------------- | -------------
7
7
[**get_subscription**](AppStoreApi.md#get_subscription) | **GET** /subscriptions/{subscriptionId} | Retrieves a subscription for a given subscriptionId
8
+
[**get_usage_records**](AppStoreApi.md#get_usage_records) | **GET** /subscriptions/{subscriptionId}/usage-records | Gets all usage records related to the subscription
9
+
[**post_usage_records**](AppStoreApi.md#post_usage_records) | **POST** /subscriptions/{subscriptionId}/items/{subscriptionItemId}/usage-records | Send metered usage belonging to this subscription and subscription item
10
+
[**put_usage_records**](AppStoreApi.md#put_usage_records) | **PUT** /subscriptions/{subscriptionId}/items/{subscriptionItemId}/usage-records/{usageRecordId} | Update and existing metered usage belonging to this subscription and subscription item
8
11
9
12
10
13
@@ -69,3 +72,199 @@ Name | Type | Description | Notes
subscription_id ='00000000-0000-0000-0000-000000000000'# String | Unique identifier for Subscription object
170
+
subscription_item_id ='00000000-0000-0000-0000-000000000000'# String | The unique identifier of the subscriptionItem
171
+
create_usage_record = { "timestamp": "2022-01-21T13:01:00Z", "quantity": 10 } # CreateUsageRecord | Contains the quantity for the usage record to create
172
+
begin
173
+
#Send metered usage belonging to this subscription and subscription item
174
+
result = api_instance.post_usage_records(subscription_id, subscription_item_id, create_usage_record)
175
+
p result
176
+
rescueXeroRuby::AppStore::ApiError => e
177
+
puts"Exception when calling AppStoreApi->post_usage_records: #{e}"
0 commit comments