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