xero-ruby 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +16 -10
- data/docs/AccountingApi.md +349 -15
- data/docs/CreditNote.md +2 -0
- data/docs/Overpayment.md +2 -0
- data/docs/Prepayment.md +2 -0
- data/lib/xero-ruby/api/accounting_api.rb +467 -11
- data/lib/xero-ruby/api_client.rb +1 -1
- data/lib/xero-ruby/api_error.rb +1 -1
- data/lib/xero-ruby/configuration.rb +1 -1
- data/lib/xero-ruby/models/account.rb +1 -1
- data/lib/xero-ruby/models/account_type.rb +1 -1
- data/lib/xero-ruby/models/accounts.rb +1 -1
- data/lib/xero-ruby/models/accounts_payable.rb +1 -1
- data/lib/xero-ruby/models/accounts_receivable.rb +1 -1
- data/lib/xero-ruby/models/address.rb +1 -1
- data/lib/xero-ruby/models/allocation.rb +1 -1
- data/lib/xero-ruby/models/allocations.rb +1 -1
- data/lib/xero-ruby/models/attachment.rb +1 -1
- data/lib/xero-ruby/models/attachments.rb +1 -1
- data/lib/xero-ruby/models/balances.rb +1 -1
- data/lib/xero-ruby/models/bank_transaction.rb +1 -1
- data/lib/xero-ruby/models/bank_transactions.rb +1 -1
- data/lib/xero-ruby/models/bank_transfer.rb +1 -1
- data/lib/xero-ruby/models/bank_transfers.rb +1 -1
- data/lib/xero-ruby/models/batch_payment.rb +1 -1
- data/lib/xero-ruby/models/batch_payment_details.rb +1 -1
- data/lib/xero-ruby/models/batch_payments.rb +1 -1
- data/lib/xero-ruby/models/bill.rb +1 -1
- data/lib/xero-ruby/models/branding_theme.rb +1 -1
- data/lib/xero-ruby/models/branding_themes.rb +1 -1
- data/lib/xero-ruby/models/cis_org_setting.rb +1 -1
- data/lib/xero-ruby/models/cis_setting.rb +1 -1
- data/lib/xero-ruby/models/cis_settings.rb +1 -1
- data/lib/xero-ruby/models/contact.rb +1 -1
- data/lib/xero-ruby/models/contact_group.rb +1 -1
- data/lib/xero-ruby/models/contact_groups.rb +1 -1
- data/lib/xero-ruby/models/contact_person.rb +1 -1
- data/lib/xero-ruby/models/contacts.rb +1 -1
- data/lib/xero-ruby/models/country_code.rb +1 -1
- data/lib/xero-ruby/models/credit_note.rb +12 -2
- data/lib/xero-ruby/models/credit_notes.rb +1 -1
- data/lib/xero-ruby/models/currencies.rb +1 -1
- data/lib/xero-ruby/models/currency.rb +1 -1
- data/lib/xero-ruby/models/currency_code.rb +1 -1
- data/lib/xero-ruby/models/element.rb +1 -1
- data/lib/xero-ruby/models/employee.rb +1 -1
- data/lib/xero-ruby/models/employees.rb +1 -1
- data/lib/xero-ruby/models/error.rb +1 -1
- data/lib/xero-ruby/models/expense_claim.rb +1 -1
- data/lib/xero-ruby/models/expense_claims.rb +1 -1
- data/lib/xero-ruby/models/external_link.rb +1 -1
- data/lib/xero-ruby/models/history_record.rb +1 -1
- data/lib/xero-ruby/models/history_records.rb +1 -1
- data/lib/xero-ruby/models/invoice.rb +1 -1
- data/lib/xero-ruby/models/invoice_reminder.rb +1 -1
- data/lib/xero-ruby/models/invoice_reminders.rb +1 -1
- data/lib/xero-ruby/models/invoices.rb +1 -1
- data/lib/xero-ruby/models/item.rb +1 -1
- data/lib/xero-ruby/models/items.rb +1 -1
- data/lib/xero-ruby/models/journal.rb +1 -1
- data/lib/xero-ruby/models/journal_line.rb +1 -1
- data/lib/xero-ruby/models/journals.rb +1 -1
- data/lib/xero-ruby/models/line_amount_types.rb +1 -1
- data/lib/xero-ruby/models/line_item.rb +1 -1
- data/lib/xero-ruby/models/line_item_tracking.rb +1 -1
- data/lib/xero-ruby/models/linked_transaction.rb +1 -1
- data/lib/xero-ruby/models/linked_transactions.rb +1 -1
- data/lib/xero-ruby/models/manual_journal.rb +1 -1
- data/lib/xero-ruby/models/manual_journal_line.rb +1 -1
- data/lib/xero-ruby/models/manual_journals.rb +1 -1
- data/lib/xero-ruby/models/online_invoice.rb +1 -1
- data/lib/xero-ruby/models/online_invoices.rb +1 -1
- data/lib/xero-ruby/models/organisation.rb +1 -1
- data/lib/xero-ruby/models/organisations.rb +1 -1
- data/lib/xero-ruby/models/overpayment.rb +12 -2
- data/lib/xero-ruby/models/overpayments.rb +1 -1
- data/lib/xero-ruby/models/payment.rb +1 -1
- data/lib/xero-ruby/models/payment_service.rb +1 -1
- data/lib/xero-ruby/models/payment_services.rb +1 -1
- data/lib/xero-ruby/models/payment_term.rb +1 -1
- data/lib/xero-ruby/models/payment_term_type.rb +1 -1
- data/lib/xero-ruby/models/payments.rb +1 -1
- data/lib/xero-ruby/models/phone.rb +1 -1
- data/lib/xero-ruby/models/prepayment.rb +12 -2
- data/lib/xero-ruby/models/prepayments.rb +1 -1
- data/lib/xero-ruby/models/purchase.rb +1 -1
- data/lib/xero-ruby/models/purchase_order.rb +1 -1
- data/lib/xero-ruby/models/purchase_orders.rb +1 -1
- data/lib/xero-ruby/models/quote.rb +1 -1
- data/lib/xero-ruby/models/quote_line_amount_types.rb +1 -1
- data/lib/xero-ruby/models/quote_status_codes.rb +1 -1
- data/lib/xero-ruby/models/quotes.rb +1 -1
- data/lib/xero-ruby/models/receipt.rb +1 -1
- data/lib/xero-ruby/models/receipts.rb +1 -1
- data/lib/xero-ruby/models/repeating_invoice.rb +1 -1
- data/lib/xero-ruby/models/repeating_invoices.rb +1 -1
- data/lib/xero-ruby/models/report.rb +1 -1
- data/lib/xero-ruby/models/report_attribute.rb +1 -1
- data/lib/xero-ruby/models/report_cell.rb +1 -1
- data/lib/xero-ruby/models/report_fields.rb +1 -1
- data/lib/xero-ruby/models/report_row.rb +1 -1
- data/lib/xero-ruby/models/report_rows.rb +1 -1
- data/lib/xero-ruby/models/report_with_row.rb +1 -1
- data/lib/xero-ruby/models/report_with_rows.rb +1 -1
- data/lib/xero-ruby/models/reports.rb +1 -1
- data/lib/xero-ruby/models/request_empty.rb +1 -1
- data/lib/xero-ruby/models/row_type.rb +1 -1
- data/lib/xero-ruby/models/sales_tracking_category.rb +1 -1
- data/lib/xero-ruby/models/schedule.rb +1 -1
- data/lib/xero-ruby/models/tax_component.rb +1 -1
- data/lib/xero-ruby/models/tax_rate.rb +1 -1
- data/lib/xero-ruby/models/tax_rates.rb +1 -1
- data/lib/xero-ruby/models/tax_type.rb +1 -1
- data/lib/xero-ruby/models/ten_nintey_nine_contact.rb +1 -1
- data/lib/xero-ruby/models/time_zone.rb +1 -1
- data/lib/xero-ruby/models/tracking_categories.rb +1 -1
- data/lib/xero-ruby/models/tracking_category.rb +1 -1
- data/lib/xero-ruby/models/tracking_option.rb +1 -1
- data/lib/xero-ruby/models/tracking_options.rb +1 -1
- data/lib/xero-ruby/models/user.rb +1 -1
- data/lib/xero-ruby/models/users.rb +1 -1
- data/lib/xero-ruby/models/validation_error.rb +1 -1
- data/lib/xero-ruby/version.rb +2 -2
- data/lib/xero-ruby.rb +1 -1
- data/pkg/xero-ruby-0.1.3.gem +0 -0
- data/pkg/xero-ruby-0.2.1.gem +0 -0
- data/spec/api/accounting_api_spec.rb +86 -6
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/account_spec.rb +1 -1
- data/spec/models/account_type_spec.rb +1 -1
- data/spec/models/accounts_payable_spec.rb +1 -1
- data/spec/models/accounts_receivable_spec.rb +1 -1
- data/spec/models/accounts_spec.rb +1 -1
- data/spec/models/address_spec.rb +1 -1
- data/spec/models/allocation_spec.rb +1 -1
- data/spec/models/allocations_spec.rb +1 -1
- data/spec/models/attachment_spec.rb +1 -1
- data/spec/models/attachments_spec.rb +1 -1
- data/spec/models/balances_spec.rb +1 -1
- data/spec/models/bank_transaction_spec.rb +1 -1
- data/spec/models/bank_transactions_spec.rb +1 -1
- data/spec/models/bank_transfer_spec.rb +1 -1
- data/spec/models/bank_transfers_spec.rb +1 -1
- data/spec/models/batch_payment_details_spec.rb +1 -1
- data/spec/models/batch_payment_spec.rb +1 -1
- data/spec/models/batch_payments_spec.rb +1 -1
- data/spec/models/bill_spec.rb +1 -1
- data/spec/models/branding_theme_spec.rb +1 -1
- data/spec/models/branding_themes_spec.rb +1 -1
- data/spec/models/cis_org_setting_spec.rb +1 -1
- data/spec/models/cis_setting_spec.rb +1 -1
- data/spec/models/cis_settings_spec.rb +1 -1
- data/spec/models/contact_group_spec.rb +1 -1
- data/spec/models/contact_groups_spec.rb +1 -1
- data/spec/models/contact_person_spec.rb +1 -1
- data/spec/models/contact_spec.rb +1 -1
- data/spec/models/contacts_spec.rb +1 -1
- data/spec/models/country_code_spec.rb +1 -1
- data/spec/models/credit_note_spec.rb +7 -1
- data/spec/models/credit_notes_spec.rb +1 -1
- data/spec/models/currencies_spec.rb +1 -1
- data/spec/models/currency_code_spec.rb +1 -1
- data/spec/models/currency_spec.rb +1 -1
- data/spec/models/element_spec.rb +1 -1
- data/spec/models/employee_spec.rb +1 -1
- data/spec/models/employees_spec.rb +1 -1
- data/spec/models/error_spec.rb +1 -1
- data/spec/models/expense_claim_spec.rb +1 -1
- data/spec/models/expense_claims_spec.rb +1 -1
- data/spec/models/external_link_spec.rb +1 -1
- data/spec/models/history_record_spec.rb +1 -1
- data/spec/models/history_records_spec.rb +1 -1
- data/spec/models/invoice_reminder_spec.rb +1 -1
- data/spec/models/invoice_reminders_spec.rb +1 -1
- data/spec/models/invoice_spec.rb +1 -1
- data/spec/models/invoices_spec.rb +1 -1
- data/spec/models/item_spec.rb +1 -1
- data/spec/models/items_spec.rb +1 -1
- data/spec/models/journal_line_spec.rb +1 -1
- data/spec/models/journal_spec.rb +1 -1
- data/spec/models/journals_spec.rb +1 -1
- data/spec/models/line_amount_types_spec.rb +1 -1
- data/spec/models/line_item_spec.rb +1 -1
- data/spec/models/line_item_tracking_spec.rb +1 -1
- data/spec/models/linked_transaction_spec.rb +1 -1
- data/spec/models/linked_transactions_spec.rb +1 -1
- data/spec/models/manual_journal_line_spec.rb +1 -1
- data/spec/models/manual_journal_spec.rb +1 -1
- data/spec/models/manual_journals_spec.rb +1 -1
- data/spec/models/online_invoice_spec.rb +1 -1
- data/spec/models/online_invoices_spec.rb +1 -1
- data/spec/models/organisation_spec.rb +1 -1
- data/spec/models/organisations_spec.rb +1 -1
- data/spec/models/overpayment_spec.rb +7 -1
- data/spec/models/overpayments_spec.rb +1 -1
- data/spec/models/payment_service_spec.rb +1 -1
- data/spec/models/payment_services_spec.rb +1 -1
- data/spec/models/payment_spec.rb +1 -1
- data/spec/models/payment_term_spec.rb +1 -1
- data/spec/models/payment_term_type_spec.rb +1 -1
- data/spec/models/payments_spec.rb +1 -1
- data/spec/models/phone_spec.rb +1 -1
- data/spec/models/prepayment_spec.rb +7 -1
- data/spec/models/prepayments_spec.rb +1 -1
- data/spec/models/purchase_order_spec.rb +1 -1
- data/spec/models/purchase_orders_spec.rb +1 -1
- data/spec/models/purchase_spec.rb +1 -1
- data/spec/models/receipt_spec.rb +1 -1
- data/spec/models/receipts_spec.rb +1 -1
- data/spec/models/repeating_invoice_spec.rb +1 -1
- data/spec/models/repeating_invoices_spec.rb +1 -1
- data/spec/models/report_attribute_spec.rb +1 -1
- data/spec/models/report_cell_spec.rb +1 -1
- data/spec/models/report_fields_spec.rb +1 -1
- data/spec/models/report_row_spec.rb +1 -1
- data/spec/models/report_rows_spec.rb +1 -1
- data/spec/models/report_spec.rb +1 -1
- data/spec/models/report_with_row_spec.rb +1 -1
- data/spec/models/report_with_rows_spec.rb +1 -1
- data/spec/models/reports_spec.rb +1 -1
- data/spec/models/request_empty_spec.rb +1 -1
- data/spec/models/row_type_spec.rb +1 -1
- data/spec/models/sales_tracking_category_spec.rb +1 -1
- data/spec/models/schedule_spec.rb +1 -1
- data/spec/models/tax_component_spec.rb +1 -1
- data/spec/models/tax_rate_spec.rb +1 -1
- data/spec/models/tax_rates_spec.rb +1 -1
- data/spec/models/tax_type_spec.rb +1 -1
- data/spec/models/ten_nintey_nine_contact_spec.rb +1 -1
- data/spec/models/time_zone_spec.rb +1 -1
- data/spec/models/tracking_categories_spec.rb +1 -1
- data/spec/models/tracking_category_spec.rb +1 -1
- data/spec/models/tracking_option_spec.rb +1 -1
- data/spec/models/tracking_options_spec.rb +1 -1
- data/spec/models/user_spec.rb +1 -1
- data/spec/models/users_spec.rb +1 -1
- data/spec/models/validation_error_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/xero-ruby.gemspec +1 -1
- metadata +4 -3
- data/pkg/xero-ruby-0.2.0.gem +0 -0
data/docs/Overpayment.md
CHANGED
@@ -19,6 +19,7 @@ Name | Type | Description | Notes
|
|
19
19
|
**currency_rate** | **Float** | The currency rate for a multicurrency overpayment. If no rate is specified, the XE.com day rate is used | [optional]
|
20
20
|
**remaining_credit** | **Float** | The remaining credit balance on the overpayment | [optional]
|
21
21
|
**allocations** | [**Array<Allocation>**](Allocation.md) | See Allocations | [optional]
|
22
|
+
**applied_amount** | **Float** | The amount of applied to an invoice | [optional]
|
22
23
|
**payments** | [**Array<Payment>**](Payment.md) | See Payments | [optional]
|
23
24
|
**has_attachments** | **Boolean** | boolean to indicate if a overpayment has an attachment | [optional]
|
24
25
|
**attachments** | [**Array<Attachment>**](Attachment.md) | See Attachments | [optional]
|
@@ -43,6 +44,7 @@ instance = XeroRuby::Overpayment.new(type: null,
|
|
43
44
|
currency_rate: null,
|
44
45
|
remaining_credit: null,
|
45
46
|
allocations: null,
|
47
|
+
applied_amount: 2.0,
|
46
48
|
payments: null,
|
47
49
|
has_attachments: null,
|
48
50
|
attachments: null)
|
data/docs/Prepayment.md
CHANGED
@@ -20,6 +20,7 @@ Name | Type | Description | Notes
|
|
20
20
|
**currency_rate** | **Float** | The currency rate for a multicurrency prepayment. If no rate is specified, the XE.com day rate is used | [optional]
|
21
21
|
**remaining_credit** | **Float** | The remaining credit balance on the prepayment | [optional]
|
22
22
|
**allocations** | [**Array<Allocation>**](Allocation.md) | See Allocations | [optional]
|
23
|
+
**applied_amount** | **Float** | The amount of applied to an invoice | [optional]
|
23
24
|
**has_attachments** | **Boolean** | boolean to indicate if a prepayment has an attachment | [optional]
|
24
25
|
**attachments** | [**Array<Attachment>**](Attachment.md) | See Attachments | [optional]
|
25
26
|
|
@@ -44,6 +45,7 @@ instance = XeroRuby::Prepayment.new(type: null,
|
|
44
45
|
currency_rate: null,
|
45
46
|
remaining_credit: null,
|
46
47
|
allocations: null,
|
48
|
+
applied_amount: 2.0,
|
47
49
|
has_attachments: null,
|
48
50
|
attachments: null)
|
49
51
|
```
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 2.0.
|
6
|
+
The version of the OpenAPI document: 2.0.3
|
7
7
|
Contact: api@xero.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 4.2.0
|
@@ -991,7 +991,7 @@ module XeroRuby
|
|
991
991
|
return data, status_code, headers
|
992
992
|
end
|
993
993
|
|
994
|
-
# Allows you to add Contacts to a
|
994
|
+
# Allows you to add Contacts to a Contact Group
|
995
995
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
996
996
|
# @param contact_group_id [String] Unique identifier for a Contact Group
|
997
997
|
# @param contacts [Contacts] Contacts with array of contacts specifiying the ContactID to be added to ContactGroup in body of request
|
@@ -1002,7 +1002,7 @@ module XeroRuby
|
|
1002
1002
|
data
|
1003
1003
|
end
|
1004
1004
|
|
1005
|
-
# Allows you to add Contacts to a
|
1005
|
+
# Allows you to add Contacts to a Contact Group
|
1006
1006
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
1007
1007
|
# @param contact_group_id [String] Unique identifier for a Contact Group
|
1008
1008
|
# @param contacts [Contacts] Contacts with array of contacts specifiying the ContactID to be added to ContactGroup in body of request
|
@@ -3152,6 +3152,87 @@ module XeroRuby
|
|
3152
3152
|
return data, status_code, headers
|
3153
3153
|
end
|
3154
3154
|
|
3155
|
+
# Allows you to create Attachment on Quote
|
3156
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
3157
|
+
# @param quote_id [String] Unique identifier for Quote object
|
3158
|
+
# @param file_name [String] Name of the attachment
|
3159
|
+
# @param body [String] Byte array of file in body of request
|
3160
|
+
# @param [Hash] opts the optional parameters
|
3161
|
+
# @return [Attachments]
|
3162
|
+
def create_quote_attachment_by_file_name(xero_tenant_id, quote_id, file_name, body, opts = {})
|
3163
|
+
data, _status_code, _headers = create_quote_attachment_by_file_name_with_http_info(xero_tenant_id, quote_id, file_name, body, opts)
|
3164
|
+
data
|
3165
|
+
end
|
3166
|
+
|
3167
|
+
# Allows you to create Attachment on Quote
|
3168
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
3169
|
+
# @param quote_id [String] Unique identifier for Quote object
|
3170
|
+
# @param file_name [String] Name of the attachment
|
3171
|
+
# @param body [String] Byte array of file in body of request
|
3172
|
+
# @param [Hash] opts the optional parameters
|
3173
|
+
# @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
|
3174
|
+
def create_quote_attachment_by_file_name_with_http_info(xero_tenant_id, quote_id, file_name, body, opts = {})
|
3175
|
+
if @api_client.config.debugging
|
3176
|
+
@api_client.config.logger.debug 'Calling API: AccountingApi.create_quote_attachment_by_file_name ...'
|
3177
|
+
end
|
3178
|
+
# verify the required parameter 'xero_tenant_id' is set
|
3179
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
3180
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.create_quote_attachment_by_file_name"
|
3181
|
+
end
|
3182
|
+
# verify the required parameter 'quote_id' is set
|
3183
|
+
if @api_client.config.client_side_validation && quote_id.nil?
|
3184
|
+
fail ArgumentError, "Missing the required parameter 'quote_id' when calling AccountingApi.create_quote_attachment_by_file_name"
|
3185
|
+
end
|
3186
|
+
# verify the required parameter 'file_name' is set
|
3187
|
+
if @api_client.config.client_side_validation && file_name.nil?
|
3188
|
+
fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.create_quote_attachment_by_file_name"
|
3189
|
+
end
|
3190
|
+
# verify the required parameter 'body' is set
|
3191
|
+
if @api_client.config.client_side_validation && body.nil?
|
3192
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling AccountingApi.create_quote_attachment_by_file_name"
|
3193
|
+
end
|
3194
|
+
# resource path
|
3195
|
+
local_var_path = '/Quotes/{QuoteID}/Attachments/{FileName}'.sub('{' + 'QuoteID' + '}', quote_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s)
|
3196
|
+
|
3197
|
+
# query parameters
|
3198
|
+
query_params = opts[:query_params] || {}
|
3199
|
+
|
3200
|
+
# header parameters
|
3201
|
+
header_params = opts[:header_params] || {}
|
3202
|
+
# HTTP header 'Accept' (if needed)
|
3203
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
3204
|
+
# HTTP header 'Content-Type'
|
3205
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])
|
3206
|
+
header_params[:'xero-tenant-id'] = xero_tenant_id
|
3207
|
+
|
3208
|
+
# form parameters
|
3209
|
+
form_params = opts[:form_params] || {}
|
3210
|
+
|
3211
|
+
# http body (model)
|
3212
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
3213
|
+
|
3214
|
+
# return_type
|
3215
|
+
return_type = opts[:return_type] || 'Attachments'
|
3216
|
+
|
3217
|
+
# auth_names
|
3218
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
3219
|
+
|
3220
|
+
new_options = opts.merge(
|
3221
|
+
:header_params => header_params,
|
3222
|
+
:query_params => query_params,
|
3223
|
+
:form_params => form_params,
|
3224
|
+
:body => post_body,
|
3225
|
+
:auth_names => auth_names,
|
3226
|
+
:return_type => return_type
|
3227
|
+
)
|
3228
|
+
|
3229
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
3230
|
+
if @api_client.config.debugging
|
3231
|
+
@api_client.config.logger.debug "API called: AccountingApi#create_quote_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
3232
|
+
end
|
3233
|
+
return data, status_code, headers
|
3234
|
+
end
|
3235
|
+
|
3155
3236
|
# Allows you to retrieve a history records of an quote
|
3156
3237
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
3157
3238
|
# @param quote_id [String] Unique identifier for an Quote
|
@@ -3963,7 +4044,7 @@ module XeroRuby
|
|
3963
4044
|
return data, status_code, headers
|
3964
4045
|
end
|
3965
4046
|
|
3966
|
-
# Allows you to delete a specific Contact from a
|
4047
|
+
# Allows you to delete a specific Contact from a Contact Group
|
3967
4048
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
3968
4049
|
# @param contact_group_id [String] Unique identifier for a Contact Group
|
3969
4050
|
# @param contact_id [String] Unique identifier for a Contact
|
@@ -3974,7 +4055,7 @@ module XeroRuby
|
|
3974
4055
|
nil
|
3975
4056
|
end
|
3976
4057
|
|
3977
|
-
# Allows you to delete a specific Contact from a
|
4058
|
+
# Allows you to delete a specific Contact from a Contact Group
|
3978
4059
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
3979
4060
|
# @param contact_group_id [String] Unique identifier for a Contact Group
|
3980
4061
|
# @param contact_id [String] Unique identifier for a Contact
|
@@ -4036,7 +4117,7 @@ module XeroRuby
|
|
4036
4117
|
return data, status_code, headers
|
4037
4118
|
end
|
4038
4119
|
|
4039
|
-
# Allows you to delete all Contacts from a
|
4120
|
+
# Allows you to delete all Contacts from a Contact Group
|
4040
4121
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
4041
4122
|
# @param contact_group_id [String] Unique identifier for a Contact Group
|
4042
4123
|
# @param [Hash] opts the optional parameters
|
@@ -4046,7 +4127,7 @@ module XeroRuby
|
|
4046
4127
|
nil
|
4047
4128
|
end
|
4048
4129
|
|
4049
|
-
# Allows you to delete all Contacts from a
|
4130
|
+
# Allows you to delete all Contacts from a Contact Group
|
4050
4131
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
4051
4132
|
# @param contact_group_id [String] Unique identifier for a Contact Group
|
4052
4133
|
# @param [Hash] opts the optional parameters
|
@@ -6453,7 +6534,7 @@ module XeroRuby
|
|
6453
6534
|
return data, status_code, headers
|
6454
6535
|
end
|
6455
6536
|
|
6456
|
-
# Allows you to retrieve a unique
|
6537
|
+
# Allows you to retrieve a unique Contact Group by ID
|
6457
6538
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
6458
6539
|
# @param contact_group_id [String] Unique identifier for a Contact Group
|
6459
6540
|
# @param [Hash] opts the optional parameters
|
@@ -6463,7 +6544,7 @@ module XeroRuby
|
|
6463
6544
|
data
|
6464
6545
|
end
|
6465
6546
|
|
6466
|
-
# Allows you to retrieve a unique
|
6547
|
+
# Allows you to retrieve a unique Contact Group by ID
|
6467
6548
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
6468
6549
|
# @param contact_group_id [String] Unique identifier for a Contact Group
|
6469
6550
|
# @param [Hash] opts the optional parameters
|
@@ -10041,6 +10122,73 @@ module XeroRuby
|
|
10041
10122
|
return data, status_code, headers
|
10042
10123
|
end
|
10043
10124
|
|
10125
|
+
# Allows you to retrieve a specified purchase orders
|
10126
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
10127
|
+
# @param purchase_order_number [String] Unique identifier for a PurchaseOrder
|
10128
|
+
# @param [Hash] opts the optional parameters
|
10129
|
+
# @return [PurchaseOrders]
|
10130
|
+
def get_purchase_order_by_number(xero_tenant_id, purchase_order_number, opts = {})
|
10131
|
+
data, _status_code, _headers = get_purchase_order_by_number_with_http_info(xero_tenant_id, purchase_order_number, opts)
|
10132
|
+
data
|
10133
|
+
end
|
10134
|
+
|
10135
|
+
# Allows you to retrieve a specified purchase orders
|
10136
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
10137
|
+
# @param purchase_order_number [String] Unique identifier for a PurchaseOrder
|
10138
|
+
# @param [Hash] opts the optional parameters
|
10139
|
+
# @return [Array<(PurchaseOrders, Integer, Hash)>] PurchaseOrders data, response status code and response headers
|
10140
|
+
def get_purchase_order_by_number_with_http_info(xero_tenant_id, purchase_order_number, opts = {})
|
10141
|
+
if @api_client.config.debugging
|
10142
|
+
@api_client.config.logger.debug 'Calling API: AccountingApi.get_purchase_order_by_number ...'
|
10143
|
+
end
|
10144
|
+
# verify the required parameter 'xero_tenant_id' is set
|
10145
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
10146
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_purchase_order_by_number"
|
10147
|
+
end
|
10148
|
+
# verify the required parameter 'purchase_order_number' is set
|
10149
|
+
if @api_client.config.client_side_validation && purchase_order_number.nil?
|
10150
|
+
fail ArgumentError, "Missing the required parameter 'purchase_order_number' when calling AccountingApi.get_purchase_order_by_number"
|
10151
|
+
end
|
10152
|
+
# resource path
|
10153
|
+
local_var_path = '/PurchaseOrders/{PurchaseOrderNumber}'.sub('{' + 'PurchaseOrderNumber' + '}', purchase_order_number.to_s)
|
10154
|
+
|
10155
|
+
# query parameters
|
10156
|
+
query_params = opts[:query_params] || {}
|
10157
|
+
|
10158
|
+
# header parameters
|
10159
|
+
header_params = opts[:header_params] || {}
|
10160
|
+
# HTTP header 'Accept' (if needed)
|
10161
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
10162
|
+
header_params[:'xero-tenant-id'] = xero_tenant_id
|
10163
|
+
|
10164
|
+
# form parameters
|
10165
|
+
form_params = opts[:form_params] || {}
|
10166
|
+
|
10167
|
+
# http body (model)
|
10168
|
+
post_body = opts[:body]
|
10169
|
+
|
10170
|
+
# return_type
|
10171
|
+
return_type = opts[:return_type] || 'PurchaseOrders'
|
10172
|
+
|
10173
|
+
# auth_names
|
10174
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
10175
|
+
|
10176
|
+
new_options = opts.merge(
|
10177
|
+
:header_params => header_params,
|
10178
|
+
:query_params => query_params,
|
10179
|
+
:form_params => form_params,
|
10180
|
+
:body => post_body,
|
10181
|
+
:auth_names => auth_names,
|
10182
|
+
:return_type => return_type
|
10183
|
+
)
|
10184
|
+
|
10185
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
10186
|
+
if @api_client.config.debugging
|
10187
|
+
@api_client.config.logger.debug "API called: AccountingApi#get_purchase_order_by_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
10188
|
+
end
|
10189
|
+
return data, status_code, headers
|
10190
|
+
end
|
10191
|
+
|
10044
10192
|
# Allows you to retrieve history for PurchaseOrder
|
10045
10193
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
10046
10194
|
# @param purchase_order_id [String] Unique identifier for a PurchaseOrder
|
@@ -10258,6 +10406,233 @@ module XeroRuby
|
|
10258
10406
|
return data, status_code, headers
|
10259
10407
|
end
|
10260
10408
|
|
10409
|
+
# Allows you to retrieve Attachment on Quote by Filename
|
10410
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
10411
|
+
# @param quote_id [String] Unique identifier for Quote object
|
10412
|
+
# @param file_name [String] Name of the attachment
|
10413
|
+
# @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
|
10414
|
+
# @param [Hash] opts the optional parameters
|
10415
|
+
# @return [File]
|
10416
|
+
def get_quote_attachment_by_file_name(xero_tenant_id, quote_id, file_name, content_type, opts = {})
|
10417
|
+
data, _status_code, _headers = get_quote_attachment_by_file_name_with_http_info(xero_tenant_id, quote_id, file_name, content_type, opts)
|
10418
|
+
data
|
10419
|
+
end
|
10420
|
+
|
10421
|
+
# Allows you to retrieve Attachment on Quote by Filename
|
10422
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
10423
|
+
# @param quote_id [String] Unique identifier for Quote object
|
10424
|
+
# @param file_name [String] Name of the attachment
|
10425
|
+
# @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
|
10426
|
+
# @param [Hash] opts the optional parameters
|
10427
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
10428
|
+
def get_quote_attachment_by_file_name_with_http_info(xero_tenant_id, quote_id, file_name, content_type, opts = {})
|
10429
|
+
if @api_client.config.debugging
|
10430
|
+
@api_client.config.logger.debug 'Calling API: AccountingApi.get_quote_attachment_by_file_name ...'
|
10431
|
+
end
|
10432
|
+
# verify the required parameter 'xero_tenant_id' is set
|
10433
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
10434
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_quote_attachment_by_file_name"
|
10435
|
+
end
|
10436
|
+
# verify the required parameter 'quote_id' is set
|
10437
|
+
if @api_client.config.client_side_validation && quote_id.nil?
|
10438
|
+
fail ArgumentError, "Missing the required parameter 'quote_id' when calling AccountingApi.get_quote_attachment_by_file_name"
|
10439
|
+
end
|
10440
|
+
# verify the required parameter 'file_name' is set
|
10441
|
+
if @api_client.config.client_side_validation && file_name.nil?
|
10442
|
+
fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.get_quote_attachment_by_file_name"
|
10443
|
+
end
|
10444
|
+
# verify the required parameter 'content_type' is set
|
10445
|
+
if @api_client.config.client_side_validation && content_type.nil?
|
10446
|
+
fail ArgumentError, "Missing the required parameter 'content_type' when calling AccountingApi.get_quote_attachment_by_file_name"
|
10447
|
+
end
|
10448
|
+
# resource path
|
10449
|
+
local_var_path = '/Quotes/{QuoteID}/Attachments/{FileName}'.sub('{' + 'QuoteID' + '}', quote_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s)
|
10450
|
+
|
10451
|
+
# query parameters
|
10452
|
+
query_params = opts[:query_params] || {}
|
10453
|
+
|
10454
|
+
# header parameters
|
10455
|
+
header_params = opts[:header_params] || {}
|
10456
|
+
# HTTP header 'Accept' (if needed)
|
10457
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
|
10458
|
+
header_params[:'xero-tenant-id'] = xero_tenant_id
|
10459
|
+
header_params[:'contentType'] = content_type
|
10460
|
+
|
10461
|
+
# form parameters
|
10462
|
+
form_params = opts[:form_params] || {}
|
10463
|
+
|
10464
|
+
# http body (model)
|
10465
|
+
post_body = opts[:body]
|
10466
|
+
|
10467
|
+
# return_type
|
10468
|
+
return_type = opts[:return_type] || 'File'
|
10469
|
+
|
10470
|
+
# auth_names
|
10471
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
10472
|
+
|
10473
|
+
new_options = opts.merge(
|
10474
|
+
:header_params => header_params,
|
10475
|
+
:query_params => query_params,
|
10476
|
+
:form_params => form_params,
|
10477
|
+
:body => post_body,
|
10478
|
+
:auth_names => auth_names,
|
10479
|
+
:return_type => return_type
|
10480
|
+
)
|
10481
|
+
|
10482
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
10483
|
+
if @api_client.config.debugging
|
10484
|
+
@api_client.config.logger.debug "API called: AccountingApi#get_quote_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
10485
|
+
end
|
10486
|
+
return data, status_code, headers
|
10487
|
+
end
|
10488
|
+
|
10489
|
+
# Allows you to retrieve specific Attachment on Quote
|
10490
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
10491
|
+
# @param quote_id [String] Unique identifier for Quote object
|
10492
|
+
# @param attachment_id [String] Unique identifier for Attachment object
|
10493
|
+
# @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
|
10494
|
+
# @param [Hash] opts the optional parameters
|
10495
|
+
# @return [File]
|
10496
|
+
def get_quote_attachment_by_id(xero_tenant_id, quote_id, attachment_id, content_type, opts = {})
|
10497
|
+
data, _status_code, _headers = get_quote_attachment_by_id_with_http_info(xero_tenant_id, quote_id, attachment_id, content_type, opts)
|
10498
|
+
data
|
10499
|
+
end
|
10500
|
+
|
10501
|
+
# Allows you to retrieve specific Attachment on Quote
|
10502
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
10503
|
+
# @param quote_id [String] Unique identifier for Quote object
|
10504
|
+
# @param attachment_id [String] Unique identifier for Attachment object
|
10505
|
+
# @param content_type [String] The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
|
10506
|
+
# @param [Hash] opts the optional parameters
|
10507
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
10508
|
+
def get_quote_attachment_by_id_with_http_info(xero_tenant_id, quote_id, attachment_id, content_type, opts = {})
|
10509
|
+
if @api_client.config.debugging
|
10510
|
+
@api_client.config.logger.debug 'Calling API: AccountingApi.get_quote_attachment_by_id ...'
|
10511
|
+
end
|
10512
|
+
# verify the required parameter 'xero_tenant_id' is set
|
10513
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
10514
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_quote_attachment_by_id"
|
10515
|
+
end
|
10516
|
+
# verify the required parameter 'quote_id' is set
|
10517
|
+
if @api_client.config.client_side_validation && quote_id.nil?
|
10518
|
+
fail ArgumentError, "Missing the required parameter 'quote_id' when calling AccountingApi.get_quote_attachment_by_id"
|
10519
|
+
end
|
10520
|
+
# verify the required parameter 'attachment_id' is set
|
10521
|
+
if @api_client.config.client_side_validation && attachment_id.nil?
|
10522
|
+
fail ArgumentError, "Missing the required parameter 'attachment_id' when calling AccountingApi.get_quote_attachment_by_id"
|
10523
|
+
end
|
10524
|
+
# verify the required parameter 'content_type' is set
|
10525
|
+
if @api_client.config.client_side_validation && content_type.nil?
|
10526
|
+
fail ArgumentError, "Missing the required parameter 'content_type' when calling AccountingApi.get_quote_attachment_by_id"
|
10527
|
+
end
|
10528
|
+
# resource path
|
10529
|
+
local_var_path = '/Quotes/{QuoteID}/Attachments/{AttachmentID}'.sub('{' + 'QuoteID' + '}', quote_id.to_s).sub('{' + 'AttachmentID' + '}', attachment_id.to_s)
|
10530
|
+
|
10531
|
+
# query parameters
|
10532
|
+
query_params = opts[:query_params] || {}
|
10533
|
+
|
10534
|
+
# header parameters
|
10535
|
+
header_params = opts[:header_params] || {}
|
10536
|
+
# HTTP header 'Accept' (if needed)
|
10537
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
|
10538
|
+
header_params[:'xero-tenant-id'] = xero_tenant_id
|
10539
|
+
header_params[:'contentType'] = content_type
|
10540
|
+
|
10541
|
+
# form parameters
|
10542
|
+
form_params = opts[:form_params] || {}
|
10543
|
+
|
10544
|
+
# http body (model)
|
10545
|
+
post_body = opts[:body]
|
10546
|
+
|
10547
|
+
# return_type
|
10548
|
+
return_type = opts[:return_type] || 'File'
|
10549
|
+
|
10550
|
+
# auth_names
|
10551
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
10552
|
+
|
10553
|
+
new_options = opts.merge(
|
10554
|
+
:header_params => header_params,
|
10555
|
+
:query_params => query_params,
|
10556
|
+
:form_params => form_params,
|
10557
|
+
:body => post_body,
|
10558
|
+
:auth_names => auth_names,
|
10559
|
+
:return_type => return_type
|
10560
|
+
)
|
10561
|
+
|
10562
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
10563
|
+
if @api_client.config.debugging
|
10564
|
+
@api_client.config.logger.debug "API called: AccountingApi#get_quote_attachment_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
10565
|
+
end
|
10566
|
+
return data, status_code, headers
|
10567
|
+
end
|
10568
|
+
|
10569
|
+
# Allows you to retrieve Attachments for Quotes
|
10570
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
10571
|
+
# @param quote_id [String] Unique identifier for Quote object
|
10572
|
+
# @param [Hash] opts the optional parameters
|
10573
|
+
# @return [Attachments]
|
10574
|
+
def get_quote_attachments(xero_tenant_id, quote_id, opts = {})
|
10575
|
+
data, _status_code, _headers = get_quote_attachments_with_http_info(xero_tenant_id, quote_id, opts)
|
10576
|
+
data
|
10577
|
+
end
|
10578
|
+
|
10579
|
+
# Allows you to retrieve Attachments for Quotes
|
10580
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
10581
|
+
# @param quote_id [String] Unique identifier for Quote object
|
10582
|
+
# @param [Hash] opts the optional parameters
|
10583
|
+
# @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
|
10584
|
+
def get_quote_attachments_with_http_info(xero_tenant_id, quote_id, opts = {})
|
10585
|
+
if @api_client.config.debugging
|
10586
|
+
@api_client.config.logger.debug 'Calling API: AccountingApi.get_quote_attachments ...'
|
10587
|
+
end
|
10588
|
+
# verify the required parameter 'xero_tenant_id' is set
|
10589
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
10590
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_quote_attachments"
|
10591
|
+
end
|
10592
|
+
# verify the required parameter 'quote_id' is set
|
10593
|
+
if @api_client.config.client_side_validation && quote_id.nil?
|
10594
|
+
fail ArgumentError, "Missing the required parameter 'quote_id' when calling AccountingApi.get_quote_attachments"
|
10595
|
+
end
|
10596
|
+
# resource path
|
10597
|
+
local_var_path = '/Quotes/{QuoteID}/Attachments'.sub('{' + 'QuoteID' + '}', quote_id.to_s)
|
10598
|
+
|
10599
|
+
# query parameters
|
10600
|
+
query_params = opts[:query_params] || {}
|
10601
|
+
|
10602
|
+
# header parameters
|
10603
|
+
header_params = opts[:header_params] || {}
|
10604
|
+
# HTTP header 'Accept' (if needed)
|
10605
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
10606
|
+
header_params[:'xero-tenant-id'] = xero_tenant_id
|
10607
|
+
|
10608
|
+
# form parameters
|
10609
|
+
form_params = opts[:form_params] || {}
|
10610
|
+
|
10611
|
+
# http body (model)
|
10612
|
+
post_body = opts[:body]
|
10613
|
+
|
10614
|
+
# return_type
|
10615
|
+
return_type = opts[:return_type] || 'Attachments'
|
10616
|
+
|
10617
|
+
# auth_names
|
10618
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
10619
|
+
|
10620
|
+
new_options = opts.merge(
|
10621
|
+
:header_params => header_params,
|
10622
|
+
:query_params => query_params,
|
10623
|
+
:form_params => form_params,
|
10624
|
+
:body => post_body,
|
10625
|
+
:auth_names => auth_names,
|
10626
|
+
:return_type => return_type
|
10627
|
+
)
|
10628
|
+
|
10629
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
10630
|
+
if @api_client.config.debugging
|
10631
|
+
@api_client.config.logger.debug "API called: AccountingApi#get_quote_attachments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
10632
|
+
end
|
10633
|
+
return data, status_code, headers
|
10634
|
+
end
|
10635
|
+
|
10261
10636
|
# Allows you to retrieve a history records of an quote
|
10262
10637
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
10263
10638
|
# @param quote_id [String] Unique identifier for an Quote
|
@@ -12963,7 +13338,7 @@ module XeroRuby
|
|
12963
13338
|
return data, status_code, headers
|
12964
13339
|
end
|
12965
13340
|
|
12966
|
-
# Allows you to update a
|
13341
|
+
# Allows you to update a Contact Group
|
12967
13342
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
12968
13343
|
# @param contact_group_id [String] Unique identifier for a Contact Group
|
12969
13344
|
# @param contact_groups [ContactGroups] an array of Contact groups with Name of specific group to update
|
@@ -12974,7 +13349,7 @@ module XeroRuby
|
|
12974
13349
|
data
|
12975
13350
|
end
|
12976
13351
|
|
12977
|
-
# Allows you to update a
|
13352
|
+
# Allows you to update a Contact Group
|
12978
13353
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
12979
13354
|
# @param contact_group_id [String] Unique identifier for a Contact Group
|
12980
13355
|
# @param contact_groups [ContactGroups] an array of Contact groups with Name of specific group to update
|
@@ -14625,6 +15000,87 @@ module XeroRuby
|
|
14625
15000
|
return data, status_code, headers
|
14626
15001
|
end
|
14627
15002
|
|
15003
|
+
# Allows you to update Attachment on Quote by Filename
|
15004
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
15005
|
+
# @param quote_id [String] Unique identifier for Quote object
|
15006
|
+
# @param file_name [String] Name of the attachment
|
15007
|
+
# @param body [String] Byte array of file in body of request
|
15008
|
+
# @param [Hash] opts the optional parameters
|
15009
|
+
# @return [Attachments]
|
15010
|
+
def update_quote_attachment_by_file_name(xero_tenant_id, quote_id, file_name, body, opts = {})
|
15011
|
+
data, _status_code, _headers = update_quote_attachment_by_file_name_with_http_info(xero_tenant_id, quote_id, file_name, body, opts)
|
15012
|
+
data
|
15013
|
+
end
|
15014
|
+
|
15015
|
+
# Allows you to update Attachment on Quote by Filename
|
15016
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
15017
|
+
# @param quote_id [String] Unique identifier for Quote object
|
15018
|
+
# @param file_name [String] Name of the attachment
|
15019
|
+
# @param body [String] Byte array of file in body of request
|
15020
|
+
# @param [Hash] opts the optional parameters
|
15021
|
+
# @return [Array<(Attachments, Integer, Hash)>] Attachments data, response status code and response headers
|
15022
|
+
def update_quote_attachment_by_file_name_with_http_info(xero_tenant_id, quote_id, file_name, body, opts = {})
|
15023
|
+
if @api_client.config.debugging
|
15024
|
+
@api_client.config.logger.debug 'Calling API: AccountingApi.update_quote_attachment_by_file_name ...'
|
15025
|
+
end
|
15026
|
+
# verify the required parameter 'xero_tenant_id' is set
|
15027
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
15028
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.update_quote_attachment_by_file_name"
|
15029
|
+
end
|
15030
|
+
# verify the required parameter 'quote_id' is set
|
15031
|
+
if @api_client.config.client_side_validation && quote_id.nil?
|
15032
|
+
fail ArgumentError, "Missing the required parameter 'quote_id' when calling AccountingApi.update_quote_attachment_by_file_name"
|
15033
|
+
end
|
15034
|
+
# verify the required parameter 'file_name' is set
|
15035
|
+
if @api_client.config.client_side_validation && file_name.nil?
|
15036
|
+
fail ArgumentError, "Missing the required parameter 'file_name' when calling AccountingApi.update_quote_attachment_by_file_name"
|
15037
|
+
end
|
15038
|
+
# verify the required parameter 'body' is set
|
15039
|
+
if @api_client.config.client_side_validation && body.nil?
|
15040
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling AccountingApi.update_quote_attachment_by_file_name"
|
15041
|
+
end
|
15042
|
+
# resource path
|
15043
|
+
local_var_path = '/Quotes/{QuoteID}/Attachments/{FileName}'.sub('{' + 'QuoteID' + '}', quote_id.to_s).sub('{' + 'FileName' + '}', file_name.to_s)
|
15044
|
+
|
15045
|
+
# query parameters
|
15046
|
+
query_params = opts[:query_params] || {}
|
15047
|
+
|
15048
|
+
# header parameters
|
15049
|
+
header_params = opts[:header_params] || {}
|
15050
|
+
# HTTP header 'Accept' (if needed)
|
15051
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
15052
|
+
# HTTP header 'Content-Type'
|
15053
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/octet-stream'])
|
15054
|
+
header_params[:'xero-tenant-id'] = xero_tenant_id
|
15055
|
+
|
15056
|
+
# form parameters
|
15057
|
+
form_params = opts[:form_params] || {}
|
15058
|
+
|
15059
|
+
# http body (model)
|
15060
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
15061
|
+
|
15062
|
+
# return_type
|
15063
|
+
return_type = opts[:return_type] || 'Attachments'
|
15064
|
+
|
15065
|
+
# auth_names
|
15066
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
15067
|
+
|
15068
|
+
new_options = opts.merge(
|
15069
|
+
:header_params => header_params,
|
15070
|
+
:query_params => query_params,
|
15071
|
+
:form_params => form_params,
|
15072
|
+
:body => post_body,
|
15073
|
+
:auth_names => auth_names,
|
15074
|
+
:return_type => return_type
|
15075
|
+
)
|
15076
|
+
|
15077
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
15078
|
+
if @api_client.config.debugging
|
15079
|
+
@api_client.config.logger.debug "API called: AccountingApi#update_quote_attachment_by_file_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
15080
|
+
end
|
15081
|
+
return data, status_code, headers
|
15082
|
+
end
|
15083
|
+
|
14628
15084
|
# Allows you to retrieve a specified draft expense claim receipts
|
14629
15085
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
14630
15086
|
# @param receipt_id [String] Unique identifier for a Receipt
|
data/lib/xero-ruby/api_client.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 2.0.
|
6
|
+
The version of the OpenAPI document: 2.0.3
|
7
7
|
Contact: api@xero.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 4.2.0
|
data/lib/xero-ruby/api_error.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 2.0.
|
6
|
+
The version of the OpenAPI document: 2.0.3
|
7
7
|
Contact: api@xero.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 4.2.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 2.0.
|
6
|
+
The version of the OpenAPI document: 2.0.3
|
7
7
|
Contact: api@xero.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 4.2.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 2.0.
|
6
|
+
The version of the OpenAPI document: 2.0.3
|
7
7
|
Contact: api@xero.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 4.2.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 2.0.
|
6
|
+
The version of the OpenAPI document: 2.0.3
|
7
7
|
Contact: api@xero.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 4.2.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 2.0.
|
6
|
+
The version of the OpenAPI document: 2.0.3
|
7
7
|
Contact: api@xero.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
9
|
OpenAPI Generator version: 4.2.0
|