flexiblecredit.go raw

   1  /**
   2   * Copyright 2016-2024 IBM Corp.
   3   *
   4   * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
   5   * the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
   6   *
   7   * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
   8   * on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   9   * See the License for the specific language governing permissions and limitations under the License.
  10   */
  11  
  12  // AUTOMATICALLY GENERATED CODE - DO NOT MODIFY
  13  
  14  package services
  15  
  16  import (
  17  	"fmt"
  18  	"strings"
  19  
  20  	"github.com/softlayer/softlayer-go/datatypes"
  21  	"github.com/softlayer/softlayer-go/session"
  22  	"github.com/softlayer/softlayer-go/sl"
  23  )
  24  
  25  // no documentation yet
  26  type FlexibleCredit_Program struct {
  27  	Session session.SLSession
  28  	Options sl.Options
  29  }
  30  
  31  // GetFlexibleCreditProgramService returns an instance of the FlexibleCredit_Program SoftLayer service
  32  func GetFlexibleCreditProgramService(sess session.SLSession) FlexibleCredit_Program {
  33  	return FlexibleCredit_Program{Session: sess}
  34  }
  35  
  36  func (r FlexibleCredit_Program) Id(id int) FlexibleCredit_Program {
  37  	r.Options.Id = &id
  38  	return r
  39  }
  40  
  41  func (r FlexibleCredit_Program) Mask(mask string) FlexibleCredit_Program {
  42  	if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
  43  		mask = fmt.Sprintf("mask[%s]", mask)
  44  	}
  45  
  46  	r.Options.Mask = mask
  47  	return r
  48  }
  49  
  50  func (r FlexibleCredit_Program) Filter(filter string) FlexibleCredit_Program {
  51  	r.Options.Filter = filter
  52  	return r
  53  }
  54  
  55  func (r FlexibleCredit_Program) Limit(limit int) FlexibleCredit_Program {
  56  	r.Options.Limit = &limit
  57  	return r
  58  }
  59  
  60  func (r FlexibleCredit_Program) Offset(offset int) FlexibleCredit_Program {
  61  	r.Options.Offset = &offset
  62  	return r
  63  }
  64  
  65  // no documentation yet
  66  func (r FlexibleCredit_Program) GetAffiliatesAvailableForSelfEnrollmentByVerificationType(verificationTypeKeyName *string) (resp []datatypes.FlexibleCredit_Affiliate, err error) {
  67  	params := []interface{}{
  68  		verificationTypeKeyName,
  69  	}
  70  	err = r.Session.DoRequest("SoftLayer_FlexibleCredit_Program", "getAffiliatesAvailableForSelfEnrollmentByVerificationType", params, &r.Options, &resp)
  71  	return
  72  }
  73  
  74  // no documentation yet
  75  func (r FlexibleCredit_Program) GetCompanyTypes() (resp []datatypes.FlexibleCredit_Company_Type, err error) {
  76  	err = r.Session.DoRequest("SoftLayer_FlexibleCredit_Program", "getCompanyTypes", nil, &r.Options, &resp)
  77  	return
  78  }
  79  
  80  // no documentation yet
  81  func (r FlexibleCredit_Program) GetObject() (resp datatypes.FlexibleCredit_Program, err error) {
  82  	err = r.Session.DoRequest("SoftLayer_FlexibleCredit_Program", "getObject", nil, &r.Options, &resp)
  83  	return
  84  }
  85  
  86  // no documentation yet
  87  func (r FlexibleCredit_Program) SelfEnrollNewAccount(accountTemplate *datatypes.Account) (resp datatypes.Account, err error) {
  88  	params := []interface{}{
  89  		accountTemplate,
  90  	}
  91  	err = r.Session.DoRequest("SoftLayer_FlexibleCredit_Program", "selfEnrollNewAccount", params, &r.Options, &resp)
  92  	return
  93  }
  94