1 /**
2 * Copyright 2016-2024 IBM Corp.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5 * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 *
7 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
8 * on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9 * See the License for the specific language governing permissions and limitations under the License.
10 */
11 12 // AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
13 14 package services
15 16 import (
17 "fmt"
18 "strings"
19 20 "github.com/softlayer/softlayer-go/datatypes"
21 "github.com/softlayer/softlayer-go/session"
22 "github.com/softlayer/softlayer-go/sl"
23 )
24 25 // no documentation yet
26 type Billing_Currency struct {
27 Session session.SLSession
28 Options sl.Options
29 }
30 31 // GetBillingCurrencyService returns an instance of the Billing_Currency SoftLayer service
32 func GetBillingCurrencyService(sess session.SLSession) Billing_Currency {
33 return Billing_Currency{Session: sess}
34 }
35 36 func (r Billing_Currency) Id(id int) Billing_Currency {
37 r.Options.Id = &id
38 return r
39 }
40 41 func (r Billing_Currency) Mask(mask string) Billing_Currency {
42 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
43 mask = fmt.Sprintf("mask[%s]", mask)
44 }
45 46 r.Options.Mask = mask
47 return r
48 }
49 50 func (r Billing_Currency) Filter(filter string) Billing_Currency {
51 r.Options.Filter = filter
52 return r
53 }
54 55 func (r Billing_Currency) Limit(limit int) Billing_Currency {
56 r.Options.Limit = &limit
57 return r
58 }
59 60 func (r Billing_Currency) Offset(offset int) Billing_Currency {
61 r.Options.Offset = &offset
62 return r
63 }
64 65 // no documentation yet
66 func (r Billing_Currency) GetAllObjects() (resp []datatypes.Billing_Currency, err error) {
67 err = r.Session.DoRequest("SoftLayer_Billing_Currency", "getAllObjects", nil, &r.Options, &resp)
68 return
69 }
70 71 // Retrieve The current exchange rate
72 func (r Billing_Currency) GetCurrentExchangeRate() (resp datatypes.Billing_Currency_ExchangeRate, err error) {
73 err = r.Session.DoRequest("SoftLayer_Billing_Currency", "getCurrentExchangeRate", nil, &r.Options, &resp)
74 return
75 }
76 77 // no documentation yet
78 func (r Billing_Currency) GetObject() (resp datatypes.Billing_Currency, err error) {
79 err = r.Session.DoRequest("SoftLayer_Billing_Currency", "getObject", nil, &r.Options, &resp)
80 return
81 }
82 83 // no documentation yet
84 func (r Billing_Currency) GetPrice(price *datatypes.Float64, formatOptions *datatypes.Container_Billing_Currency_Format) (resp string, err error) {
85 params := []interface{}{
86 price,
87 formatOptions,
88 }
89 err = r.Session.DoRequest("SoftLayer_Billing_Currency", "getPrice", params, &r.Options, &resp)
90 return
91 }
92 93 // The SoftLayer_Billing_Currency_Country data type maps what currencies are valid for specific countries. US Dollars are valid from any country, but other currencies are only available to customers in certain countries.
94 type Billing_Currency_Country struct {
95 Session session.SLSession
96 Options sl.Options
97 }
98 99 // GetBillingCurrencyCountryService returns an instance of the Billing_Currency_Country SoftLayer service
100 func GetBillingCurrencyCountryService(sess session.SLSession) Billing_Currency_Country {
101 return Billing_Currency_Country{Session: sess}
102 }
103 104 func (r Billing_Currency_Country) Id(id int) Billing_Currency_Country {
105 r.Options.Id = &id
106 return r
107 }
108 109 func (r Billing_Currency_Country) Mask(mask string) Billing_Currency_Country {
110 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
111 mask = fmt.Sprintf("mask[%s]", mask)
112 }
113 114 r.Options.Mask = mask
115 return r
116 }
117 118 func (r Billing_Currency_Country) Filter(filter string) Billing_Currency_Country {
119 r.Options.Filter = filter
120 return r
121 }
122 123 func (r Billing_Currency_Country) Limit(limit int) Billing_Currency_Country {
124 r.Options.Limit = &limit
125 return r
126 }
127 128 func (r Billing_Currency_Country) Offset(offset int) Billing_Currency_Country {
129 r.Options.Offset = &offset
130 return r
131 }
132 133 // no documentation yet
134 func (r Billing_Currency_Country) GetCountriesWithListOfEligibleCurrencies() (resp []datatypes.Container_Billing_Currency_Country, err error) {
135 err = r.Session.DoRequest("SoftLayer_Billing_Currency_Country", "getCountriesWithListOfEligibleCurrencies", nil, &r.Options, &resp)
136 return
137 }
138 139 // no documentation yet
140 func (r Billing_Currency_Country) GetObject() (resp datatypes.Billing_Currency_Country, err error) {
141 err = r.Session.DoRequest("SoftLayer_Billing_Currency_Country", "getObject", nil, &r.Options, &resp)
142 return
143 }
144 145 // no documentation yet
146 type Billing_Currency_ExchangeRate struct {
147 Session session.SLSession
148 Options sl.Options
149 }
150 151 // GetBillingCurrencyExchangeRateService returns an instance of the Billing_Currency_ExchangeRate SoftLayer service
152 func GetBillingCurrencyExchangeRateService(sess session.SLSession) Billing_Currency_ExchangeRate {
153 return Billing_Currency_ExchangeRate{Session: sess}
154 }
155 156 func (r Billing_Currency_ExchangeRate) Id(id int) Billing_Currency_ExchangeRate {
157 r.Options.Id = &id
158 return r
159 }
160 161 func (r Billing_Currency_ExchangeRate) Mask(mask string) Billing_Currency_ExchangeRate {
162 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
163 mask = fmt.Sprintf("mask[%s]", mask)
164 }
165 166 r.Options.Mask = mask
167 return r
168 }
169 170 func (r Billing_Currency_ExchangeRate) Filter(filter string) Billing_Currency_ExchangeRate {
171 r.Options.Filter = filter
172 return r
173 }
174 175 func (r Billing_Currency_ExchangeRate) Limit(limit int) Billing_Currency_ExchangeRate {
176 r.Options.Limit = &limit
177 return r
178 }
179 180 func (r Billing_Currency_ExchangeRate) Offset(offset int) Billing_Currency_ExchangeRate {
181 r.Options.Offset = &offset
182 return r
183 }
184 185 // no documentation yet
186 func (r Billing_Currency_ExchangeRate) GetAllCurrencyExchangeRates(stringDate *string) (resp []datatypes.Billing_Currency_ExchangeRate, err error) {
187 params := []interface{}{
188 stringDate,
189 }
190 err = r.Session.DoRequest("SoftLayer_Billing_Currency_ExchangeRate", "getAllCurrencyExchangeRates", params, &r.Options, &resp)
191 return
192 }
193 194 // no documentation yet
195 func (r Billing_Currency_ExchangeRate) GetCurrencies() (resp []datatypes.Billing_Currency, err error) {
196 err = r.Session.DoRequest("SoftLayer_Billing_Currency_ExchangeRate", "getCurrencies", nil, &r.Options, &resp)
197 return
198 }
199 200 // no documentation yet
201 func (r Billing_Currency_ExchangeRate) GetExchangeRate(to *string, from *string, effectiveDate *datatypes.Time) (resp datatypes.Billing_Currency_ExchangeRate, err error) {
202 params := []interface{}{
203 to,
204 from,
205 effectiveDate,
206 }
207 err = r.Session.DoRequest("SoftLayer_Billing_Currency_ExchangeRate", "getExchangeRate", params, &r.Options, &resp)
208 return
209 }
210 211 // Retrieve
212 func (r Billing_Currency_ExchangeRate) GetFundingCurrency() (resp datatypes.Billing_Currency, err error) {
213 err = r.Session.DoRequest("SoftLayer_Billing_Currency_ExchangeRate", "getFundingCurrency", nil, &r.Options, &resp)
214 return
215 }
216 217 // Retrieve
218 func (r Billing_Currency_ExchangeRate) GetLocalCurrency() (resp datatypes.Billing_Currency, err error) {
219 err = r.Session.DoRequest("SoftLayer_Billing_Currency_ExchangeRate", "getLocalCurrency", nil, &r.Options, &resp)
220 return
221 }
222 223 // no documentation yet
224 func (r Billing_Currency_ExchangeRate) GetObject() (resp datatypes.Billing_Currency_ExchangeRate, err error) {
225 err = r.Session.DoRequest("SoftLayer_Billing_Currency_ExchangeRate", "getObject", nil, &r.Options, &resp)
226 return
227 }
228 229 // no documentation yet
230 func (r Billing_Currency_ExchangeRate) GetPrice(price *datatypes.Float64, formatOptions *datatypes.Container_Billing_Currency_Format) (resp string, err error) {
231 params := []interface{}{
232 price,
233 formatOptions,
234 }
235 err = r.Session.DoRequest("SoftLayer_Billing_Currency_ExchangeRate", "getPrice", params, &r.Options, &resp)
236 return
237 }
238 239 // Every SoftLayer customer account has billing specific information which is kept in the SoftLayer_Billing_Info data type. This information is used by the SoftLayer accounting group when sending invoices and making billing inquiries.
240 type Billing_Info struct {
241 Session session.SLSession
242 Options sl.Options
243 }
244 245 // GetBillingInfoService returns an instance of the Billing_Info SoftLayer service
246 func GetBillingInfoService(sess session.SLSession) Billing_Info {
247 return Billing_Info{Session: sess}
248 }
249 250 func (r Billing_Info) Id(id int) Billing_Info {
251 r.Options.Id = &id
252 return r
253 }
254 255 func (r Billing_Info) Mask(mask string) Billing_Info {
256 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
257 mask = fmt.Sprintf("mask[%s]", mask)
258 }
259 260 r.Options.Mask = mask
261 return r
262 }
263 264 func (r Billing_Info) Filter(filter string) Billing_Info {
265 r.Options.Filter = filter
266 return r
267 }
268 269 func (r Billing_Info) Limit(limit int) Billing_Info {
270 r.Options.Limit = &limit
271 return r
272 }
273 274 func (r Billing_Info) Offset(offset int) Billing_Info {
275 r.Options.Offset = &offset
276 return r
277 }
278 279 // Retrieve The SoftLayer customer account associated with this billing information.
280 func (r Billing_Info) GetAccount() (resp datatypes.Account, err error) {
281 err = r.Session.DoRequest("SoftLayer_Billing_Info", "getAccount", nil, &r.Options, &resp)
282 return
283 }
284 285 // Retrieve
286 func (r Billing_Info) GetAchInformation() (resp []datatypes.Billing_Info_Ach, err error) {
287 err = r.Session.DoRequest("SoftLayer_Billing_Info", "getAchInformation", nil, &r.Options, &resp)
288 return
289 }
290 291 // Retrieve Currency to be used by this customer account.
292 func (r Billing_Info) GetCurrency() (resp datatypes.Billing_Currency, err error) {
293 err = r.Session.DoRequest("SoftLayer_Billing_Info", "getCurrency", nil, &r.Options, &resp)
294 return
295 }
296 297 // Retrieve Information related to an account's current and previous billing cycles.
298 func (r Billing_Info) GetCurrentBillingCycle() (resp datatypes.Billing_Info_Cycle, err error) {
299 err = r.Session.DoRequest("SoftLayer_Billing_Info", "getCurrentBillingCycle", nil, &r.Options, &resp)
300 return
301 }
302 303 // Retrieve The date on which an account was last billed.
304 func (r Billing_Info) GetLastBillDate() (resp datatypes.Time, err error) {
305 err = r.Session.DoRequest("SoftLayer_Billing_Info", "getLastBillDate", nil, &r.Options, &resp)
306 return
307 }
308 309 // Retrieve The date on which an account will be billed next.
310 func (r Billing_Info) GetNextBillDate() (resp datatypes.Time, err error) {
311 err = r.Session.DoRequest("SoftLayer_Billing_Info", "getNextBillDate", nil, &r.Options, &resp)
312 return
313 }
314 315 // getObject retrieves the SoftLayer_Billing_Info object whose data corresponds to the account to which your portal user is tied.
316 func (r Billing_Info) GetObject() (resp datatypes.Billing_Info, err error) {
317 err = r.Session.DoRequest("SoftLayer_Billing_Info", "getObject", nil, &r.Options, &resp)
318 return
319 }
320 321 // The SoftLayer_Billing_Invoice data type contains general information relating to an individual invoice applied to a SoftLayer customer account. Personal information in this type such as names, addresses, and phone numbers are taken from the account's contact information at the time the invoice is generated.
322 type Billing_Invoice struct {
323 Session session.SLSession
324 Options sl.Options
325 }
326 327 // GetBillingInvoiceService returns an instance of the Billing_Invoice SoftLayer service
328 func GetBillingInvoiceService(sess session.SLSession) Billing_Invoice {
329 return Billing_Invoice{Session: sess}
330 }
331 332 func (r Billing_Invoice) Id(id int) Billing_Invoice {
333 r.Options.Id = &id
334 return r
335 }
336 337 func (r Billing_Invoice) Mask(mask string) Billing_Invoice {
338 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
339 mask = fmt.Sprintf("mask[%s]", mask)
340 }
341 342 r.Options.Mask = mask
343 return r
344 }
345 346 func (r Billing_Invoice) Filter(filter string) Billing_Invoice {
347 r.Options.Filter = filter
348 return r
349 }
350 351 func (r Billing_Invoice) Limit(limit int) Billing_Invoice {
352 r.Options.Limit = &limit
353 return r
354 }
355 356 func (r Billing_Invoice) Offset(offset int) Billing_Invoice {
357 r.Options.Offset = &offset
358 return r
359 }
360 361 // Create a transaction to email PDF and/or Excel invoice links to the requesting user's email address. You must have a PDF reader installed in order to view these files.
362 func (r Billing_Invoice) EmailInvoices(options *datatypes.Container_Billing_Invoice_Email) (err error) {
363 var resp datatypes.Void
364 params := []interface{}{
365 options,
366 }
367 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "emailInvoices", params, &r.Options, &resp)
368 return
369 }
370 371 // Retrieve The account that an invoice belongs to.
372 func (r Billing_Invoice) GetAccount() (resp datatypes.Account, err error) {
373 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getAccount", nil, &r.Options, &resp)
374 return
375 }
376 377 // Retrieve This is the amount of this invoice.
378 func (r Billing_Invoice) GetAmount() (resp datatypes.Float64, err error) {
379 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getAmount", nil, &r.Options, &resp)
380 return
381 }
382 383 // Retrieve
384 func (r Billing_Invoice) GetBrandAtInvoiceCreation() (resp datatypes.Brand, err error) {
385 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getBrandAtInvoiceCreation", nil, &r.Options, &resp)
386 return
387 }
388 389 // Retrieve Chargeback type for invoice.
390 func (r Billing_Invoice) GetChargebackType() (resp datatypes.Billing_Chargeback_Type, err error) {
391 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getChargebackType", nil, &r.Options, &resp)
392 return
393 }
394 395 // Retrieve A flag that will reflect whether the detailed version of the pdf has been generated.
396 func (r Billing_Invoice) GetDetailedPdfGeneratedFlag() (resp bool, err error) {
397 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getDetailedPdfGeneratedFlag", nil, &r.Options, &resp)
398 return
399 }
400 401 // Retrieve a Microsoft Excel spreadsheet of a SoftLayer invoice. You must have a Microsoft Excel reader installed in order to view these invoice files.
402 func (r Billing_Invoice) GetExcel() (resp []byte, err error) {
403 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getExcel", nil, &r.Options, &resp)
404 return
405 }
406 407 // Retrieve A list of top-level invoice items that are on the currently pending invoice.
408 func (r Billing_Invoice) GetInvoiceTopLevelItems() (resp []datatypes.Billing_Invoice_Item, err error) {
409 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getInvoiceTopLevelItems", nil, &r.Options, &resp)
410 return
411 }
412 413 // Retrieve The total amount of this invoice.
414 func (r Billing_Invoice) GetInvoiceTotalAmount() (resp datatypes.Float64, err error) {
415 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getInvoiceTotalAmount", nil, &r.Options, &resp)
416 return
417 }
418 419 // Retrieve The total one-time charges for this invoice. This is the sum of one-time charges + setup fees + labor fees. This does not include taxes.
420 func (r Billing_Invoice) GetInvoiceTotalOneTimeAmount() (resp datatypes.Float64, err error) {
421 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getInvoiceTotalOneTimeAmount", nil, &r.Options, &resp)
422 return
423 }
424 425 // Retrieve A sum of all the taxes related to one time charges for this invoice.
426 func (r Billing_Invoice) GetInvoiceTotalOneTimeTaxAmount() (resp datatypes.Float64, err error) {
427 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getInvoiceTotalOneTimeTaxAmount", nil, &r.Options, &resp)
428 return
429 }
430 431 // Retrieve The total amount of this invoice. This does not include taxes.
432 func (r Billing_Invoice) GetInvoiceTotalPreTaxAmount() (resp datatypes.Float64, err error) {
433 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getInvoiceTotalPreTaxAmount", nil, &r.Options, &resp)
434 return
435 }
436 437 // Retrieve The total Recurring amount of this invoice. This amount does not include taxes or one time charges.
438 func (r Billing_Invoice) GetInvoiceTotalRecurringAmount() (resp datatypes.Float64, err error) {
439 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getInvoiceTotalRecurringAmount", nil, &r.Options, &resp)
440 return
441 }
442 443 // Retrieve The total amount of the recurring taxes on this invoice.
444 func (r Billing_Invoice) GetInvoiceTotalRecurringTaxAmount() (resp datatypes.Float64, err error) {
445 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getInvoiceTotalRecurringTaxAmount", nil, &r.Options, &resp)
446 return
447 }
448 449 // Retrieve The items that belong to this invoice.
450 func (r Billing_Invoice) GetItems() (resp []datatypes.Billing_Invoice_Item, err error) {
451 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getItems", nil, &r.Options, &resp)
452 return
453 }
454 455 // Retrieve Exchange rate used for billing this invoice.
456 func (r Billing_Invoice) GetLocalCurrencyExchangeRate() (resp datatypes.Billing_Currency_ExchangeRate, err error) {
457 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getLocalCurrencyExchangeRate", nil, &r.Options, &resp)
458 return
459 }
460 461 // getObject retrieves the SoftLayer_Billing_Invoice object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Billing_Invoice service. You can only retrieve invoices that are assigned to your portal user's account.
462 func (r Billing_Invoice) GetObject() (resp datatypes.Billing_Invoice, err error) {
463 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getObject", nil, &r.Options, &resp)
464 return
465 }
466 467 // Retrieve This is the total payment made on this invoice.
468 func (r Billing_Invoice) GetPayment() (resp datatypes.Float64, err error) {
469 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getPayment", nil, &r.Options, &resp)
470 return
471 }
472 473 // Retrieve The payments for the invoice.
474 func (r Billing_Invoice) GetPayments() (resp []datatypes.Billing_Invoice_Receivable_Payment, err error) {
475 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getPayments", nil, &r.Options, &resp)
476 return
477 }
478 479 // Retrieve a PDF record of a SoftLayer invoice. SoftLayer keeps PDF records of all closed invoices for customer retrieval from the portal and API. You must have a PDF reader installed in order to view these invoice files.
480 func (r Billing_Invoice) GetPdf() (resp []byte, err error) {
481 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getPdf", nil, &r.Options, &resp)
482 return
483 }
484 485 // Retrieve a PDF record of a SoftLayer detailed invoice summary. SoftLayer keeps PDF records of all closed invoices for customer retrieval from the portal and API. You must have a PDF reader installed in order to view these files.
486 func (r Billing_Invoice) GetPdfDetailed() (resp []byte, err error) {
487 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getPdfDetailed", nil, &r.Options, &resp)
488 return
489 }
490 491 // no documentation yet
492 func (r Billing_Invoice) GetPdfDetailedFilename() (resp string, err error) {
493 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getPdfDetailedFilename", nil, &r.Options, &resp)
494 return
495 }
496 497 // Retrieve the size of a PDF record of a SoftLayer invoice. SoftLayer keeps PDF records of all closed invoices for customer retrieval from the portal and API.
498 func (r Billing_Invoice) GetPdfFileSize() (resp int, err error) {
499 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getPdfFileSize", nil, &r.Options, &resp)
500 return
501 }
502 503 // no documentation yet
504 func (r Billing_Invoice) GetPdfFilename() (resp string, err error) {
505 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getPdfFilename", nil, &r.Options, &resp)
506 return
507 }
508 509 // Retrieve a Microsoft Excel record of a SoftLayer invoice. SoftLayer generates Microsoft Excel records of all closed invoices for customer retrieval from the portal and API. You must have a Microsoft Excel reader installed in order to view these invoice files.
510 func (r Billing_Invoice) GetPreliminaryExcel() (resp []byte, err error) {
511 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getPreliminaryExcel", nil, &r.Options, &resp)
512 return
513 }
514 515 // Retrieve a PDF record of a SoftLayer invoice. SoftLayer keeps PDF records of all closed invoices for customer retrieval from the portal and API. You must have a PDF reader installed in order to view these invoice files.
516 func (r Billing_Invoice) GetPreliminaryPdf() (resp []byte, err error) {
517 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getPreliminaryPdf", nil, &r.Options, &resp)
518 return
519 }
520 521 // Retrieve a PDF record of the detailed version of a SoftLayer invoice. SoftLayer keeps PDF records of all closed invoices for customer retrieval from the portal and API.
522 func (r Billing_Invoice) GetPreliminaryPdfDetailed() (resp []byte, err error) {
523 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getPreliminaryPdfDetailed", nil, &r.Options, &resp)
524 return
525 }
526 527 // Retrieve This is the seller's tax registration.
528 func (r Billing_Invoice) GetSellerRegistration() (resp string, err error) {
529 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getSellerRegistration", nil, &r.Options, &resp)
530 return
531 }
532 533 // Retrieve This is the tax information that applies to tax auditing. This is the official tax record for this invoice.
534 func (r Billing_Invoice) GetTaxInfo() (resp datatypes.Billing_Invoice_Tax_Info, err error) {
535 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getTaxInfo", nil, &r.Options, &resp)
536 return
537 }
538 539 // Retrieve This is the set of tax information for any tax calculation for this invoice. Note that not all of these are necessarily official, so use the taxInfo key to get the final information.
540 func (r Billing_Invoice) GetTaxInfoHistory() (resp []datatypes.Billing_Invoice_Tax_Info, err error) {
541 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getTaxInfoHistory", nil, &r.Options, &resp)
542 return
543 }
544 545 // Retrieve This is a message explaining the tax treatment for this invoice.
546 func (r Billing_Invoice) GetTaxMessage() (resp string, err error) {
547 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getTaxMessage", nil, &r.Options, &resp)
548 return
549 }
550 551 // Retrieve This is the strategy used to calculate tax on this invoice.
552 func (r Billing_Invoice) GetTaxType() (resp datatypes.Billing_Invoice_Tax_Type, err error) {
553 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getTaxType", nil, &r.Options, &resp)
554 return
555 }
556 557 // no documentation yet
558 func (r Billing_Invoice) GetXlsFilename() (resp string, err error) {
559 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getXlsFilename", nil, &r.Options, &resp)
560 return
561 }
562 563 // no documentation yet
564 func (r Billing_Invoice) GetZeroFeeItemCounts() (resp []datatypes.Container_Product_Item_Category_ZeroFee_Count, err error) {
565 err = r.Session.DoRequest("SoftLayer_Billing_Invoice", "getZeroFeeItemCounts", nil, &r.Options, &resp)
566 return
567 }
568 569 // Each billing invoice item makes up a record within an invoice. This provides you with a detailed record of everything related to an invoice item. When you are billed, our system takes active billing items and creates an invoice. These invoice items are a copy of your active billing items, and make up the contents of your invoice.
570 type Billing_Invoice_Item struct {
571 Session session.SLSession
572 Options sl.Options
573 }
574 575 // GetBillingInvoiceItemService returns an instance of the Billing_Invoice_Item SoftLayer service
576 func GetBillingInvoiceItemService(sess session.SLSession) Billing_Invoice_Item {
577 return Billing_Invoice_Item{Session: sess}
578 }
579 580 func (r Billing_Invoice_Item) Id(id int) Billing_Invoice_Item {
581 r.Options.Id = &id
582 return r
583 }
584 585 func (r Billing_Invoice_Item) Mask(mask string) Billing_Invoice_Item {
586 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
587 mask = fmt.Sprintf("mask[%s]", mask)
588 }
589 590 r.Options.Mask = mask
591 return r
592 }
593 594 func (r Billing_Invoice_Item) Filter(filter string) Billing_Invoice_Item {
595 r.Options.Filter = filter
596 return r
597 }
598 599 func (r Billing_Invoice_Item) Limit(limit int) Billing_Invoice_Item {
600 r.Options.Limit = &limit
601 return r
602 }
603 604 func (r Billing_Invoice_Item) Offset(offset int) Billing_Invoice_Item {
605 r.Options.Offset = &offset
606 return r
607 }
608 609 // Retrieve An Invoice Item's associated child invoice items. Only parent invoice items have associated children. For instance, a server invoice item may have associated children.
610 func (r Billing_Invoice_Item) GetAssociatedChildren() (resp []datatypes.Billing_Invoice_Item, err error) {
611 err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getAssociatedChildren", nil, &r.Options, &resp)
612 return
613 }
614 615 // Retrieve An Invoice Item's associated invoice item. If this is populated, it means this is an orphaned invoice item, but logically belongs to the associated invoice item.
616 func (r Billing_Invoice_Item) GetAssociatedInvoiceItem() (resp datatypes.Billing_Invoice_Item, err error) {
617 err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getAssociatedInvoiceItem", nil, &r.Options, &resp)
618 return
619 }
620 621 // Retrieve An Invoice Item's billing item, from which this item was generated.
622 func (r Billing_Invoice_Item) GetBillingItem() (resp datatypes.Billing_Item, err error) {
623 err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getBillingItem", nil, &r.Options, &resp)
624 return
625 }
626 627 // Retrieve This invoice item's "item category".
628 func (r Billing_Invoice_Item) GetCategory() (resp datatypes.Product_Item_Category, err error) {
629 err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getCategory", nil, &r.Options, &resp)
630 return
631 }
632 633 // Retrieve An Invoice Item's child invoice items. Only parent invoice items have children. For instance, a server invoice item will have children.
634 func (r Billing_Invoice_Item) GetChildren() (resp []datatypes.Billing_Invoice_Item, err error) {
635 err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getChildren", nil, &r.Options, &resp)
636 return
637 }
638 639 // Retrieve This is the DPart for invoice item.
640 func (r Billing_Invoice_Item) GetDPart() (resp string, err error) {
641 err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getDPart", nil, &r.Options, &resp)
642 return
643 }
644 645 // Retrieve The invoice item ID from which the discount is derived.
646 func (r Billing_Invoice_Item) GetDiscountingInvoiceItemId() (resp int, err error) {
647 err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getDiscountingInvoiceItemId", nil, &r.Options, &resp)
648 return
649 }
650 651 // Retrieve An Invoice Item's associated child invoice items, excluding some items with a $0.00 recurring fee. Only parent invoice items have associated children. For instance, a server invoice item may have associated children.
652 func (r Billing_Invoice_Item) GetFilteredAssociatedChildren() (resp []datatypes.Billing_Invoice_Item, err error) {
653 err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getFilteredAssociatedChildren", nil, &r.Options, &resp)
654 return
655 }
656 657 // Retrieve Indicating whether this invoice item is billed on an hourly basis.
658 func (r Billing_Invoice_Item) GetHourlyFlag() (resp bool, err error) {
659 err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getHourlyFlag", nil, &r.Options, &resp)
660 return
661 }
662 663 // Retrieve The invoice to which this item belongs.
664 func (r Billing_Invoice_Item) GetInvoice() (resp datatypes.Billing_Invoice, err error) {
665 err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getInvoice", nil, &r.Options, &resp)
666 return
667 }
668 669 // Retrieve An invoice item's location, if one exists.'
670 func (r Billing_Invoice_Item) GetLocation() (resp datatypes.Location, err error) {
671 err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getLocation", nil, &r.Options, &resp)
672 return
673 }
674 675 // Retrieve An Invoice Item's associated child invoice items, excluding ALL items with a $0.00 recurring fee. Only parent invoice items have associated children. For instance, a server invoice item may have associated children.
676 func (r Billing_Invoice_Item) GetNonZeroAssociatedChildren() (resp []datatypes.Billing_Invoice_Item, err error) {
677 err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getNonZeroAssociatedChildren", nil, &r.Options, &resp)
678 return
679 }
680 681 // getObject retrieves the SoftLayer_Billing_Invoice_Item object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Billing_Invoice_Item service. You can only retrieve the items tied to the account that your portal user is assigned to.
682 func (r Billing_Invoice_Item) GetObject() (resp datatypes.Billing_Invoice_Item, err error) {
683 err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getObject", nil, &r.Options, &resp)
684 return
685 }
686 687 // Retrieve Every item tied to a server should have a parent invoice item which is the server line item. This is how we associate items to a server.
688 func (r Billing_Invoice_Item) GetParent() (resp datatypes.Billing_Invoice_Item, err error) {
689 err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getParent", nil, &r.Options, &resp)
690 return
691 }
692 693 // Retrieve The entry in the product catalog that a invoice item is based upon.
694 func (r Billing_Invoice_Item) GetProduct() (resp datatypes.Product_Item, err error) {
695 err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getProduct", nil, &r.Options, &resp)
696 return
697 }
698 699 // Retrieve A string representing the name of parent level product group of an invoice item.
700 func (r Billing_Invoice_Item) GetTopLevelProductGroupName() (resp string, err error) {
701 err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getTopLevelProductGroupName", nil, &r.Options, &resp)
702 return
703 }
704 705 // Retrieve An invoice Item's total, including any child invoice items if they exist.
706 func (r Billing_Invoice_Item) GetTotalOneTimeAmount() (resp datatypes.Float64, err error) {
707 err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getTotalOneTimeAmount", nil, &r.Options, &resp)
708 return
709 }
710 711 // Retrieve An invoice Item's total, including any child invoice items if they exist.
712 func (r Billing_Invoice_Item) GetTotalOneTimeTaxAmount() (resp datatypes.Float64, err error) {
713 err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getTotalOneTimeTaxAmount", nil, &r.Options, &resp)
714 return
715 }
716 717 // Retrieve An invoice Item's total, including any child invoice items if they exist.
718 func (r Billing_Invoice_Item) GetTotalRecurringAmount() (resp datatypes.Float64, err error) {
719 err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getTotalRecurringAmount", nil, &r.Options, &resp)
720 return
721 }
722 723 // Retrieve A Billing Item's total, including any child billing items if they exist.'
724 func (r Billing_Invoice_Item) GetTotalRecurringTaxAmount() (resp datatypes.Float64, err error) {
725 err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getTotalRecurringTaxAmount", nil, &r.Options, &resp)
726 return
727 }
728 729 // Retrieve Indicating whether this invoice item is for the usage charge.
730 func (r Billing_Invoice_Item) GetUsageChargeFlag() (resp bool, err error) {
731 err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getUsageChargeFlag", nil, &r.Options, &resp)
732 return
733 }
734 735 // no documentation yet
736 type Billing_Invoice_Next struct {
737 Session session.SLSession
738 Options sl.Options
739 }
740 741 // GetBillingInvoiceNextService returns an instance of the Billing_Invoice_Next SoftLayer service
742 func GetBillingInvoiceNextService(sess session.SLSession) Billing_Invoice_Next {
743 return Billing_Invoice_Next{Session: sess}
744 }
745 746 func (r Billing_Invoice_Next) Id(id int) Billing_Invoice_Next {
747 r.Options.Id = &id
748 return r
749 }
750 751 func (r Billing_Invoice_Next) Mask(mask string) Billing_Invoice_Next {
752 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
753 mask = fmt.Sprintf("mask[%s]", mask)
754 }
755 756 r.Options.Mask = mask
757 return r
758 }
759 760 func (r Billing_Invoice_Next) Filter(filter string) Billing_Invoice_Next {
761 r.Options.Filter = filter
762 return r
763 }
764 765 func (r Billing_Invoice_Next) Limit(limit int) Billing_Invoice_Next {
766 r.Options.Limit = &limit
767 return r
768 }
769 770 func (r Billing_Invoice_Next) Offset(offset int) Billing_Invoice_Next {
771 r.Options.Offset = &offset
772 return r
773 }
774 775 // Return an account's next invoice in a Microsoft excel format.
776 func (r Billing_Invoice_Next) GetExcel(documentCreateDate *datatypes.Time) (resp []byte, err error) {
777 params := []interface{}{
778 documentCreateDate,
779 }
780 err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Next", "getExcel", params, &r.Options, &resp)
781 return
782 }
783 784 // Return an account's next invoice in PDF format.
785 func (r Billing_Invoice_Next) GetPdf(documentCreateDate *datatypes.Time) (resp []byte, err error) {
786 params := []interface{}{
787 documentCreateDate,
788 }
789 err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Next", "getPdf", params, &r.Options, &resp)
790 return
791 }
792 793 // Return an account's next invoice detailed portion in PDF format.
794 func (r Billing_Invoice_Next) GetPdfDetailed(documentCreateDate *datatypes.Time) (resp []byte, err error) {
795 params := []interface{}{
796 documentCreateDate,
797 }
798 err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Next", "getPdfDetailed", params, &r.Options, &resp)
799 return
800 }
801 802 // The invoice tax status data type models a single status or state that an invoice can reflect in regard to an integration with a third-party tax calculation service.
803 type Billing_Invoice_Tax_Status struct {
804 Session session.SLSession
805 Options sl.Options
806 }
807 808 // GetBillingInvoiceTaxStatusService returns an instance of the Billing_Invoice_Tax_Status SoftLayer service
809 func GetBillingInvoiceTaxStatusService(sess session.SLSession) Billing_Invoice_Tax_Status {
810 return Billing_Invoice_Tax_Status{Session: sess}
811 }
812 813 func (r Billing_Invoice_Tax_Status) Id(id int) Billing_Invoice_Tax_Status {
814 r.Options.Id = &id
815 return r
816 }
817 818 func (r Billing_Invoice_Tax_Status) Mask(mask string) Billing_Invoice_Tax_Status {
819 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
820 mask = fmt.Sprintf("mask[%s]", mask)
821 }
822 823 r.Options.Mask = mask
824 return r
825 }
826 827 func (r Billing_Invoice_Tax_Status) Filter(filter string) Billing_Invoice_Tax_Status {
828 r.Options.Filter = filter
829 return r
830 }
831 832 func (r Billing_Invoice_Tax_Status) Limit(limit int) Billing_Invoice_Tax_Status {
833 r.Options.Limit = &limit
834 return r
835 }
836 837 func (r Billing_Invoice_Tax_Status) Offset(offset int) Billing_Invoice_Tax_Status {
838 r.Options.Offset = &offset
839 return r
840 }
841 842 // no documentation yet
843 func (r Billing_Invoice_Tax_Status) GetAllObjects() (resp []datatypes.Billing_Invoice_Tax_Status, err error) {
844 err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Tax_Status", "getAllObjects", nil, &r.Options, &resp)
845 return
846 }
847 848 // no documentation yet
849 func (r Billing_Invoice_Tax_Status) GetObject() (resp datatypes.Billing_Invoice_Tax_Status, err error) {
850 err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Tax_Status", "getObject", nil, &r.Options, &resp)
851 return
852 }
853 854 // The invoice tax type data type models a single strategy for handling tax calculations.
855 type Billing_Invoice_Tax_Type struct {
856 Session session.SLSession
857 Options sl.Options
858 }
859 860 // GetBillingInvoiceTaxTypeService returns an instance of the Billing_Invoice_Tax_Type SoftLayer service
861 func GetBillingInvoiceTaxTypeService(sess session.SLSession) Billing_Invoice_Tax_Type {
862 return Billing_Invoice_Tax_Type{Session: sess}
863 }
864 865 func (r Billing_Invoice_Tax_Type) Id(id int) Billing_Invoice_Tax_Type {
866 r.Options.Id = &id
867 return r
868 }
869 870 func (r Billing_Invoice_Tax_Type) Mask(mask string) Billing_Invoice_Tax_Type {
871 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
872 mask = fmt.Sprintf("mask[%s]", mask)
873 }
874 875 r.Options.Mask = mask
876 return r
877 }
878 879 func (r Billing_Invoice_Tax_Type) Filter(filter string) Billing_Invoice_Tax_Type {
880 r.Options.Filter = filter
881 return r
882 }
883 884 func (r Billing_Invoice_Tax_Type) Limit(limit int) Billing_Invoice_Tax_Type {
885 r.Options.Limit = &limit
886 return r
887 }
888 889 func (r Billing_Invoice_Tax_Type) Offset(offset int) Billing_Invoice_Tax_Type {
890 r.Options.Offset = &offset
891 return r
892 }
893 894 // no documentation yet
895 func (r Billing_Invoice_Tax_Type) GetAllObjects() (resp []datatypes.Billing_Invoice_Tax_Type, err error) {
896 err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Tax_Type", "getAllObjects", nil, &r.Options, &resp)
897 return
898 }
899 900 // no documentation yet
901 func (r Billing_Invoice_Tax_Type) GetObject() (resp datatypes.Billing_Invoice_Tax_Type, err error) {
902 err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Tax_Type", "getObject", nil, &r.Options, &resp)
903 return
904 }
905 906 // Every individual item that a SoftLayer customer is billed for is recorded in the SoftLayer_Billing_Item data type. Billing items range from server chassis to hard drives to control panels, bandwidth quota upgrades and port upgrade charges. Softlayer [[SoftLayer_Billing_Invoice|invoices]] are generated from the cost of a customer's billing items. Billing items are copied from the product catalog as they're ordered by customers to create a reference between an account and the billable items they own.
907 //
908 // Billing items exist in a tree relationship. Items are associated with each other by parent/child relationships. Component items such as CPU's, RAM, and software each have a parent billing item for the server chassis they're associated with. Billing Items with a null parent item do not have an associated parent item.
909 type Billing_Item struct {
910 Session session.SLSession
911 Options sl.Options
912 }
913 914 // GetBillingItemService returns an instance of the Billing_Item SoftLayer service
915 func GetBillingItemService(sess session.SLSession) Billing_Item {
916 return Billing_Item{Session: sess}
917 }
918 919 func (r Billing_Item) Id(id int) Billing_Item {
920 r.Options.Id = &id
921 return r
922 }
923 924 func (r Billing_Item) Mask(mask string) Billing_Item {
925 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
926 mask = fmt.Sprintf("mask[%s]", mask)
927 }
928 929 r.Options.Mask = mask
930 return r
931 }
932 933 func (r Billing_Item) Filter(filter string) Billing_Item {
934 r.Options.Filter = filter
935 return r
936 }
937 938 func (r Billing_Item) Limit(limit int) Billing_Item {
939 r.Options.Limit = &limit
940 return r
941 }
942 943 func (r Billing_Item) Offset(offset int) Billing_Item {
944 r.Options.Offset = &offset
945 return r
946 }
947 948 // Cancel the resource or service for a billing Item. By default the billing item will be canceled on the next bill date and reclaim of the resource will begin shortly after the cancellation. Setting the "cancelImmediately" property to true will start the cancellation immediately if the item is eligible to be canceled immediately.
949 //
950 // The reason parameter could be from the list below:
951 // * "No longer needed"
952 // * "Business closing down"
953 // * "Server / Upgrade Costs"
954 // * "Migrating to larger server"
955 // * "Migrating to smaller server"
956 // * "Migrating to a different SoftLayer datacenter"
957 // * "Network performance / latency"
958 // * "Support response / timing"
959 // * "Sales process / upgrades"
960 // * "Moving to competitor"
961 func (r Billing_Item) CancelItem(cancelImmediately *bool, cancelAssociatedBillingItems *bool, reason *string, customerNote *string) (resp bool, err error) {
962 params := []interface{}{
963 cancelImmediately,
964 cancelAssociatedBillingItems,
965 reason,
966 customerNote,
967 }
968 err = r.Session.DoRequest("SoftLayer_Billing_Item", "cancelItem", params, &r.Options, &resp)
969 return
970 }
971 972 // Cancel the resource or service (excluding bare metal servers) for a billing Item. The billing item will be cancelled immediately and reclaim of the resource will begin shortly.
973 func (r Billing_Item) CancelService() (resp bool, err error) {
974 err = r.Session.DoRequest("SoftLayer_Billing_Item", "cancelService", nil, &r.Options, &resp)
975 return
976 }
977 978 // Cancel the resource or service for a billing Item
979 func (r Billing_Item) CancelServiceOnAnniversaryDate() (resp bool, err error) {
980 err = r.Session.DoRequest("SoftLayer_Billing_Item", "cancelServiceOnAnniversaryDate", nil, &r.Options, &resp)
981 return
982 }
983 984 // Retrieve The account that a billing item belongs to.
985 func (r Billing_Item) GetAccount() (resp datatypes.Account, err error) {
986 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getAccount", nil, &r.Options, &resp)
987 return
988 }
989 990 // Retrieve
991 func (r Billing_Item) GetActiveAgreement() (resp datatypes.Account_Agreement, err error) {
992 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveAgreement", nil, &r.Options, &resp)
993 return
994 }
995 996 // Retrieve A flag indicating that the billing item is under an active agreement.
997 func (r Billing_Item) GetActiveAgreementFlag() (resp datatypes.Account_Agreement, err error) {
998 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveAgreementFlag", nil, &r.Options, &resp)
999 return
1000 }
1001 1002 // Retrieve A billing item's active associated child billing items. This includes "floating" items that are not necessarily child items of this billing item.
1003 func (r Billing_Item) GetActiveAssociatedChildren() (resp []datatypes.Billing_Item, err error) {
1004 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveAssociatedChildren", nil, &r.Options, &resp)
1005 return
1006 }
1007 1008 // Retrieve
1009 func (r Billing_Item) GetActiveAssociatedGuestDiskBillingItems() (resp []datatypes.Billing_Item, err error) {
1010 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveAssociatedGuestDiskBillingItems", nil, &r.Options, &resp)
1011 return
1012 }
1013 1014 // Retrieve A Billing Item's active bundled billing items.
1015 func (r Billing_Item) GetActiveBundledItems() (resp []datatypes.Billing_Item, err error) {
1016 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveBundledItems", nil, &r.Options, &resp)
1017 return
1018 }
1019 1020 // Retrieve A service cancellation request item that corresponds to the billing item.
1021 func (r Billing_Item) GetActiveCancellationItem() (resp datatypes.Billing_Item_Cancellation_Request_Item, err error) {
1022 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveCancellationItem", nil, &r.Options, &resp)
1023 return
1024 }
1025 1026 // Retrieve A Billing Item's active child billing items.
1027 func (r Billing_Item) GetActiveChildren() (resp []datatypes.Billing_Item, err error) {
1028 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveChildren", nil, &r.Options, &resp)
1029 return
1030 }
1031 1032 // Retrieve
1033 func (r Billing_Item) GetActiveFlag() (resp bool, err error) {
1034 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveFlag", nil, &r.Options, &resp)
1035 return
1036 }
1037 1038 // Retrieve
1039 func (r Billing_Item) GetActiveSparePoolAssociatedGuestDiskBillingItems() (resp []datatypes.Billing_Item, err error) {
1040 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveSparePoolAssociatedGuestDiskBillingItems", nil, &r.Options, &resp)
1041 return
1042 }
1043 1044 // Retrieve A Billing Item's spare pool bundled billing items.
1045 func (r Billing_Item) GetActiveSparePoolBundledItems() (resp []datatypes.Billing_Item, err error) {
1046 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getActiveSparePoolBundledItems", nil, &r.Options, &resp)
1047 return
1048 }
1049 1050 // Retrieve A billing item's associated parent. This is to be used for billing items that are "floating", and therefore are not child items of any parent billing item. If it is desired to associate an item to another, populate this with the SoftLayer_Billing_Item ID of that associated parent item.
1051 func (r Billing_Item) GetAssociatedBillingItem() (resp datatypes.Billing_Item, err error) {
1052 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getAssociatedBillingItem", nil, &r.Options, &resp)
1053 return
1054 }
1055 1056 // Retrieve A history of billing items which a billing item has been associated with.
1057 func (r Billing_Item) GetAssociatedBillingItemHistory() (resp []datatypes.Billing_Item_Association_History, err error) {
1058 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getAssociatedBillingItemHistory", nil, &r.Options, &resp)
1059 return
1060 }
1061 1062 // Retrieve A Billing Item's associated child billing items. This includes "floating" items that are not necessarily child billing items of this billing item.
1063 func (r Billing_Item) GetAssociatedChildren() (resp []datatypes.Billing_Item, err error) {
1064 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getAssociatedChildren", nil, &r.Options, &resp)
1065 return
1066 }
1067 1068 // Retrieve A billing item's associated parent billing item. This object will be the same as the parent billing item if parentId is set.
1069 func (r Billing_Item) GetAssociatedParent() (resp []datatypes.Billing_Item, err error) {
1070 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getAssociatedParent", nil, &r.Options, &resp)
1071 return
1072 }
1073 1074 // Retrieve
1075 func (r Billing_Item) GetAvailableMatchingVlans() (resp []datatypes.Network_Vlan, err error) {
1076 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getAvailableMatchingVlans", nil, &r.Options, &resp)
1077 return
1078 }
1079 1080 // Retrieve The bandwidth allocation for a billing item.
1081 func (r Billing_Item) GetBandwidthAllocation() (resp datatypes.Network_Bandwidth_Version1_Allocation, err error) {
1082 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getBandwidthAllocation", nil, &r.Options, &resp)
1083 return
1084 }
1085 1086 // Retrieve A billing item's recurring child items that have once been billed and are scheduled to be billed in the future.
1087 func (r Billing_Item) GetBillableChildren() (resp []datatypes.Billing_Item, err error) {
1088 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getBillableChildren", nil, &r.Options, &resp)
1089 return
1090 }
1091 1092 // Retrieve A Billing Item's bundled billing items.
1093 func (r Billing_Item) GetBundledItems() (resp []datatypes.Billing_Item, err error) {
1094 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getBundledItems", nil, &r.Options, &resp)
1095 return
1096 }
1097 1098 // Retrieve A Billing Item's active child billing items.
1099 func (r Billing_Item) GetCanceledChildren() (resp []datatypes.Billing_Item, err error) {
1100 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getCanceledChildren", nil, &r.Options, &resp)
1101 return
1102 }
1103 1104 // Retrieve The billing item's cancellation reason.
1105 func (r Billing_Item) GetCancellationReason() (resp datatypes.Billing_Item_Cancellation_Reason, err error) {
1106 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getCancellationReason", nil, &r.Options, &resp)
1107 return
1108 }
1109 1110 // Retrieve This will return any cancellation requests that are associated with this billing item.
1111 func (r Billing_Item) GetCancellationRequests() (resp []datatypes.Billing_Item_Cancellation_Request, err error) {
1112 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getCancellationRequests", nil, &r.Options, &resp)
1113 return
1114 }
1115 1116 // Retrieve The item category to which the billing item's item belongs.
1117 func (r Billing_Item) GetCategory() (resp datatypes.Product_Item_Category, err error) {
1118 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getCategory", nil, &r.Options, &resp)
1119 return
1120 }
1121 1122 // Retrieve A Billing Item's child billing items'
1123 func (r Billing_Item) GetChildren() (resp []datatypes.Billing_Item, err error) {
1124 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getChildren", nil, &r.Options, &resp)
1125 return
1126 }
1127 1128 // Retrieve A Billing Item's active child billing items.
1129 func (r Billing_Item) GetChildrenWithActiveAgreement() (resp []datatypes.Billing_Item, err error) {
1130 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getChildrenWithActiveAgreement", nil, &r.Options, &resp)
1131 return
1132 }
1133 1134 // Retrieve For product items which have a downgrade path defined, this will return those product items.
1135 func (r Billing_Item) GetDowngradeItems() (resp []datatypes.Product_Item, err error) {
1136 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getDowngradeItems", nil, &r.Options, &resp)
1137 return
1138 }
1139 1140 // Retrieve A Billing Item's associated child billing items, excluding some items with a $0.00 recurring fee.
1141 func (r Billing_Item) GetFilteredNextInvoiceChildren() (resp []datatypes.Billing_Item, err error) {
1142 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getFilteredNextInvoiceChildren", nil, &r.Options, &resp)
1143 return
1144 }
1145 1146 // Retrieve A flag that will reflect whether this billing item is billed on an hourly basis or not.
1147 func (r Billing_Item) GetHourlyFlag() (resp bool, err error) {
1148 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getHourlyFlag", nil, &r.Options, &resp)
1149 return
1150 }
1151 1152 // Retrieve Invoice items associated with this billing item
1153 func (r Billing_Item) GetInvoiceItem() (resp datatypes.Billing_Invoice_Item, err error) {
1154 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getInvoiceItem", nil, &r.Options, &resp)
1155 return
1156 }
1157 1158 // Retrieve All invoice items associated with the billing item
1159 func (r Billing_Item) GetInvoiceItems() (resp []datatypes.Billing_Invoice_Item, err error) {
1160 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getInvoiceItems", nil, &r.Options, &resp)
1161 return
1162 }
1163 1164 // Retrieve The entry in the SoftLayer product catalog that a billing item is based upon.
1165 func (r Billing_Item) GetItem() (resp datatypes.Product_Item, err error) {
1166 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getItem", nil, &r.Options, &resp)
1167 return
1168 }
1169 1170 // Retrieve The location of the billing item. Some billing items have physical properties such as the server itself. For items such as these, we provide location information.
1171 func (r Billing_Item) GetLocation() (resp datatypes.Location, err error) {
1172 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getLocation", nil, &r.Options, &resp)
1173 return
1174 }
1175 1176 // Retrieve A Billing Item's child billing items and associated items'
1177 func (r Billing_Item) GetNextInvoiceChildren() (resp []datatypes.Billing_Item, err error) {
1178 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getNextInvoiceChildren", nil, &r.Options, &resp)
1179 return
1180 }
1181 1182 // Retrieve A Billing Item's total, including any child billing items if they exist.'
1183 func (r Billing_Item) GetNextInvoiceTotalOneTimeAmount() (resp datatypes.Float64, err error) {
1184 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getNextInvoiceTotalOneTimeAmount", nil, &r.Options, &resp)
1185 return
1186 }
1187 1188 // Retrieve A Billing Item's total, including any child billing items if they exist.'
1189 func (r Billing_Item) GetNextInvoiceTotalOneTimeTaxAmount() (resp datatypes.Float64, err error) {
1190 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getNextInvoiceTotalOneTimeTaxAmount", nil, &r.Options, &resp)
1191 return
1192 }
1193 1194 // Retrieve A Billing Item's total, including any child billing items and associated billing items if they exist.'
1195 func (r Billing_Item) GetNextInvoiceTotalRecurringAmount() (resp datatypes.Float64, err error) {
1196 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getNextInvoiceTotalRecurringAmount", nil, &r.Options, &resp)
1197 return
1198 }
1199 1200 // Retrieve This is deprecated and will always be zero. Because tax is calculated in real-time, previewing the next recurring invoice is pre-tax only.
1201 func (r Billing_Item) GetNextInvoiceTotalRecurringTaxAmount() (resp datatypes.Float64, err error) {
1202 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getNextInvoiceTotalRecurringTaxAmount", nil, &r.Options, &resp)
1203 return
1204 }
1205 1206 // Retrieve A Billing Item's associated child billing items, excluding ALL items with a $0.00 recurring fee.
1207 func (r Billing_Item) GetNonZeroNextInvoiceChildren() (resp []datatypes.Billing_Item, err error) {
1208 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getNonZeroNextInvoiceChildren", nil, &r.Options, &resp)
1209 return
1210 }
1211 1212 // getObject retrieves the SoftLayer_Billing_Item object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Billing_Item service. You can only retrieve billing items tied to the account that your portal user is assigned to. Billing items are an account's items of billable items. There are "parent" billing items and "child" billing items. The server billing item is generally referred to as a parent billing item. The items tied to a server, such as ram, harddrives, and operating systems are considered "child" billing items.
1213 func (r Billing_Item) GetObject() (resp datatypes.Billing_Item, err error) {
1214 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getObject", nil, &r.Options, &resp)
1215 return
1216 }
1217 1218 // Retrieve A billing item's original order item. Simply a reference to the original order from which this billing item was created.
1219 func (r Billing_Item) GetOrderItem() (resp datatypes.Billing_Order_Item, err error) {
1220 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getOrderItem", nil, &r.Options, &resp)
1221 return
1222 }
1223 1224 // Retrieve The original physical location for this billing item--may differ from current.
1225 func (r Billing_Item) GetOriginalLocation() (resp datatypes.Location, err error) {
1226 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getOriginalLocation", nil, &r.Options, &resp)
1227 return
1228 }
1229 1230 // Retrieve The package under which this billing item was sold. A Package is the general grouping of products as seen on our order forms.
1231 func (r Billing_Item) GetPackage() (resp datatypes.Product_Package, err error) {
1232 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getPackage", nil, &r.Options, &resp)
1233 return
1234 }
1235 1236 // Retrieve A billing item's parent item. If a billing item has no parent item then this value is null.
1237 func (r Billing_Item) GetParent() (resp datatypes.Billing_Item, err error) {
1238 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getParent", nil, &r.Options, &resp)
1239 return
1240 }
1241 1242 // Retrieve A billing item's parent item. If a billing item has no parent item then this value is null.
1243 func (r Billing_Item) GetParentVirtualGuestBillingItem() (resp datatypes.Billing_Item_Virtual_Guest, err error) {
1244 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getParentVirtualGuestBillingItem", nil, &r.Options, &resp)
1245 return
1246 }
1247 1248 // Retrieve This flag indicates whether a billing item is scheduled to be canceled or not.
1249 func (r Billing_Item) GetPendingCancellationFlag() (resp bool, err error) {
1250 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getPendingCancellationFlag", nil, &r.Options, &resp)
1251 return
1252 }
1253 1254 // Retrieve The new order item that will replace this billing item.
1255 func (r Billing_Item) GetPendingOrderItem() (resp datatypes.Billing_Order_Item, err error) {
1256 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getPendingOrderItem", nil, &r.Options, &resp)
1257 return
1258 }
1259 1260 // Retrieve Provisioning transaction for this billing item
1261 func (r Billing_Item) GetProvisionTransaction() (resp datatypes.Provisioning_Version1_Transaction, err error) {
1262 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getProvisionTransaction", nil, &r.Options, &resp)
1263 return
1264 }
1265 1266 // This service returns billing items of a specified category code. This service should be used to retrieve billing items that you wish to cancel. Some billing items can be canceled via [[SoftLayer_Security_Certificate_Request|service cancellation]] service.
1267 //
1268 // In order to find billing items for cancellation, use [[SoftLayer_Product_Item_Category::getValidCancelableServiceItemCategories|product categories]] service to retrieve category codes that are eligible for cancellation.
1269 func (r Billing_Item) GetServiceBillingItemsByCategory(categoryCode *string, includeZeroRecurringFee *bool) (resp []datatypes.Billing_Item, err error) {
1270 params := []interface{}{
1271 categoryCode,
1272 includeZeroRecurringFee,
1273 }
1274 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getServiceBillingItemsByCategory", params, &r.Options, &resp)
1275 return
1276 }
1277 1278 // Retrieve A friendly description of software component
1279 func (r Billing_Item) GetSoftwareDescription() (resp datatypes.Software_Description, err error) {
1280 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getSoftwareDescription", nil, &r.Options, &resp)
1281 return
1282 }
1283 1284 // Retrieve Billing items whose product item has an upgrade path defined in our system will return the next product item in the upgrade path.
1285 func (r Billing_Item) GetUpgradeItem() (resp datatypes.Product_Item, err error) {
1286 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getUpgradeItem", nil, &r.Options, &resp)
1287 return
1288 }
1289 1290 // Retrieve Billing items whose product item has an upgrade path defined in our system will return all the product items in the upgrade path.
1291 func (r Billing_Item) GetUpgradeItems() (resp []datatypes.Product_Item, err error) {
1292 err = r.Session.DoRequest("SoftLayer_Billing_Item", "getUpgradeItems", nil, &r.Options, &resp)
1293 return
1294 }
1295 1296 // Remove the association from a billing item.
1297 func (r Billing_Item) RemoveAssociationId() (resp bool, err error) {
1298 err = r.Session.DoRequest("SoftLayer_Billing_Item", "removeAssociationId", nil, &r.Options, &resp)
1299 return
1300 }
1301 1302 // Set an associated billing item to an orphan billing item. Associations allow you to tie an "orphaned" billing item, any non-server billing item that doesn't have a parent item such as secondary IP subnets or StorageLayer accounts, to a server billing item. You may only set an association for an orphan to a server. You cannot associate a server to an orphan if the either the server or orphan billing items have a cancellation date set.
1303 func (r Billing_Item) SetAssociationId(associatedId *int) (resp bool, err error) {
1304 params := []interface{}{
1305 associatedId,
1306 }
1307 err = r.Session.DoRequest("SoftLayer_Billing_Item", "setAssociationId", params, &r.Options, &resp)
1308 return
1309 }
1310 1311 // Void a previously made cancellation for a service
1312 func (r Billing_Item) VoidCancelService() (resp bool, err error) {
1313 err = r.Session.DoRequest("SoftLayer_Billing_Item", "voidCancelService", nil, &r.Options, &resp)
1314 return
1315 }
1316 1317 // The SoftLayer_Billing_Item_Cancellation_Reason data type contains cancellation reasons.
1318 type Billing_Item_Cancellation_Reason struct {
1319 Session session.SLSession
1320 Options sl.Options
1321 }
1322 1323 // GetBillingItemCancellationReasonService returns an instance of the Billing_Item_Cancellation_Reason SoftLayer service
1324 func GetBillingItemCancellationReasonService(sess session.SLSession) Billing_Item_Cancellation_Reason {
1325 return Billing_Item_Cancellation_Reason{Session: sess}
1326 }
1327 1328 func (r Billing_Item_Cancellation_Reason) Id(id int) Billing_Item_Cancellation_Reason {
1329 r.Options.Id = &id
1330 return r
1331 }
1332 1333 func (r Billing_Item_Cancellation_Reason) Mask(mask string) Billing_Item_Cancellation_Reason {
1334 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
1335 mask = fmt.Sprintf("mask[%s]", mask)
1336 }
1337 1338 r.Options.Mask = mask
1339 return r
1340 }
1341 1342 func (r Billing_Item_Cancellation_Reason) Filter(filter string) Billing_Item_Cancellation_Reason {
1343 r.Options.Filter = filter
1344 return r
1345 }
1346 1347 func (r Billing_Item_Cancellation_Reason) Limit(limit int) Billing_Item_Cancellation_Reason {
1348 r.Options.Limit = &limit
1349 return r
1350 }
1351 1352 func (r Billing_Item_Cancellation_Reason) Offset(offset int) Billing_Item_Cancellation_Reason {
1353 r.Options.Offset = &offset
1354 return r
1355 }
1356 1357 // getAllCancellationReasons() retrieves a list of all cancellation reasons that a server/service may be assigned to.
1358 func (r Billing_Item_Cancellation_Reason) GetAllCancellationReasons() (resp []datatypes.Billing_Item_Cancellation_Reason, err error) {
1359 err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Reason", "getAllCancellationReasons", nil, &r.Options, &resp)
1360 return
1361 }
1362 1363 // Retrieve An billing cancellation reason category.
1364 func (r Billing_Item_Cancellation_Reason) GetBillingCancellationReasonCategory() (resp datatypes.Billing_Item_Cancellation_Reason_Category, err error) {
1365 err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Reason", "getBillingCancellationReasonCategory", nil, &r.Options, &resp)
1366 return
1367 }
1368 1369 // Retrieve The corresponding billing items having the specific cancellation reason.
1370 func (r Billing_Item_Cancellation_Reason) GetBillingItems() (resp []datatypes.Billing_Item, err error) {
1371 err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Reason", "getBillingItems", nil, &r.Options, &resp)
1372 return
1373 }
1374 1375 // no documentation yet
1376 func (r Billing_Item_Cancellation_Reason) GetObject() (resp datatypes.Billing_Item_Cancellation_Reason, err error) {
1377 err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Reason", "getObject", nil, &r.Options, &resp)
1378 return
1379 }
1380 1381 // Retrieve
1382 func (r Billing_Item_Cancellation_Reason) GetTranslatedReason() (resp string, err error) {
1383 err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Reason", "getTranslatedReason", nil, &r.Options, &resp)
1384 return
1385 }
1386 1387 // The SoftLayer_Billing_Item_Cancellation_Reason_Category data type contains cancellation reason categories.
1388 type Billing_Item_Cancellation_Reason_Category struct {
1389 Session session.SLSession
1390 Options sl.Options
1391 }
1392 1393 // GetBillingItemCancellationReasonCategoryService returns an instance of the Billing_Item_Cancellation_Reason_Category SoftLayer service
1394 func GetBillingItemCancellationReasonCategoryService(sess session.SLSession) Billing_Item_Cancellation_Reason_Category {
1395 return Billing_Item_Cancellation_Reason_Category{Session: sess}
1396 }
1397 1398 func (r Billing_Item_Cancellation_Reason_Category) Id(id int) Billing_Item_Cancellation_Reason_Category {
1399 r.Options.Id = &id
1400 return r
1401 }
1402 1403 func (r Billing_Item_Cancellation_Reason_Category) Mask(mask string) Billing_Item_Cancellation_Reason_Category {
1404 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
1405 mask = fmt.Sprintf("mask[%s]", mask)
1406 }
1407 1408 r.Options.Mask = mask
1409 return r
1410 }
1411 1412 func (r Billing_Item_Cancellation_Reason_Category) Filter(filter string) Billing_Item_Cancellation_Reason_Category {
1413 r.Options.Filter = filter
1414 return r
1415 }
1416 1417 func (r Billing_Item_Cancellation_Reason_Category) Limit(limit int) Billing_Item_Cancellation_Reason_Category {
1418 r.Options.Limit = &limit
1419 return r
1420 }
1421 1422 func (r Billing_Item_Cancellation_Reason_Category) Offset(offset int) Billing_Item_Cancellation_Reason_Category {
1423 r.Options.Offset = &offset
1424 return r
1425 }
1426 1427 // getAllCancellationReasonCategories() retrieves a list of all cancellation reason categories
1428 func (r Billing_Item_Cancellation_Reason_Category) GetAllCancellationReasonCategories() (resp []datatypes.Billing_Item_Cancellation_Reason_Category, err error) {
1429 err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Reason_Category", "getAllCancellationReasonCategories", nil, &r.Options, &resp)
1430 return
1431 }
1432 1433 // Retrieve The corresponding billing cancellation reasons having the specific billing cancellation reason category.
1434 func (r Billing_Item_Cancellation_Reason_Category) GetBillingCancellationReasons() (resp []datatypes.Billing_Item_Cancellation_Reason, err error) {
1435 err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Reason_Category", "getBillingCancellationReasons", nil, &r.Options, &resp)
1436 return
1437 }
1438 1439 // no documentation yet
1440 func (r Billing_Item_Cancellation_Reason_Category) GetObject() (resp datatypes.Billing_Item_Cancellation_Reason_Category, err error) {
1441 err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Reason_Category", "getObject", nil, &r.Options, &resp)
1442 return
1443 }
1444 1445 // SoftLayer_Billing_Item_Cancellation_Request data type is used to cancel service billing items.
1446 type Billing_Item_Cancellation_Request struct {
1447 Session session.SLSession
1448 Options sl.Options
1449 }
1450 1451 // GetBillingItemCancellationRequestService returns an instance of the Billing_Item_Cancellation_Request SoftLayer service
1452 func GetBillingItemCancellationRequestService(sess session.SLSession) Billing_Item_Cancellation_Request {
1453 return Billing_Item_Cancellation_Request{Session: sess}
1454 }
1455 1456 func (r Billing_Item_Cancellation_Request) Id(id int) Billing_Item_Cancellation_Request {
1457 r.Options.Id = &id
1458 return r
1459 }
1460 1461 func (r Billing_Item_Cancellation_Request) Mask(mask string) Billing_Item_Cancellation_Request {
1462 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
1463 mask = fmt.Sprintf("mask[%s]", mask)
1464 }
1465 1466 r.Options.Mask = mask
1467 return r
1468 }
1469 1470 func (r Billing_Item_Cancellation_Request) Filter(filter string) Billing_Item_Cancellation_Request {
1471 r.Options.Filter = filter
1472 return r
1473 }
1474 1475 func (r Billing_Item_Cancellation_Request) Limit(limit int) Billing_Item_Cancellation_Request {
1476 r.Options.Limit = &limit
1477 return r
1478 }
1479 1480 func (r Billing_Item_Cancellation_Request) Offset(offset int) Billing_Item_Cancellation_Request {
1481 r.Options.Offset = &offset
1482 return r
1483 }
1484 1485 // This method creates a service cancellation request.
1486 //
1487 // You need to have "Cancel Services" privilege to create a cancellation request. You have to provide at least one SoftLayer_Billing_Item_Cancellation_Request_Item in the "items" property. Make sure billing item's category code belongs to the cancelable product codes. You can retrieve the cancelable product category by the [[SoftLayer_Product_Item_Category::getValidCancelableServiceItemCategories|product category]] service.
1488 func (r Billing_Item_Cancellation_Request) CreateObject(templateObject *datatypes.Billing_Item_Cancellation_Request) (resp datatypes.Billing_Item_Cancellation_Request, err error) {
1489 params := []interface{}{
1490 templateObject,
1491 }
1492 err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Request", "createObject", params, &r.Options, &resp)
1493 return
1494 }
1495 1496 // Retrieve The SoftLayer account that a service cancellation request belongs to.
1497 func (r Billing_Item_Cancellation_Request) GetAccount() (resp datatypes.Account, err error) {
1498 err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Request", "getAccount", nil, &r.Options, &resp)
1499 return
1500 }
1501 1502 // This method returns all service cancellation requests.
1503 //
1504 // Make sure to include the "resultLimit" in the SOAP request header for quicker response. If there is no result limit header is passed, it will return the latest 25 results by default.
1505 func (r Billing_Item_Cancellation_Request) GetAllCancellationRequests() (resp []datatypes.Billing_Item_Cancellation_Request, err error) {
1506 err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Request", "getAllCancellationRequests", nil, &r.Options, &resp)
1507 return
1508 }
1509 1510 // Services can be canceled 2 or 3 days prior to your next bill date. This service returns the time by which a cancellation request submission is permitted in the current billing cycle. If the current time falls into the cut off date, this will return next earliest cancellation cut off date.
1511 //
1512 // Available category codes are: service, server
1513 func (r Billing_Item_Cancellation_Request) GetCancellationCutoffDate(accountId *int, categoryCode *string) (resp datatypes.Time, err error) {
1514 params := []interface{}{
1515 accountId,
1516 categoryCode,
1517 }
1518 err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Request", "getCancellationCutoffDate", params, &r.Options, &resp)
1519 return
1520 }
1521 1522 // Retrieve A collection of service cancellation items.
1523 func (r Billing_Item_Cancellation_Request) GetItems() (resp []datatypes.Billing_Item_Cancellation_Request_Item, err error) {
1524 err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Request", "getItems", nil, &r.Options, &resp)
1525 return
1526 }
1527 1528 // getObject retrieves the SoftLayer_Billing_Item_Cancellation_Request object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Billing_Item_Cancellation_Request service. You can only retrieve cancellation request records that are assigned to your SoftLayer account.
1529 func (r Billing_Item_Cancellation_Request) GetObject() (resp datatypes.Billing_Item_Cancellation_Request, err error) {
1530 err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Request", "getObject", nil, &r.Options, &resp)
1531 return
1532 }
1533 1534 // Retrieve The status of a service cancellation request.
1535 func (r Billing_Item_Cancellation_Request) GetStatus() (resp datatypes.Billing_Item_Cancellation_Request_Status, err error) {
1536 err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Request", "getStatus", nil, &r.Options, &resp)
1537 return
1538 }
1539 1540 // Retrieve The ticket that is associated with the service cancellation request.
1541 func (r Billing_Item_Cancellation_Request) GetTicket() (resp datatypes.Ticket, err error) {
1542 err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Request", "getTicket", nil, &r.Options, &resp)
1543 return
1544 }
1545 1546 // Retrieve The user that initiated a service cancellation request.
1547 func (r Billing_Item_Cancellation_Request) GetUser() (resp datatypes.User_Customer, err error) {
1548 err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Request", "getUser", nil, &r.Options, &resp)
1549 return
1550 }
1551 1552 // This method removes a cancellation item from a cancellation request that is in "Pending" or "Approved" status.
1553 func (r Billing_Item_Cancellation_Request) RemoveCancellationItem(itemId *int) (resp bool, err error) {
1554 params := []interface{}{
1555 itemId,
1556 }
1557 err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Request", "removeCancellationItem", params, &r.Options, &resp)
1558 return
1559 }
1560 1561 // This method examined if a billing item is eligible for cancellation. It checks if the billing item you provided is already in your existing cancellation request.
1562 func (r Billing_Item_Cancellation_Request) ValidateBillingItemForCancellation(billingItemId *int) (resp bool, err error) {
1563 params := []interface{}{
1564 billingItemId,
1565 }
1566 err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Request", "validateBillingItemForCancellation", params, &r.Options, &resp)
1567 return
1568 }
1569 1570 // This method voids a service cancellation request in "Pending" or "Approved" status.
1571 func (r Billing_Item_Cancellation_Request) Void(closeRelatedTicketFlag *bool) (resp bool, err error) {
1572 params := []interface{}{
1573 closeRelatedTicketFlag,
1574 }
1575 err = r.Session.DoRequest("SoftLayer_Billing_Item_Cancellation_Request", "void", params, &r.Options, &resp)
1576 return
1577 }
1578 1579 // no documentation yet
1580 type Billing_Item_Chronicle struct {
1581 Session session.SLSession
1582 Options sl.Options
1583 }
1584 1585 // GetBillingItemChronicleService returns an instance of the Billing_Item_Chronicle SoftLayer service
1586 func GetBillingItemChronicleService(sess session.SLSession) Billing_Item_Chronicle {
1587 return Billing_Item_Chronicle{Session: sess}
1588 }
1589 1590 func (r Billing_Item_Chronicle) Id(id int) Billing_Item_Chronicle {
1591 r.Options.Id = &id
1592 return r
1593 }
1594 1595 func (r Billing_Item_Chronicle) Mask(mask string) Billing_Item_Chronicle {
1596 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
1597 mask = fmt.Sprintf("mask[%s]", mask)
1598 }
1599 1600 r.Options.Mask = mask
1601 return r
1602 }
1603 1604 func (r Billing_Item_Chronicle) Filter(filter string) Billing_Item_Chronicle {
1605 r.Options.Filter = filter
1606 return r
1607 }
1608 1609 func (r Billing_Item_Chronicle) Limit(limit int) Billing_Item_Chronicle {
1610 r.Options.Limit = &limit
1611 return r
1612 }
1613 1614 func (r Billing_Item_Chronicle) Offset(offset int) Billing_Item_Chronicle {
1615 r.Options.Offset = &offset
1616 return r
1617 }
1618 1619 // Retrieve A Billing Item's associated child billing items. This includes "floating" items that are not necessarily child billing items of this billing item.
1620 func (r Billing_Item_Chronicle) GetAssociatedChildren() (resp []datatypes.Billing_Item_Chronicle, err error) {
1621 err = r.Session.DoRequest("SoftLayer_Billing_Item_Chronicle", "getAssociatedChildren", nil, &r.Options, &resp)
1622 return
1623 }
1624 1625 // no documentation yet
1626 func (r Billing_Item_Chronicle) GetObject() (resp datatypes.Billing_Item_Chronicle, err error) {
1627 err = r.Session.DoRequest("SoftLayer_Billing_Item_Chronicle", "getObject", nil, &r.Options, &resp)
1628 return
1629 }
1630 1631 // Retrieve The entry in the product catalog that the underlying billing item is based on.
1632 func (r Billing_Item_Chronicle) GetProduct() (resp datatypes.Product_Item, err error) {
1633 err = r.Session.DoRequest("SoftLayer_Billing_Item_Chronicle", "getProduct", nil, &r.Options, &resp)
1634 return
1635 }
1636 1637 // no documentation yet
1638 type Billing_Item_Virtual_DedicatedHost struct {
1639 Session session.SLSession
1640 Options sl.Options
1641 }
1642 1643 // GetBillingItemVirtualDedicatedHostService returns an instance of the Billing_Item_Virtual_DedicatedHost SoftLayer service
1644 func GetBillingItemVirtualDedicatedHostService(sess session.SLSession) Billing_Item_Virtual_DedicatedHost {
1645 return Billing_Item_Virtual_DedicatedHost{Session: sess}
1646 }
1647 1648 func (r Billing_Item_Virtual_DedicatedHost) Id(id int) Billing_Item_Virtual_DedicatedHost {
1649 r.Options.Id = &id
1650 return r
1651 }
1652 1653 func (r Billing_Item_Virtual_DedicatedHost) Mask(mask string) Billing_Item_Virtual_DedicatedHost {
1654 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
1655 mask = fmt.Sprintf("mask[%s]", mask)
1656 }
1657 1658 r.Options.Mask = mask
1659 return r
1660 }
1661 1662 func (r Billing_Item_Virtual_DedicatedHost) Filter(filter string) Billing_Item_Virtual_DedicatedHost {
1663 r.Options.Filter = filter
1664 return r
1665 }
1666 1667 func (r Billing_Item_Virtual_DedicatedHost) Limit(limit int) Billing_Item_Virtual_DedicatedHost {
1668 r.Options.Limit = &limit
1669 return r
1670 }
1671 1672 func (r Billing_Item_Virtual_DedicatedHost) Offset(offset int) Billing_Item_Virtual_DedicatedHost {
1673 r.Options.Offset = &offset
1674 return r
1675 }
1676 1677 // Cancel the resource or service for a billing Item. By default the billing item will be canceled on the next bill date and reclaim of the resource will begin shortly after the cancellation. Setting the "cancelImmediately" property to true will start the cancellation immediately if the item is eligible to be canceled immediately.
1678 //
1679 // The reason parameter could be from the list below:
1680 // * "No longer needed"
1681 // * "Business closing down"
1682 // * "Server / Upgrade Costs"
1683 // * "Migrating to larger server"
1684 // * "Migrating to smaller server"
1685 // * "Migrating to a different SoftLayer datacenter"
1686 // * "Network performance / latency"
1687 // * "Support response / timing"
1688 // * "Sales process / upgrades"
1689 // * "Moving to competitor"
1690 func (r Billing_Item_Virtual_DedicatedHost) CancelItem(cancelImmediately *bool, cancelAssociatedBillingItems *bool, reason *string, customerNote *string) (resp bool, err error) {
1691 params := []interface{}{
1692 cancelImmediately,
1693 cancelAssociatedBillingItems,
1694 reason,
1695 customerNote,
1696 }
1697 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "cancelItem", params, &r.Options, &resp)
1698 return
1699 }
1700 1701 // Cancel the resource or service (excluding bare metal servers) for a billing Item. The billing item will be cancelled immediately and reclaim of the resource will begin shortly.
1702 func (r Billing_Item_Virtual_DedicatedHost) CancelService() (resp bool, err error) {
1703 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "cancelService", nil, &r.Options, &resp)
1704 return
1705 }
1706 1707 // Cancel the resource or service for a billing Item
1708 func (r Billing_Item_Virtual_DedicatedHost) CancelServiceOnAnniversaryDate() (resp bool, err error) {
1709 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "cancelServiceOnAnniversaryDate", nil, &r.Options, &resp)
1710 return
1711 }
1712 1713 // Retrieve The account that a billing item belongs to.
1714 func (r Billing_Item_Virtual_DedicatedHost) GetAccount() (resp datatypes.Account, err error) {
1715 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getAccount", nil, &r.Options, &resp)
1716 return
1717 }
1718 1719 // Retrieve
1720 func (r Billing_Item_Virtual_DedicatedHost) GetActiveAgreement() (resp datatypes.Account_Agreement, err error) {
1721 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveAgreement", nil, &r.Options, &resp)
1722 return
1723 }
1724 1725 // Retrieve A flag indicating that the billing item is under an active agreement.
1726 func (r Billing_Item_Virtual_DedicatedHost) GetActiveAgreementFlag() (resp datatypes.Account_Agreement, err error) {
1727 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveAgreementFlag", nil, &r.Options, &resp)
1728 return
1729 }
1730 1731 // Retrieve A billing item's active associated child billing items. This includes "floating" items that are not necessarily child items of this billing item.
1732 func (r Billing_Item_Virtual_DedicatedHost) GetActiveAssociatedChildren() (resp []datatypes.Billing_Item, err error) {
1733 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveAssociatedChildren", nil, &r.Options, &resp)
1734 return
1735 }
1736 1737 // Retrieve
1738 func (r Billing_Item_Virtual_DedicatedHost) GetActiveAssociatedGuestDiskBillingItems() (resp []datatypes.Billing_Item, err error) {
1739 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveAssociatedGuestDiskBillingItems", nil, &r.Options, &resp)
1740 return
1741 }
1742 1743 // Retrieve A Billing Item's active bundled billing items.
1744 func (r Billing_Item_Virtual_DedicatedHost) GetActiveBundledItems() (resp []datatypes.Billing_Item, err error) {
1745 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveBundledItems", nil, &r.Options, &resp)
1746 return
1747 }
1748 1749 // Retrieve A service cancellation request item that corresponds to the billing item.
1750 func (r Billing_Item_Virtual_DedicatedHost) GetActiveCancellationItem() (resp datatypes.Billing_Item_Cancellation_Request_Item, err error) {
1751 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveCancellationItem", nil, &r.Options, &resp)
1752 return
1753 }
1754 1755 // Retrieve A Billing Item's active child billing items.
1756 func (r Billing_Item_Virtual_DedicatedHost) GetActiveChildren() (resp []datatypes.Billing_Item, err error) {
1757 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveChildren", nil, &r.Options, &resp)
1758 return
1759 }
1760 1761 // Retrieve
1762 func (r Billing_Item_Virtual_DedicatedHost) GetActiveFlag() (resp bool, err error) {
1763 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveFlag", nil, &r.Options, &resp)
1764 return
1765 }
1766 1767 // Retrieve
1768 func (r Billing_Item_Virtual_DedicatedHost) GetActiveSparePoolAssociatedGuestDiskBillingItems() (resp []datatypes.Billing_Item, err error) {
1769 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveSparePoolAssociatedGuestDiskBillingItems", nil, &r.Options, &resp)
1770 return
1771 }
1772 1773 // Retrieve A Billing Item's spare pool bundled billing items.
1774 func (r Billing_Item_Virtual_DedicatedHost) GetActiveSparePoolBundledItems() (resp []datatypes.Billing_Item, err error) {
1775 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getActiveSparePoolBundledItems", nil, &r.Options, &resp)
1776 return
1777 }
1778 1779 // Retrieve A billing item's associated parent. This is to be used for billing items that are "floating", and therefore are not child items of any parent billing item. If it is desired to associate an item to another, populate this with the SoftLayer_Billing_Item ID of that associated parent item.
1780 func (r Billing_Item_Virtual_DedicatedHost) GetAssociatedBillingItem() (resp datatypes.Billing_Item, err error) {
1781 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getAssociatedBillingItem", nil, &r.Options, &resp)
1782 return
1783 }
1784 1785 // Retrieve A history of billing items which a billing item has been associated with.
1786 func (r Billing_Item_Virtual_DedicatedHost) GetAssociatedBillingItemHistory() (resp []datatypes.Billing_Item_Association_History, err error) {
1787 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getAssociatedBillingItemHistory", nil, &r.Options, &resp)
1788 return
1789 }
1790 1791 // Retrieve A Billing Item's associated child billing items. This includes "floating" items that are not necessarily child billing items of this billing item.
1792 func (r Billing_Item_Virtual_DedicatedHost) GetAssociatedChildren() (resp []datatypes.Billing_Item, err error) {
1793 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getAssociatedChildren", nil, &r.Options, &resp)
1794 return
1795 }
1796 1797 // Retrieve A billing item's associated parent billing item. This object will be the same as the parent billing item if parentId is set.
1798 func (r Billing_Item_Virtual_DedicatedHost) GetAssociatedParent() (resp []datatypes.Billing_Item, err error) {
1799 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getAssociatedParent", nil, &r.Options, &resp)
1800 return
1801 }
1802 1803 // Retrieve
1804 func (r Billing_Item_Virtual_DedicatedHost) GetAvailableMatchingVlans() (resp []datatypes.Network_Vlan, err error) {
1805 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getAvailableMatchingVlans", nil, &r.Options, &resp)
1806 return
1807 }
1808 1809 // Retrieve The bandwidth allocation for a billing item.
1810 func (r Billing_Item_Virtual_DedicatedHost) GetBandwidthAllocation() (resp datatypes.Network_Bandwidth_Version1_Allocation, err error) {
1811 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getBandwidthAllocation", nil, &r.Options, &resp)
1812 return
1813 }
1814 1815 // Retrieve A billing item's recurring child items that have once been billed and are scheduled to be billed in the future.
1816 func (r Billing_Item_Virtual_DedicatedHost) GetBillableChildren() (resp []datatypes.Billing_Item, err error) {
1817 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getBillableChildren", nil, &r.Options, &resp)
1818 return
1819 }
1820 1821 // Retrieve A Billing Item's bundled billing items.
1822 func (r Billing_Item_Virtual_DedicatedHost) GetBundledItems() (resp []datatypes.Billing_Item, err error) {
1823 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getBundledItems", nil, &r.Options, &resp)
1824 return
1825 }
1826 1827 // Retrieve A Billing Item's active child billing items.
1828 func (r Billing_Item_Virtual_DedicatedHost) GetCanceledChildren() (resp []datatypes.Billing_Item, err error) {
1829 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getCanceledChildren", nil, &r.Options, &resp)
1830 return
1831 }
1832 1833 // Retrieve The billing item's cancellation reason.
1834 func (r Billing_Item_Virtual_DedicatedHost) GetCancellationReason() (resp datatypes.Billing_Item_Cancellation_Reason, err error) {
1835 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getCancellationReason", nil, &r.Options, &resp)
1836 return
1837 }
1838 1839 // Retrieve This will return any cancellation requests that are associated with this billing item.
1840 func (r Billing_Item_Virtual_DedicatedHost) GetCancellationRequests() (resp []datatypes.Billing_Item_Cancellation_Request, err error) {
1841 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getCancellationRequests", nil, &r.Options, &resp)
1842 return
1843 }
1844 1845 // Retrieve The item category to which the billing item's item belongs.
1846 func (r Billing_Item_Virtual_DedicatedHost) GetCategory() (resp datatypes.Product_Item_Category, err error) {
1847 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getCategory", nil, &r.Options, &resp)
1848 return
1849 }
1850 1851 // Retrieve A Billing Item's child billing items'
1852 func (r Billing_Item_Virtual_DedicatedHost) GetChildren() (resp []datatypes.Billing_Item, err error) {
1853 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getChildren", nil, &r.Options, &resp)
1854 return
1855 }
1856 1857 // Retrieve A Billing Item's active child billing items.
1858 func (r Billing_Item_Virtual_DedicatedHost) GetChildrenWithActiveAgreement() (resp []datatypes.Billing_Item, err error) {
1859 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getChildrenWithActiveAgreement", nil, &r.Options, &resp)
1860 return
1861 }
1862 1863 // Retrieve For product items which have a downgrade path defined, this will return those product items.
1864 func (r Billing_Item_Virtual_DedicatedHost) GetDowngradeItems() (resp []datatypes.Product_Item, err error) {
1865 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getDowngradeItems", nil, &r.Options, &resp)
1866 return
1867 }
1868 1869 // Retrieve A Billing Item's associated child billing items, excluding some items with a $0.00 recurring fee.
1870 func (r Billing_Item_Virtual_DedicatedHost) GetFilteredNextInvoiceChildren() (resp []datatypes.Billing_Item, err error) {
1871 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getFilteredNextInvoiceChildren", nil, &r.Options, &resp)
1872 return
1873 }
1874 1875 // Retrieve A flag that will reflect whether this billing item is billed on an hourly basis or not.
1876 func (r Billing_Item_Virtual_DedicatedHost) GetHourlyFlag() (resp bool, err error) {
1877 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getHourlyFlag", nil, &r.Options, &resp)
1878 return
1879 }
1880 1881 // Retrieve Invoice items associated with this billing item
1882 func (r Billing_Item_Virtual_DedicatedHost) GetInvoiceItem() (resp datatypes.Billing_Invoice_Item, err error) {
1883 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getInvoiceItem", nil, &r.Options, &resp)
1884 return
1885 }
1886 1887 // Retrieve All invoice items associated with the billing item
1888 func (r Billing_Item_Virtual_DedicatedHost) GetInvoiceItems() (resp []datatypes.Billing_Invoice_Item, err error) {
1889 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getInvoiceItems", nil, &r.Options, &resp)
1890 return
1891 }
1892 1893 // Retrieve The entry in the SoftLayer product catalog that a billing item is based upon.
1894 func (r Billing_Item_Virtual_DedicatedHost) GetItem() (resp datatypes.Product_Item, err error) {
1895 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getItem", nil, &r.Options, &resp)
1896 return
1897 }
1898 1899 // Retrieve The location of the billing item. Some billing items have physical properties such as the server itself. For items such as these, we provide location information.
1900 func (r Billing_Item_Virtual_DedicatedHost) GetLocation() (resp datatypes.Location, err error) {
1901 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getLocation", nil, &r.Options, &resp)
1902 return
1903 }
1904 1905 // Retrieve A Billing Item's child billing items and associated items'
1906 func (r Billing_Item_Virtual_DedicatedHost) GetNextInvoiceChildren() (resp []datatypes.Billing_Item, err error) {
1907 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getNextInvoiceChildren", nil, &r.Options, &resp)
1908 return
1909 }
1910 1911 // Retrieve A Billing Item's total, including any child billing items if they exist.'
1912 func (r Billing_Item_Virtual_DedicatedHost) GetNextInvoiceTotalOneTimeAmount() (resp datatypes.Float64, err error) {
1913 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getNextInvoiceTotalOneTimeAmount", nil, &r.Options, &resp)
1914 return
1915 }
1916 1917 // Retrieve A Billing Item's total, including any child billing items if they exist.'
1918 func (r Billing_Item_Virtual_DedicatedHost) GetNextInvoiceTotalOneTimeTaxAmount() (resp datatypes.Float64, err error) {
1919 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getNextInvoiceTotalOneTimeTaxAmount", nil, &r.Options, &resp)
1920 return
1921 }
1922 1923 // Retrieve A Billing Item's total, including any child billing items and associated billing items if they exist.'
1924 func (r Billing_Item_Virtual_DedicatedHost) GetNextInvoiceTotalRecurringAmount() (resp datatypes.Float64, err error) {
1925 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getNextInvoiceTotalRecurringAmount", nil, &r.Options, &resp)
1926 return
1927 }
1928 1929 // Retrieve This is deprecated and will always be zero. Because tax is calculated in real-time, previewing the next recurring invoice is pre-tax only.
1930 func (r Billing_Item_Virtual_DedicatedHost) GetNextInvoiceTotalRecurringTaxAmount() (resp datatypes.Float64, err error) {
1931 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getNextInvoiceTotalRecurringTaxAmount", nil, &r.Options, &resp)
1932 return
1933 }
1934 1935 // Retrieve A Billing Item's associated child billing items, excluding ALL items with a $0.00 recurring fee.
1936 func (r Billing_Item_Virtual_DedicatedHost) GetNonZeroNextInvoiceChildren() (resp []datatypes.Billing_Item, err error) {
1937 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getNonZeroNextInvoiceChildren", nil, &r.Options, &resp)
1938 return
1939 }
1940 1941 // no documentation yet
1942 func (r Billing_Item_Virtual_DedicatedHost) GetObject() (resp datatypes.Billing_Item_Virtual_DedicatedHost, err error) {
1943 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getObject", nil, &r.Options, &resp)
1944 return
1945 }
1946 1947 // Retrieve A billing item's original order item. Simply a reference to the original order from which this billing item was created.
1948 func (r Billing_Item_Virtual_DedicatedHost) GetOrderItem() (resp datatypes.Billing_Order_Item, err error) {
1949 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getOrderItem", nil, &r.Options, &resp)
1950 return
1951 }
1952 1953 // Retrieve The original physical location for this billing item--may differ from current.
1954 func (r Billing_Item_Virtual_DedicatedHost) GetOriginalLocation() (resp datatypes.Location, err error) {
1955 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getOriginalLocation", nil, &r.Options, &resp)
1956 return
1957 }
1958 1959 // Retrieve The package under which this billing item was sold. A Package is the general grouping of products as seen on our order forms.
1960 func (r Billing_Item_Virtual_DedicatedHost) GetPackage() (resp datatypes.Product_Package, err error) {
1961 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getPackage", nil, &r.Options, &resp)
1962 return
1963 }
1964 1965 // Retrieve A billing item's parent item. If a billing item has no parent item then this value is null.
1966 func (r Billing_Item_Virtual_DedicatedHost) GetParent() (resp datatypes.Billing_Item, err error) {
1967 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getParent", nil, &r.Options, &resp)
1968 return
1969 }
1970 1971 // Retrieve A billing item's parent item. If a billing item has no parent item then this value is null.
1972 func (r Billing_Item_Virtual_DedicatedHost) GetParentVirtualGuestBillingItem() (resp datatypes.Billing_Item_Virtual_Guest, err error) {
1973 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getParentVirtualGuestBillingItem", nil, &r.Options, &resp)
1974 return
1975 }
1976 1977 // Retrieve This flag indicates whether a billing item is scheduled to be canceled or not.
1978 func (r Billing_Item_Virtual_DedicatedHost) GetPendingCancellationFlag() (resp bool, err error) {
1979 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getPendingCancellationFlag", nil, &r.Options, &resp)
1980 return
1981 }
1982 1983 // Retrieve The new order item that will replace this billing item.
1984 func (r Billing_Item_Virtual_DedicatedHost) GetPendingOrderItem() (resp datatypes.Billing_Order_Item, err error) {
1985 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getPendingOrderItem", nil, &r.Options, &resp)
1986 return
1987 }
1988 1989 // Retrieve Provisioning transaction for this billing item
1990 func (r Billing_Item_Virtual_DedicatedHost) GetProvisionTransaction() (resp datatypes.Provisioning_Version1_Transaction, err error) {
1991 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getProvisionTransaction", nil, &r.Options, &resp)
1992 return
1993 }
1994 1995 // Retrieve The resource for a virtual dedicated host billing item.
1996 func (r Billing_Item_Virtual_DedicatedHost) GetResource() (resp datatypes.Virtual_DedicatedHost, err error) {
1997 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getResource", nil, &r.Options, &resp)
1998 return
1999 }
2000 2001 // This service returns billing items of a specified category code. This service should be used to retrieve billing items that you wish to cancel. Some billing items can be canceled via [[SoftLayer_Security_Certificate_Request|service cancellation]] service.
2002 //
2003 // In order to find billing items for cancellation, use [[SoftLayer_Product_Item_Category::getValidCancelableServiceItemCategories|product categories]] service to retrieve category codes that are eligible for cancellation.
2004 func (r Billing_Item_Virtual_DedicatedHost) GetServiceBillingItemsByCategory(categoryCode *string, includeZeroRecurringFee *bool) (resp []datatypes.Billing_Item, err error) {
2005 params := []interface{}{
2006 categoryCode,
2007 includeZeroRecurringFee,
2008 }
2009 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getServiceBillingItemsByCategory", params, &r.Options, &resp)
2010 return
2011 }
2012 2013 // Retrieve A friendly description of software component
2014 func (r Billing_Item_Virtual_DedicatedHost) GetSoftwareDescription() (resp datatypes.Software_Description, err error) {
2015 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getSoftwareDescription", nil, &r.Options, &resp)
2016 return
2017 }
2018 2019 // Retrieve Billing items whose product item has an upgrade path defined in our system will return the next product item in the upgrade path.
2020 func (r Billing_Item_Virtual_DedicatedHost) GetUpgradeItem() (resp datatypes.Product_Item, err error) {
2021 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getUpgradeItem", nil, &r.Options, &resp)
2022 return
2023 }
2024 2025 // Retrieve Billing items whose product item has an upgrade path defined in our system will return all the product items in the upgrade path.
2026 func (r Billing_Item_Virtual_DedicatedHost) GetUpgradeItems() (resp []datatypes.Product_Item, err error) {
2027 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "getUpgradeItems", nil, &r.Options, &resp)
2028 return
2029 }
2030 2031 // Remove the association from a billing item.
2032 func (r Billing_Item_Virtual_DedicatedHost) RemoveAssociationId() (resp bool, err error) {
2033 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "removeAssociationId", nil, &r.Options, &resp)
2034 return
2035 }
2036 2037 // Set an associated billing item to an orphan billing item. Associations allow you to tie an "orphaned" billing item, any non-server billing item that doesn't have a parent item such as secondary IP subnets or StorageLayer accounts, to a server billing item. You may only set an association for an orphan to a server. You cannot associate a server to an orphan if the either the server or orphan billing items have a cancellation date set.
2038 func (r Billing_Item_Virtual_DedicatedHost) SetAssociationId(associatedId *int) (resp bool, err error) {
2039 params := []interface{}{
2040 associatedId,
2041 }
2042 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "setAssociationId", params, &r.Options, &resp)
2043 return
2044 }
2045 2046 // Void a previously made cancellation for a service
2047 func (r Billing_Item_Virtual_DedicatedHost) VoidCancelService() (resp bool, err error) {
2048 err = r.Session.DoRequest("SoftLayer_Billing_Item_Virtual_DedicatedHost", "voidCancelService", nil, &r.Options, &resp)
2049 return
2050 }
2051 2052 // The SoftLayer_Billing_Order data type contains general information relating to an individual order applied to a SoftLayer customer account or to a new customer. Personal information in this type such as names, addresses, and phone numbers are taken from the account's contact information at the time the order is generated for existing SoftLayer customer.
2053 type Billing_Order struct {
2054 Session session.SLSession
2055 Options sl.Options
2056 }
2057 2058 // GetBillingOrderService returns an instance of the Billing_Order SoftLayer service
2059 func GetBillingOrderService(sess session.SLSession) Billing_Order {
2060 return Billing_Order{Session: sess}
2061 }
2062 2063 func (r Billing_Order) Id(id int) Billing_Order {
2064 r.Options.Id = &id
2065 return r
2066 }
2067 2068 func (r Billing_Order) Mask(mask string) Billing_Order {
2069 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
2070 mask = fmt.Sprintf("mask[%s]", mask)
2071 }
2072 2073 r.Options.Mask = mask
2074 return r
2075 }
2076 2077 func (r Billing_Order) Filter(filter string) Billing_Order {
2078 r.Options.Filter = filter
2079 return r
2080 }
2081 2082 func (r Billing_Order) Limit(limit int) Billing_Order {
2083 r.Options.Limit = &limit
2084 return r
2085 }
2086 2087 func (r Billing_Order) Offset(offset int) Billing_Order {
2088 r.Options.Offset = &offset
2089 return r
2090 }
2091 2092 // When an order has been modified, the customer will need to approve the changes. This method will allow the customer to approve the changes.
2093 func (r Billing_Order) ApproveModifiedOrder() (resp bool, err error) {
2094 err = r.Session.DoRequest("SoftLayer_Billing_Order", "approveModifiedOrder", nil, &r.Options, &resp)
2095 return
2096 }
2097 2098 // Retrieve The [[SoftLayer_Account|account]] to which an order belongs.
2099 func (r Billing_Order) GetAccount() (resp datatypes.Account, err error) {
2100 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getAccount", nil, &r.Options, &resp)
2101 return
2102 }
2103 2104 // This will get all billing orders for your account.
2105 func (r Billing_Order) GetAllObjects() (resp []datatypes.Billing_Order, err error) {
2106 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getAllObjects", nil, &r.Options, &resp)
2107 return
2108 }
2109 2110 // Retrieve
2111 func (r Billing_Order) GetBrand() (resp datatypes.Brand, err error) {
2112 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getBrand", nil, &r.Options, &resp)
2113 return
2114 }
2115 2116 // Retrieve A cart is similar to a quote, except that it can be continually modified by the customer and does not have locked-in prices. Not all orders will have a cart associated with them. See [[SoftLayer_Billing_Order_Cart]] for more information.
2117 func (r Billing_Order) GetCart() (resp datatypes.Billing_Order_Cart, err error) {
2118 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getCart", nil, &r.Options, &resp)
2119 return
2120 }
2121 2122 // Retrieve The [[SoftLayer_Billing_Order_Item (type)|order items]] that are core restricted
2123 func (r Billing_Order) GetCoreRestrictedItems() (resp []datatypes.Billing_Order_Item, err error) {
2124 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getCoreRestrictedItems", nil, &r.Options, &resp)
2125 return
2126 }
2127 2128 // Retrieve All credit card transactions associated with this order. If this order was not placed with a credit card, this will be empty.
2129 func (r Billing_Order) GetCreditCardTransactions() (resp []datatypes.Billing_Payment_Card_Transaction, err error) {
2130 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getCreditCardTransactions", nil, &r.Options, &resp)
2131 return
2132 }
2133 2134 // Retrieve
2135 func (r Billing_Order) GetExchangeRate() (resp datatypes.Billing_Currency_ExchangeRate, err error) {
2136 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getExchangeRate", nil, &r.Options, &resp)
2137 return
2138 }
2139 2140 // Retrieve
2141 func (r Billing_Order) GetInitialInvoice() (resp datatypes.Billing_Invoice, err error) {
2142 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getInitialInvoice", nil, &r.Options, &resp)
2143 return
2144 }
2145 2146 // Retrieve The SoftLayer_Billing_Order_items included in an order.
2147 func (r Billing_Order) GetItems() (resp []datatypes.Billing_Order_Item, err error) {
2148 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getItems", nil, &r.Options, &resp)
2149 return
2150 }
2151 2152 // getObject retrieves the SoftLayer_Billing_Order object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Billing_Order service. You can only retrieve orders that are assigned to your portal user's account.
2153 func (r Billing_Order) GetObject() (resp datatypes.Billing_Order, err error) {
2154 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getObject", nil, &r.Options, &resp)
2155 return
2156 }
2157 2158 // Retrieve
2159 func (r Billing_Order) GetOrderApprovalDate() (resp datatypes.Time, err error) {
2160 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getOrderApprovalDate", nil, &r.Options, &resp)
2161 return
2162 }
2163 2164 // Retrieve An order's non-server items total monthly fee.
2165 func (r Billing_Order) GetOrderNonServerMonthlyAmount() (resp datatypes.Float64, err error) {
2166 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getOrderNonServerMonthlyAmount", nil, &r.Options, &resp)
2167 return
2168 }
2169 2170 // Retrieve An order's server items total monthly fee.
2171 func (r Billing_Order) GetOrderServerMonthlyAmount() (resp datatypes.Float64, err error) {
2172 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getOrderServerMonthlyAmount", nil, &r.Options, &resp)
2173 return
2174 }
2175 2176 // Get a list of [[SoftLayer_Container_Billing_Order_Status]] objects.
2177 func (r Billing_Order) GetOrderStatuses() (resp []datatypes.Container_Billing_Order_Status, err error) {
2178 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getOrderStatuses", nil, &r.Options, &resp)
2179 return
2180 }
2181 2182 // Retrieve An order's top level items. This normally includes the server line item and any non-server additional services such as NAS or ISCSI.
2183 func (r Billing_Order) GetOrderTopLevelItems() (resp []datatypes.Billing_Order_Item, err error) {
2184 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getOrderTopLevelItems", nil, &r.Options, &resp)
2185 return
2186 }
2187 2188 // Retrieve This amount represents the order's initial charge including set up fee and taxes.
2189 func (r Billing_Order) GetOrderTotalAmount() (resp datatypes.Float64, err error) {
2190 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getOrderTotalAmount", nil, &r.Options, &resp)
2191 return
2192 }
2193 2194 // Retrieve An order's total one time amount summing all the set up fees, the labor fees and the one time fees. Taxes will be applied for non-tax-exempt. This amount represents the initial fees that will be charged.
2195 func (r Billing_Order) GetOrderTotalOneTime() (resp datatypes.Float64, err error) {
2196 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getOrderTotalOneTime", nil, &r.Options, &resp)
2197 return
2198 }
2199 2200 // Retrieve An order's total one time amount. This amount represents the initial fees before tax.
2201 func (r Billing_Order) GetOrderTotalOneTimeAmount() (resp datatypes.Float64, err error) {
2202 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getOrderTotalOneTimeAmount", nil, &r.Options, &resp)
2203 return
2204 }
2205 2206 // Retrieve An order's total one time tax amount. This amount represents the tax that will be applied to the total charge, if the SoftLayer_Account tied to a SoftLayer_Billing_Order is a taxable account.
2207 func (r Billing_Order) GetOrderTotalOneTimeTaxAmount() (resp datatypes.Float64, err error) {
2208 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getOrderTotalOneTimeTaxAmount", nil, &r.Options, &resp)
2209 return
2210 }
2211 2212 // Retrieve An order's total recurring amount. Taxes will be applied for non-tax-exempt. This amount represents the fees that will be charged on a recurring (usually monthly) basis.
2213 func (r Billing_Order) GetOrderTotalRecurring() (resp datatypes.Float64, err error) {
2214 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getOrderTotalRecurring", nil, &r.Options, &resp)
2215 return
2216 }
2217 2218 // Retrieve An order's total recurring amount. This amount represents the fees that will be charged on a recurring (usually monthly) basis.
2219 func (r Billing_Order) GetOrderTotalRecurringAmount() (resp datatypes.Float64, err error) {
2220 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getOrderTotalRecurringAmount", nil, &r.Options, &resp)
2221 return
2222 }
2223 2224 // Retrieve The total tax amount of the recurring fees, if the SoftLayer_Account tied to a SoftLayer_Billing_Order is a taxable account.
2225 func (r Billing_Order) GetOrderTotalRecurringTaxAmount() (resp datatypes.Float64, err error) {
2226 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getOrderTotalRecurringTaxAmount", nil, &r.Options, &resp)
2227 return
2228 }
2229 2230 // Retrieve An order's total setup fee.
2231 func (r Billing_Order) GetOrderTotalSetupAmount() (resp datatypes.Float64, err error) {
2232 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getOrderTotalSetupAmount", nil, &r.Options, &resp)
2233 return
2234 }
2235 2236 // Retrieve The type of an order. This lets you know where this order was generated from.
2237 func (r Billing_Order) GetOrderType() (resp datatypes.Billing_Order_Type, err error) {
2238 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getOrderType", nil, &r.Options, &resp)
2239 return
2240 }
2241 2242 // Retrieve All PayPal transactions associated with this order. If this order was not placed with PayPal, this will be empty.
2243 func (r Billing_Order) GetPaypalTransactions() (resp []datatypes.Billing_Payment_PayPal_Transaction, err error) {
2244 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getPaypalTransactions", nil, &r.Options, &resp)
2245 return
2246 }
2247 2248 // Retrieve a PDF record of a SoftLayer quote. If the order is not a quote, an error will be thrown.
2249 func (r Billing_Order) GetPdf() (resp []byte, err error) {
2250 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getPdf", nil, &r.Options, &resp)
2251 return
2252 }
2253 2254 // Retrieve the default filename of an order PDF.
2255 func (r Billing_Order) GetPdfFilename() (resp string, err error) {
2256 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getPdfFilename", nil, &r.Options, &resp)
2257 return
2258 }
2259 2260 // Retrieve
2261 func (r Billing_Order) GetPresaleEvent() (resp datatypes.Sales_Presale_Event, err error) {
2262 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getPresaleEvent", nil, &r.Options, &resp)
2263 return
2264 }
2265 2266 // Retrieve The quote of an order. This quote holds information about its expiration date, creation date, name and status. This information is tied to an order having the status 'QUOTE'
2267 func (r Billing_Order) GetQuote() (resp datatypes.Billing_Order_Quote, err error) {
2268 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getQuote", nil, &r.Options, &resp)
2269 return
2270 }
2271 2272 // Generate an [[SoftLayer_Container_Product_Order|order container]] from a billing order. This will take into account promotions, reseller status, estimated taxes and all other standard order verification processes.
2273 func (r Billing_Order) GetRecalculatedOrderContainer(message *string, ignoreDiscountsFlag *bool) (resp datatypes.Container_Product_Order, err error) {
2274 params := []interface{}{
2275 message,
2276 ignoreDiscountsFlag,
2277 }
2278 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getRecalculatedOrderContainer", params, &r.Options, &resp)
2279 return
2280 }
2281 2282 // Generate a [[SoftLayer_Container_Product_Order_Receipt]] object with all the order information.
2283 func (r Billing_Order) GetReceipt() (resp datatypes.Container_Product_Order_Receipt, err error) {
2284 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getReceipt", nil, &r.Options, &resp)
2285 return
2286 }
2287 2288 // Retrieve The Referral Partner who referred this order. (Only necessary for new customer orders)
2289 func (r Billing_Order) GetReferralPartner() (resp datatypes.Account, err error) {
2290 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getReferralPartner", nil, &r.Options, &resp)
2291 return
2292 }
2293 2294 // Retrieve This flag indicates an order is an upgrade.
2295 func (r Billing_Order) GetUpgradeRequestFlag() (resp bool, err error) {
2296 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getUpgradeRequestFlag", nil, &r.Options, &resp)
2297 return
2298 }
2299 2300 // Retrieve The SoftLayer_User_Customer object tied to an order.
2301 func (r Billing_Order) GetUserRecord() (resp datatypes.User_Customer, err error) {
2302 err = r.Session.DoRequest("SoftLayer_Billing_Order", "getUserRecord", nil, &r.Options, &resp)
2303 return
2304 }
2305 2306 // When an order has been modified, it will contain a status indicating so. This method checks that status and also verifies that the active user's account is the same as the account on the order.
2307 func (r Billing_Order) IsPendingEditApproval() (resp bool, err error) {
2308 err = r.Session.DoRequest("SoftLayer_Billing_Order", "isPendingEditApproval", nil, &r.Options, &resp)
2309 return
2310 }
2311 2312 // no documentation yet
2313 type Billing_Order_Cart struct {
2314 Session session.SLSession
2315 Options sl.Options
2316 }
2317 2318 // GetBillingOrderCartService returns an instance of the Billing_Order_Cart SoftLayer service
2319 func GetBillingOrderCartService(sess session.SLSession) Billing_Order_Cart {
2320 return Billing_Order_Cart{Session: sess}
2321 }
2322 2323 func (r Billing_Order_Cart) Id(id int) Billing_Order_Cart {
2324 r.Options.Id = &id
2325 return r
2326 }
2327 2328 func (r Billing_Order_Cart) Mask(mask string) Billing_Order_Cart {
2329 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
2330 mask = fmt.Sprintf("mask[%s]", mask)
2331 }
2332 2333 r.Options.Mask = mask
2334 return r
2335 }
2336 2337 func (r Billing_Order_Cart) Filter(filter string) Billing_Order_Cart {
2338 r.Options.Filter = filter
2339 return r
2340 }
2341 2342 func (r Billing_Order_Cart) Limit(limit int) Billing_Order_Cart {
2343 r.Options.Limit = &limit
2344 return r
2345 }
2346 2347 func (r Billing_Order_Cart) Offset(offset int) Billing_Order_Cart {
2348 r.Options.Offset = &offset
2349 return r
2350 }
2351 2352 // This method is used to transfer an anonymous quote to the active user and associated account. An anonymous quote is one that was created by a user without being authenticated. If a quote was created anonymously and then the customer attempts to access that anonymous quote via the API (which requires authentication), the customer will be unable to retrieve the quote due to the security restrictions in place. By providing the ability for a customer to claim a quote, s/he will be able to pull the anonymous quote onto his/her account and successfully view the quote.
2353 //
2354 // To claim a quote, both the quote id and the quote key (the 32-character random string) must be provided.
2355 func (r Billing_Order_Cart) Claim(quoteKey *string, quoteId *int) (resp datatypes.Billing_Order_Quote, err error) {
2356 params := []interface{}{
2357 quoteKey,
2358 quoteId,
2359 }
2360 err = r.Session.DoRequest("SoftLayer_Billing_Order_Cart", "claim", params, &r.Options, &resp)
2361 return
2362 }
2363 2364 // When creating a new cart, the order data is sent through SoftLayer_Product_Order::verifyOrder to make sure that the cart contains valid data. If an issue is found with the order, an exception will be thrown and you will receive the same response as if SoftLayer_Product_Order::verifyOrder were called directly. Once the order verification is complete, the cart will be created.
2365 //
2366 // The response is the new cart id.
2367 func (r Billing_Order_Cart) CreateCart(orderData *datatypes.Container_Product_Order) (resp int, err error) {
2368 params := []interface{}{
2369 orderData,
2370 }
2371 err = r.Session.DoRequest("SoftLayer_Billing_Order_Cart", "createCart", params, &r.Options, &resp)
2372 return
2373 }
2374 2375 // If a cart is no longer needed, it can be deleted using this service. Once a cart has been deleted, it cannot be retrieved again.
2376 func (r Billing_Order_Cart) DeleteCart() (resp bool, err error) {
2377 err = r.Session.DoRequest("SoftLayer_Billing_Order_Cart", "deleteCart", nil, &r.Options, &resp)
2378 return
2379 }
2380 2381 // Account master users and sub-users in the SoftLayer customer portal can delete the quote of an order.
2382 func (r Billing_Order_Cart) DeleteQuote() (resp datatypes.Billing_Order_Quote, err error) {
2383 err = r.Session.DoRequest("SoftLayer_Billing_Order_Cart", "deleteQuote", nil, &r.Options, &resp)
2384 return
2385 }
2386 2387 // Retrieve A quote's corresponding account.
2388 func (r Billing_Order_Cart) GetAccount() (resp datatypes.Account, err error) {
2389 err = r.Session.DoRequest("SoftLayer_Billing_Order_Cart", "getAccount", nil, &r.Options, &resp)
2390 return
2391 }
2392 2393 // Retrieve a valid cart record of a SoftLayer order.
2394 func (r Billing_Order_Cart) GetCartByCartKey(cartKey *string) (resp datatypes.Billing_Order_Cart, err error) {
2395 params := []interface{}{
2396 cartKey,
2397 }
2398 err = r.Session.DoRequest("SoftLayer_Billing_Order_Cart", "getCartByCartKey", params, &r.Options, &resp)
2399 return
2400 }
2401 2402 // Retrieve Indicates whether the owner of the quote chosen to no longer be contacted.
2403 func (r Billing_Order_Cart) GetDoNotContactFlag() (resp bool, err error) {
2404 err = r.Session.DoRequest("SoftLayer_Billing_Order_Cart", "getDoNotContactFlag", nil, &r.Options, &resp)
2405 return
2406 }
2407 2408 // no documentation yet
2409 func (r Billing_Order_Cart) GetObject() (resp datatypes.Billing_Order_Cart, err error) {
2410 err = r.Session.DoRequest("SoftLayer_Billing_Order_Cart", "getObject", nil, &r.Options, &resp)
2411 return
2412 }
2413 2414 // Retrieve This order contains the records for which products were selected for this quote.
2415 func (r Billing_Order_Cart) GetOrder() (resp datatypes.Billing_Order, err error) {
2416 err = r.Session.DoRequest("SoftLayer_Billing_Order_Cart", "getOrder", nil, &r.Options, &resp)
2417 return
2418 }
2419 2420 // Retrieve These are all the orders that were created from this quote.
2421 func (r Billing_Order_Cart) GetOrdersFromQuote() (resp []datatypes.Billing_Order, err error) {
2422 err = r.Session.DoRequest("SoftLayer_Billing_Order_Cart", "getOrdersFromQuote", nil, &r.Options, &resp)
2423 return
2424 }
2425 2426 // Retrieve a PDF copy of the cart.
2427 func (r Billing_Order_Cart) GetPdf() (resp []byte, err error) {
2428 err = r.Session.DoRequest("SoftLayer_Billing_Order_Cart", "getPdf", nil, &r.Options, &resp)
2429 return
2430 }
2431 2432 // This method will return a [[SoftLayer_Billing_Order_Quote]] that is identified by the quote key specified. If you do not have access to the quote or it does not exist, an exception will be thrown indicating so.
2433 func (r Billing_Order_Cart) GetQuoteByQuoteKey(quoteKey *string) (resp datatypes.Billing_Order_Quote, err error) {
2434 params := []interface{}{
2435 quoteKey,
2436 }
2437 err = r.Session.DoRequest("SoftLayer_Billing_Order_Cart", "getQuoteByQuoteKey", params, &r.Options, &resp)
2438 return
2439 }
2440 2441 // This method allows the customer to retrieve a saved cart and put it in a format that's suitable to be sent to SoftLayer_Billing_Order_Cart::createCart to create a new cart or to SoftLayer_Billing_Order_Cart::updateCart to update an existing cart.
2442 func (r Billing_Order_Cart) GetRecalculatedOrderContainer(orderData *datatypes.Container_Product_Order, orderBeingPlacedFlag *bool) (resp datatypes.Container_Product_Order, err error) {
2443 params := []interface{}{
2444 orderData,
2445 orderBeingPlacedFlag,
2446 }
2447 err = r.Session.DoRequest("SoftLayer_Billing_Order_Cart", "getRecalculatedOrderContainer", params, &r.Options, &resp)
2448 return
2449 }
2450 2451 // Use this method for placing server orders and additional services orders. The same applies for this as with verifyOrder. Send in the SoftLayer_Container_Product_Order_Hardware_Server for server orders. In addition to verifying the order, placeOrder() also makes an initial authorization on the SoftLayer_Account tied to this order, if a credit card is on file. If the account tied to this order is a paypal customer, an URL will also be returned to the customer. After placing the order, you must go to this URL to finish the authorization process. This tells paypal that you indeed want to place the order. After going to this URL, it will direct you back to a SoftLayer webpage that tells us you have finished the process. After this, it will go to sales for final approval.
2452 func (r Billing_Order_Cart) PlaceOrder(orderData interface{}) (resp datatypes.Container_Product_Order_Receipt, err error) {
2453 err = datatypes.SetComplexType(orderData)
2454 if err != nil {
2455 return
2456 }
2457 params := []interface{}{
2458 orderData,
2459 }
2460 err = r.Session.DoRequest("SoftLayer_Billing_Order_Cart", "placeOrder", params, &r.Options, &resp)
2461 return
2462 }
2463 2464 // Use this method for placing server quotes and additional services quotes. The same applies for this as with verifyOrder. Send in the SoftLayer_Container_Product_Order_Hardware_Server for server quotes. In addition to verifying the quote, placeQuote() also makes an initial authorization on the SoftLayer_Account tied to this order, if a credit card is on file. If the account tied to this order is a paypal customer, an URL will also be returned to the customer. After placing the order, you must go to this URL to finish the authorization process. This tells paypal that you indeed want to place the order. After going to this URL, it will direct you back to a SoftLayer webpage that tells us you have finished the process.
2465 func (r Billing_Order_Cart) PlaceQuote(orderData interface{}) (resp datatypes.Container_Product_Order, err error) {
2466 params := []interface{}{
2467 orderData,
2468 }
2469 err = r.Session.DoRequest("SoftLayer_Billing_Order_Cart", "placeQuote", params, &r.Options, &resp)
2470 return
2471 }
2472 2473 // Account master users and sub-users in the SoftLayer customer portal can save the quote of an order to avoid its deletion after 5 days or its expiration after 2 days.
2474 func (r Billing_Order_Cart) SaveQuote() (resp datatypes.Billing_Order_Quote, err error) {
2475 err = r.Session.DoRequest("SoftLayer_Billing_Order_Cart", "saveQuote", nil, &r.Options, &resp)
2476 return
2477 }
2478 2479 // Like SoftLayer_Billing_Order_Cart::createCart, the order data will be sent through SoftLayer_Product_Order::verifyOrder to make sure that the updated cart information is valid. Once it has been verified, the new order data will be saved.
2480 //
2481 // This will return the cart id.
2482 func (r Billing_Order_Cart) UpdateCart(orderData *datatypes.Container_Product_Order) (resp int, err error) {
2483 params := []interface{}{
2484 orderData,
2485 }
2486 err = r.Session.DoRequest("SoftLayer_Billing_Order_Cart", "updateCart", params, &r.Options, &resp)
2487 return
2488 }
2489 2490 // Use this method for placing server orders and additional services orders. The same applies for this as with verifyOrder. Send in the SoftLayer_Container_Product_Order_Hardware_Server for server orders. In addition to verifying the order, placeOrder() also makes an initial authorization on the SoftLayer_Account tied to this order, if a credit card is on file. If the account tied to this order is a paypal customer, an URL will also be returned to the customer. After placing the order, you must go to this URL to finish the authorization process. This tells paypal that you indeed want to place the order. After going to this URL, it will direct you back to a SoftLayer webpage that tells us you have finished the process. After this, it will go to sales for final approval.
2491 func (r Billing_Order_Cart) VerifyOrder(orderData interface{}) (resp datatypes.Container_Product_Order, err error) {
2492 err = datatypes.SetComplexType(orderData)
2493 if err != nil {
2494 return
2495 }
2496 params := []interface{}{
2497 orderData,
2498 }
2499 err = r.Session.DoRequest("SoftLayer_Billing_Order_Cart", "verifyOrder", params, &r.Options, &resp)
2500 return
2501 }
2502 2503 // Withdraws the users acceptance of the GDPR terms.
2504 func (r Billing_Order_Cart) WithdrawGdprAcceptance() (err error) {
2505 var resp datatypes.Void
2506 err = r.Session.DoRequest("SoftLayer_Billing_Order_Cart", "withdrawGdprAcceptance", nil, &r.Options, &resp)
2507 return
2508 }
2509 2510 // Every individual item that a SoftLayer customer is billed for is recorded in the SoftLayer_Billing_Item data type. Billing items range from server chassis to hard drives to control panels, bandwidth quota upgrades and port upgrade charges. SoftLayer [[SoftLayer_Billing_Invoice|invoices]] are generated from the cost of a customer's billing items. Billing items are copied from the product catalog as they're ordered by customers to create a reference between an account and the billable items they own.
2511 //
2512 // Billing items exist in a tree relationship. Items are associated with each other by parent/child relationships. Component items such as CPU's, RAM, and software each have a parent billing item for the server chassis they're associated with. Billing Items with a null parent item do not have an associated parent item.
2513 type Billing_Order_Item struct {
2514 Session session.SLSession
2515 Options sl.Options
2516 }
2517 2518 // GetBillingOrderItemService returns an instance of the Billing_Order_Item SoftLayer service
2519 func GetBillingOrderItemService(sess session.SLSession) Billing_Order_Item {
2520 return Billing_Order_Item{Session: sess}
2521 }
2522 2523 func (r Billing_Order_Item) Id(id int) Billing_Order_Item {
2524 r.Options.Id = &id
2525 return r
2526 }
2527 2528 func (r Billing_Order_Item) Mask(mask string) Billing_Order_Item {
2529 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
2530 mask = fmt.Sprintf("mask[%s]", mask)
2531 }
2532 2533 r.Options.Mask = mask
2534 return r
2535 }
2536 2537 func (r Billing_Order_Item) Filter(filter string) Billing_Order_Item {
2538 r.Options.Filter = filter
2539 return r
2540 }
2541 2542 func (r Billing_Order_Item) Limit(limit int) Billing_Order_Item {
2543 r.Options.Limit = &limit
2544 return r
2545 }
2546 2547 func (r Billing_Order_Item) Offset(offset int) Billing_Order_Item {
2548 r.Options.Offset = &offset
2549 return r
2550 }
2551 2552 // Retrieve The SoftLayer_Billing_Item tied to the order item.
2553 func (r Billing_Order_Item) GetBillingItem() (resp datatypes.Billing_Item, err error) {
2554 err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getBillingItem", nil, &r.Options, &resp)
2555 return
2556 }
2557 2558 // Retrieve The other items included with an ordered item.
2559 func (r Billing_Order_Item) GetBundledItems() (resp []datatypes.Billing_Order_Item, err error) {
2560 err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getBundledItems", nil, &r.Options, &resp)
2561 return
2562 }
2563 2564 // Retrieve The item category tied to an order item.
2565 func (r Billing_Order_Item) GetCategory() (resp datatypes.Product_Item_Category, err error) {
2566 err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getCategory", nil, &r.Options, &resp)
2567 return
2568 }
2569 2570 // Retrieve The child order items for an order item. All server order items should have children. These children are considered a part of the server.
2571 func (r Billing_Order_Item) GetChildren() (resp []datatypes.Billing_Order_Item, err error) {
2572 err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getChildren", nil, &r.Options, &resp)
2573 return
2574 }
2575 2576 // Retrieve A hardware's universally unique identifier.
2577 func (r Billing_Order_Item) GetGlobalIdentifier() (resp string, err error) {
2578 err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getGlobalIdentifier", nil, &r.Options, &resp)
2579 return
2580 }
2581 2582 // Retrieve The component type tied to an order item. All hardware-specific items should have a generic hardware component.
2583 func (r Billing_Order_Item) GetHardwareGenericComponent() (resp datatypes.Hardware_Component_Model_Generic, err error) {
2584 err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getHardwareGenericComponent", nil, &r.Options, &resp)
2585 return
2586 }
2587 2588 // Retrieve The SoftLayer_Product_Item tied to an order item. The item is the actual definition of the product being sold.
2589 func (r Billing_Order_Item) GetItem() (resp datatypes.Product_Item, err error) {
2590 err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getItem", nil, &r.Options, &resp)
2591 return
2592 }
2593 2594 // Retrieve This is an item's category answers.
2595 func (r Billing_Order_Item) GetItemCategoryAnswers() (resp []datatypes.Billing_Order_Item_Category_Answer, err error) {
2596 err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getItemCategoryAnswers", nil, &r.Options, &resp)
2597 return
2598 }
2599 2600 // Retrieve The SoftLayer_Product_Item_Price tied to an order item. The item price object describes the cost of an item.
2601 func (r Billing_Order_Item) GetItemPrice() (resp datatypes.Product_Item_Price, err error) {
2602 err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getItemPrice", nil, &r.Options, &resp)
2603 return
2604 }
2605 2606 // Retrieve The location of an ordered item. This is usually the same as the server it is being ordered with. Otherwise it describes the location of the additional service being ordered.
2607 func (r Billing_Order_Item) GetLocation() (resp datatypes.Location, err error) {
2608 err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getLocation", nil, &r.Options, &resp)
2609 return
2610 }
2611 2612 // Retrieve
2613 func (r Billing_Order_Item) GetNextOrderChildren() (resp []datatypes.Billing_Order_Item, err error) {
2614 err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getNextOrderChildren", nil, &r.Options, &resp)
2615 return
2616 }
2617 2618 // getObject retrieves the SoftLayer_Billing_Item object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Billing_Item service. You can only retrieve billing items tied to the account that your portal user is assigned to. Billing items are an account's items of billable items. There are "parent" billing items and "child" billing items. The server billing item is generally referred to as a parent billing item. The items tied to a server, such as ram, harddrives, and operating systems are considered "child" billing items.
2619 func (r Billing_Order_Item) GetObject() (resp datatypes.Billing_Order_Item, err error) {
2620 err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getObject", nil, &r.Options, &resp)
2621 return
2622 }
2623 2624 // Retrieve This is only populated when an upgrade order is placed. The old billing item represents what the billing was before the upgrade happened.
2625 func (r Billing_Order_Item) GetOldBillingItem() (resp datatypes.Billing_Item, err error) {
2626 err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getOldBillingItem", nil, &r.Options, &resp)
2627 return
2628 }
2629 2630 // Retrieve The order to which this item belongs. The order contains all the information related to the items included in an order
2631 func (r Billing_Order_Item) GetOrder() (resp datatypes.Billing_Order, err error) {
2632 err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getOrder", nil, &r.Options, &resp)
2633 return
2634 }
2635 2636 // Retrieve
2637 func (r Billing_Order_Item) GetOrderApprovalDate() (resp datatypes.Time, err error) {
2638 err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getOrderApprovalDate", nil, &r.Options, &resp)
2639 return
2640 }
2641 2642 // Retrieve The SoftLayer_Product_Package an order item is a part of.
2643 func (r Billing_Order_Item) GetPackage() (resp datatypes.Product_Package, err error) {
2644 err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getPackage", nil, &r.Options, &resp)
2645 return
2646 }
2647 2648 // Retrieve The parent order item ID for an item. Items that are associated with a server will have a parent. The parent will be the server item itself.
2649 func (r Billing_Order_Item) GetParent() (resp datatypes.Billing_Order_Item, err error) {
2650 err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getParent", nil, &r.Options, &resp)
2651 return
2652 }
2653 2654 // Retrieve The SoftLayer_Product_Package_Preset related to this order item.
2655 func (r Billing_Order_Item) GetPreset() (resp datatypes.Product_Package_Preset, err error) {
2656 err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getPreset", nil, &r.Options, &resp)
2657 return
2658 }
2659 2660 // Retrieve
2661 func (r Billing_Order_Item) GetPromoCode() (resp datatypes.Product_Promotion, err error) {
2662 err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getPromoCode", nil, &r.Options, &resp)
2663 return
2664 }
2665 2666 // Retrieve A count of power supplies contained within this SoftLayer_Billing_Order
2667 func (r Billing_Order_Item) GetRedundantPowerSupplyCount() (resp uint, err error) {
2668 err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getRedundantPowerSupplyCount", nil, &r.Options, &resp)
2669 return
2670 }
2671 2672 // Retrieve For ordered items that are software items, a full description of that software can be found with this property.
2673 func (r Billing_Order_Item) GetSoftwareDescription() (resp datatypes.Software_Description, err error) {
2674 err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getSoftwareDescription", nil, &r.Options, &resp)
2675 return
2676 }
2677 2678 // Retrieve The drive storage groups that are attached to this billing order item.
2679 func (r Billing_Order_Item) GetStorageGroups() (resp []datatypes.Configuration_Storage_Group_Order, err error) {
2680 err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getStorageGroups", nil, &r.Options, &resp)
2681 return
2682 }
2683 2684 // Retrieve The recurring fee of an ordered item. This amount represents the fees that will be charged on a recurring (usually monthly) basis.
2685 func (r Billing_Order_Item) GetTotalRecurringAmount() (resp datatypes.Float64, err error) {
2686 err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getTotalRecurringAmount", nil, &r.Options, &resp)
2687 return
2688 }
2689 2690 // Retrieve The next SoftLayer_Product_Item in the upgrade path for this order item.
2691 func (r Billing_Order_Item) GetUpgradeItem() (resp datatypes.Product_Item, err error) {
2692 err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getUpgradeItem", nil, &r.Options, &resp)
2693 return
2694 }
2695 2696 // The SoftLayer_Billing_Oder_Quote data type contains general information relating to an individual order applied to a SoftLayer customer account or to a new customer. Personal information in this type such as names, addresses, and phone numbers are taken from the account's contact information at the time the quote is generated for existing SoftLayer customer.
2697 type Billing_Order_Quote struct {
2698 Session session.SLSession
2699 Options sl.Options
2700 }
2701 2702 // GetBillingOrderQuoteService returns an instance of the Billing_Order_Quote SoftLayer service
2703 func GetBillingOrderQuoteService(sess session.SLSession) Billing_Order_Quote {
2704 return Billing_Order_Quote{Session: sess}
2705 }
2706 2707 func (r Billing_Order_Quote) Id(id int) Billing_Order_Quote {
2708 r.Options.Id = &id
2709 return r
2710 }
2711 2712 func (r Billing_Order_Quote) Mask(mask string) Billing_Order_Quote {
2713 if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
2714 mask = fmt.Sprintf("mask[%s]", mask)
2715 }
2716 2717 r.Options.Mask = mask
2718 return r
2719 }
2720 2721 func (r Billing_Order_Quote) Filter(filter string) Billing_Order_Quote {
2722 r.Options.Filter = filter
2723 return r
2724 }
2725 2726 func (r Billing_Order_Quote) Limit(limit int) Billing_Order_Quote {
2727 r.Options.Limit = &limit
2728 return r
2729 }
2730 2731 func (r Billing_Order_Quote) Offset(offset int) Billing_Order_Quote {
2732 r.Options.Offset = &offset
2733 return r
2734 }
2735 2736 // This method is used to transfer an anonymous quote to the active user and associated account. An anonymous quote is one that was created by a user without being authenticated. If a quote was created anonymously and then the customer attempts to access that anonymous quote via the API (which requires authentication), the customer will be unable to retrieve the quote due to the security restrictions in place. By providing the ability for a customer to claim a quote, s/he will be able to pull the anonymous quote onto his/her account and successfully view the quote.
2737 //
2738 // To claim a quote, both the quote id and the quote key (the 32-character random string) must be provided.
2739 func (r Billing_Order_Quote) Claim(quoteKey *string, quoteId *int) (resp datatypes.Billing_Order_Quote, err error) {
2740 params := []interface{}{
2741 quoteKey,
2742 quoteId,
2743 }
2744 err = r.Session.DoRequest("SoftLayer_Billing_Order_Quote", "claim", params, &r.Options, &resp)
2745 return
2746 }
2747 2748 // Account master users and sub-users in the SoftLayer customer portal can delete the quote of an order.
2749 func (r Billing_Order_Quote) DeleteQuote() (resp datatypes.Billing_Order_Quote, err error) {
2750 err = r.Session.DoRequest("SoftLayer_Billing_Order_Quote", "deleteQuote", nil, &r.Options, &resp)
2751 return
2752 }
2753 2754 // Retrieve A quote's corresponding account.
2755 func (r Billing_Order_Quote) GetAccount() (resp datatypes.Account, err error) {
2756 err = r.Session.DoRequest("SoftLayer_Billing_Order_Quote", "getAccount", nil, &r.Options, &resp)
2757 return
2758 }
2759 2760 // Retrieve Indicates whether the owner of the quote chosen to no longer be contacted.
2761 func (r Billing_Order_Quote) GetDoNotContactFlag() (resp bool, err error) {
2762 err = r.Session.DoRequest("SoftLayer_Billing_Order_Quote", "getDoNotContactFlag", nil, &r.Options, &resp)
2763 return
2764 }
2765 2766 // getObject retrieves the SoftLayer_Billing_Order_Quote object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Billing_Order_Quote service. You can only retrieve quotes that are assigned to your portal user's account.
2767 func (r Billing_Order_Quote) GetObject() (resp datatypes.Billing_Order_Quote, err error) {
2768 err = r.Session.DoRequest("SoftLayer_Billing_Order_Quote", "getObject", nil, &r.Options, &resp)
2769 return
2770 }
2771 2772 // Retrieve This order contains the records for which products were selected for this quote.
2773 func (r Billing_Order_Quote) GetOrder() (resp datatypes.Billing_Order, err error) {
2774 err = r.Session.DoRequest("SoftLayer_Billing_Order_Quote", "getOrder", nil, &r.Options, &resp)
2775 return
2776 }
2777 2778 // Retrieve These are all the orders that were created from this quote.
2779 func (r Billing_Order_Quote) GetOrdersFromQuote() (resp []datatypes.Billing_Order, err error) {
2780 err = r.Session.DoRequest("SoftLayer_Billing_Order_Quote", "getOrdersFromQuote", nil, &r.Options, &resp)
2781 return
2782 }
2783 2784 // Retrieve a PDF record of a SoftLayer quoted order. SoftLayer keeps PDF records of all quoted orders for customer retrieval from the portal and API. You must have a PDF reader installed in order to view these quoted order files.
2785 func (r Billing_Order_Quote) GetPdf() (resp []byte, err error) {
2786 err = r.Session.DoRequest("SoftLayer_Billing_Order_Quote", "getPdf", nil, &r.Options, &resp)
2787 return
2788 }
2789 2790 // This method will return a [[SoftLayer_Billing_Order_Quote]] that is identified by the quote key specified. If you do not have access to the quote or it does not exist, an exception will be thrown indicating so.
2791 func (r Billing_Order_Quote) GetQuoteByQuoteKey(quoteKey *string) (resp datatypes.Billing_Order_Quote, err error) {
2792 params := []interface{}{
2793 quoteKey,
2794 }
2795 err = r.Session.DoRequest("SoftLayer_Billing_Order_Quote", "getQuoteByQuoteKey", params, &r.Options, &resp)
2796 return
2797 }
2798 2799 // Generate an [[SoftLayer_Container_Product_Order|order container]] from the previously-created quote. This will take into account promotions, reseller status, estimated taxes and all other standard order verification processes.
2800 func (r Billing_Order_Quote) GetRecalculatedOrderContainer(userOrderData *datatypes.Container_Product_Order, orderBeingPlacedFlag *bool) (resp datatypes.Container_Product_Order, err error) {
2801 params := []interface{}{
2802 userOrderData,
2803 orderBeingPlacedFlag,
2804 }
2805 err = r.Session.DoRequest("SoftLayer_Billing_Order_Quote", "getRecalculatedOrderContainer", params, &r.Options, &resp)
2806 return
2807 }
2808 2809 // Use this method for placing server orders and additional services orders. The same applies for this as with verifyOrder. Send in the SoftLayer_Container_Product_Order_Hardware_Server for server orders. In addition to verifying the order, placeOrder() also makes an initial authorization on the SoftLayer_Account tied to this order, if a credit card is on file. If the account tied to this order is a paypal customer, an URL will also be returned to the customer. After placing the order, you must go to this URL to finish the authorization process. This tells paypal that you indeed want to place the order. After going to this URL, it will direct you back to a SoftLayer webpage that tells us you have finished the process. After this, it will go to sales for final approval.
2810 func (r Billing_Order_Quote) PlaceOrder(orderData interface{}) (resp datatypes.Container_Product_Order_Receipt, err error) {
2811 err = datatypes.SetComplexType(orderData)
2812 if err != nil {
2813 return
2814 }
2815 params := []interface{}{
2816 orderData,
2817 }
2818 err = r.Session.DoRequest("SoftLayer_Billing_Order_Quote", "placeOrder", params, &r.Options, &resp)
2819 return
2820 }
2821 2822 // Use this method for placing server quotes and additional services quotes. The same applies for this as with verifyOrder. Send in the SoftLayer_Container_Product_Order_Hardware_Server for server quotes. In addition to verifying the quote, placeQuote() also makes an initial authorization on the SoftLayer_Account tied to this order, if a credit card is on file. If the account tied to this order is a paypal customer, an URL will also be returned to the customer. After placing the order, you must go to this URL to finish the authorization process. This tells paypal that you indeed want to place the order. After going to this URL, it will direct you back to a SoftLayer webpage that tells us you have finished the process.
2823 func (r Billing_Order_Quote) PlaceQuote(orderData interface{}) (resp datatypes.Container_Product_Order, err error) {
2824 params := []interface{}{
2825 orderData,
2826 }
2827 err = r.Session.DoRequest("SoftLayer_Billing_Order_Quote", "placeQuote", params, &r.Options, &resp)
2828 return
2829 }
2830 2831 // Account master users and sub-users in the SoftLayer customer portal can save the quote of an order to avoid its deletion after 5 days or its expiration after 2 days.
2832 func (r Billing_Order_Quote) SaveQuote() (resp datatypes.Billing_Order_Quote, err error) {
2833 err = r.Session.DoRequest("SoftLayer_Billing_Order_Quote", "saveQuote", nil, &r.Options, &resp)
2834 return
2835 }
2836 2837 // Use this method for placing server orders and additional services orders. The same applies for this as with verifyOrder. Send in the SoftLayer_Container_Product_Order_Hardware_Server for server orders. In addition to verifying the order, placeOrder() also makes an initial authorization on the SoftLayer_Account tied to this order, if a credit card is on file. If the account tied to this order is a paypal customer, an URL will also be returned to the customer. After placing the order, you must go to this URL to finish the authorization process. This tells paypal that you indeed want to place the order. After going to this URL, it will direct you back to a SoftLayer webpage that tells us you have finished the process. After this, it will go to sales for final approval.
2838 func (r Billing_Order_Quote) VerifyOrder(orderData interface{}) (resp datatypes.Container_Product_Order, err error) {
2839 err = datatypes.SetComplexType(orderData)
2840 if err != nil {
2841 return
2842 }
2843 params := []interface{}{
2844 orderData,
2845 }
2846 err = r.Session.DoRequest("SoftLayer_Billing_Order_Quote", "verifyOrder", params, &r.Options, &resp)
2847 return
2848 }
2849 2850 // Withdraws the users acceptance of the GDPR terms.
2851 func (r Billing_Order_Quote) WithdrawGdprAcceptance() (err error) {
2852 var resp datatypes.Void
2853 err = r.Session.DoRequest("SoftLayer_Billing_Order_Quote", "withdrawGdprAcceptance", nil, &r.Options, &resp)
2854 return
2855 }
2856