Class: ConnectWise::BillingSetup

Inherits:
Object
  • Object
show all
Defined in:
lib/connect_wise/models/billing_setup.rb

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ BillingSetup

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Raises:

  • (ArgumentError)


256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
# File 'lib/connect_wise/models/billing_setup.rb', line 256

def initialize(attributes = {})
  raise ArgumentError, 'The input argument (attributes) must be a hash in `ConnectWise::BillingSetup` initialize method' unless attributes.is_a?(Hash)

  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) do |(k, v), h|
    raise ArgumentError, "`#{k}` is not a valid attribute in `ConnectWise::BillingSetup`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect unless self.class.attribute_map.key?(k.to_sym)

    h[k.to_sym] = v
  end

  self.remit_name = attributes[:remit_name] if attributes.key?(:remit_name)

  self.location = attributes[:location] if attributes.key?(:location)

  self.invoice_title = attributes[:invoice_title] if attributes.key?(:invoice_title)

  self.payable_name = attributes[:payable_name] if attributes.key?(:payable_name)

  self.email_template = attributes[:email_template] if attributes.key?(:email_template)

  self.id = attributes[:id] if attributes.key?(:id)

  self.address_one = attributes[:address_one] if attributes.key?(:address_one)

  self.address_two = attributes[:address_two] if attributes.key?(:address_two)

  self.city = attributes[:city] if attributes.key?(:city)

  self.state = attributes[:state] if attributes.key?(:state)

  self.zip = attributes[:zip] if attributes.key?(:zip)

  self.country = attributes[:country] if attributes.key?(:country)

  self.phone = attributes[:phone] if attributes.key?(:phone)

  self.topcomment = attributes[:topcomment] if attributes.key?(:topcomment)

  self.invoice_footer = attributes[:invoice_footer] if attributes.key?(:invoice_footer)

  self.quote_footer = attributes[:quote_footer] if attributes.key?(:quote_footer)

  self.overall_invoice_default = attributes[:overall_invoice_default] if attributes.key?(:overall_invoice_default)

  self.standard_invoice_actual = attributes[:standard_invoice_actual] if attributes.key?(:standard_invoice_actual)

  self.standard_invoice_fixed = attributes[:standard_invoice_fixed] if attributes.key?(:standard_invoice_fixed)

  self.progress_invoice = attributes[:progress_invoice] if attributes.key?(:progress_invoice)

  self.agreement_invoice = attributes[:agreement_invoice] if attributes.key?(:agreement_invoice)

  self.credit_memo_invoice = attributes[:credit_memo_invoice] if attributes.key?(:credit_memo_invoice)

  self.down_payment_invoice = attributes[:down_payment_invoice] if attributes.key?(:down_payment_invoice)

  self.misc_invoice = attributes[:misc_invoice] if attributes.key?(:misc_invoice)

  self.sales_order_invoice = attributes[:sales_order_invoice] if attributes.key?(:sales_order_invoice)

  self.exclude_do_not_bill_time_flag = attributes[:exclude_do_not_bill_time_flag] if attributes.key?(:exclude_do_not_bill_time_flag)

  self.exclude_do_not_bill_expense_flag = attributes[:exclude_do_not_bill_expense_flag] if attributes.key?(:exclude_do_not_bill_expense_flag)

  self.exclude_do_not_bill_product_flag = attributes[:exclude_do_not_bill_product_flag] if attributes.key?(:exclude_do_not_bill_product_flag)

  self.prefix_suffix_flag = attributes[:prefix_suffix_flag] if attributes.key?(:prefix_suffix_flag)

  self.prefix_suffix_text = attributes[:prefix_suffix_text] if attributes.key?(:prefix_suffix_text)

  self.charge_adj_to_firm_flag = attributes[:charge_adj_to_firm_flag] if attributes.key?(:charge_adj_to_firm_flag)

  self.no_watermark_flag = attributes[:no_watermark_flag] if attributes.key?(:no_watermark_flag)

  self.display_tax_flag = attributes[:display_tax_flag] if attributes.key?(:display_tax_flag)

  self.allow_restricted_dept_on_routing_flag = attributes[:allow_restricted_dept_on_routing_flag] if attributes.key?(:allow_restricted_dept_on_routing_flag)

  self.bill_ticket_separately_flag = attributes[:bill_ticket_separately_flag] if attributes.key?(:bill_ticket_separately_flag)

  self.bill_ticket_complete_flag = attributes[:bill_ticket_complete_flag] if attributes.key?(:bill_ticket_complete_flag)

  self.bill_ticket_unapproved_flag = attributes[:bill_ticket_unapproved_flag] if attributes.key?(:bill_ticket_unapproved_flag)

  self.bill_project_complete_flag = attributes[:bill_project_complete_flag] if attributes.key?(:bill_project_complete_flag)

  self.bill_project_unapproved_flag = attributes[:bill_project_unapproved_flag] if attributes.key?(:bill_project_unapproved_flag)

  self.progress_time_flag = attributes[:progress_time_flag] if attributes.key?(:progress_time_flag)

  self.restrict_project_downpayment_flag = attributes[:restrict_project_downpayment_flag] if attributes.key?(:restrict_project_downpayment_flag)

  self.bill_sales_order_complete_flag = attributes[:bill_sales_order_complete_flag] if attributes.key?(:bill_sales_order_complete_flag)

  self.bill_product_after_ship_flag = attributes[:bill_product_after_ship_flag] if attributes.key?(:bill_product_after_ship_flag)

  self.restrict_downpayment_flag = attributes[:restrict_downpayment_flag] if attributes.key?(:restrict_downpayment_flag)

  self.copy_non_service_products_flag = attributes[:copy_non_service_products_flag] if attributes.key?(:copy_non_service_products_flag)

  self.copy_service_products_flag = attributes[:copy_service_products_flag] if attributes.key?(:copy_service_products_flag)

  self.copy_agreement_products_flag = attributes[:copy_agreement_products_flag] if attributes.key?(:copy_agreement_products_flag)

  self.print_logo_flag = attributes[:print_logo_flag] if attributes.key?(:print_logo_flag)

  self.read_receipt_flag = attributes[:read_receipt_flag] if attributes.key?(:read_receipt_flag)

  self.delivery_receipt_flag = attributes[:delivery_receipt_flag] if attributes.key?(:delivery_receipt_flag)

  self.disable_routing_email_flag = attributes[:disable_routing_email_flag] if attributes.key?(:disable_routing_email_flag)

  self.localized_country = attributes[:localized_country] if attributes.key?(:localized_country)

  self.business_number = attributes[:business_number] if attributes.key?(:business_number)

  self.currency = attributes[:currency] if attributes.key?(:currency)

  self.custom_label = attributes[:custom_label] if attributes.key?(:custom_label)

  self.custom_text = attributes[:custom_text] if attributes.key?(:custom_text)

  self.company_code = attributes[:company_code] if attributes.key?(:company_code)

  self.exclude_avalara_flag = attributes[:exclude_avalara_flag] if attributes.key?(:exclude_avalara_flag)

  return unless attributes.key?(:_info)
  return unless (value = attributes[:_info]).is_a?(Hash)

  self._info = value
end

Instance Attribute Details

#_infoObject

Returns the value of attribute _info.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def _info
  @_info
end

#address_oneObject

Max length: 50;



28
29
30
# File 'lib/connect_wise/models/billing_setup.rb', line 28

def address_one
  @address_one
end

#address_twoObject

Max length: 50;



31
32
33
# File 'lib/connect_wise/models/billing_setup.rb', line 31

def address_two
  @address_two
end

#agreement_invoiceObject

Returns the value of attribute agreement_invoice.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def agreement_invoice
  @agreement_invoice
end

#allow_restricted_dept_on_routing_flagObject

Returns the value of attribute allow_restricted_dept_on_routing_flag.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def allow_restricted_dept_on_routing_flag
  @allow_restricted_dept_on_routing_flag
end

#bill_product_after_ship_flagObject

Returns the value of attribute bill_product_after_ship_flag.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def bill_product_after_ship_flag
  @bill_product_after_ship_flag
end

#bill_project_complete_flagObject

Returns the value of attribute bill_project_complete_flag.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def bill_project_complete_flag
  @bill_project_complete_flag
end

#bill_project_unapproved_flagObject

Returns the value of attribute bill_project_unapproved_flag.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def bill_project_unapproved_flag
  @bill_project_unapproved_flag
end

#bill_sales_order_complete_flagObject

Returns the value of attribute bill_sales_order_complete_flag.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def bill_sales_order_complete_flag
  @bill_sales_order_complete_flag
end

#bill_ticket_complete_flagObject

Returns the value of attribute bill_ticket_complete_flag.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def bill_ticket_complete_flag
  @bill_ticket_complete_flag
end

#bill_ticket_separately_flagObject

Returns the value of attribute bill_ticket_separately_flag.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def bill_ticket_separately_flag
  @bill_ticket_separately_flag
end

#bill_ticket_unapproved_flagObject

Returns the value of attribute bill_ticket_unapproved_flag.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def bill_ticket_unapproved_flag
  @bill_ticket_unapproved_flag
end

#business_numberObject

Max length: 50;



55
56
57
# File 'lib/connect_wise/models/billing_setup.rb', line 55

def business_number
  @business_number
end

#charge_adj_to_firm_flagObject

Returns the value of attribute charge_adj_to_firm_flag.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def charge_adj_to_firm_flag
  @charge_adj_to_firm_flag
end

#cityObject

Max length: 50;



34
35
36
# File 'lib/connect_wise/models/billing_setup.rb', line 34

def city
  @city
end

#company_codeObject

Max length: 250;



64
65
66
# File 'lib/connect_wise/models/billing_setup.rb', line 64

def company_code
  @company_code
end

#copy_agreement_products_flagObject

Returns the value of attribute copy_agreement_products_flag.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def copy_agreement_products_flag
  @copy_agreement_products_flag
end

#copy_non_service_products_flagObject

Returns the value of attribute copy_non_service_products_flag.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def copy_non_service_products_flag
  @copy_non_service_products_flag
end

#copy_service_products_flagObject

Returns the value of attribute copy_service_products_flag.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def copy_service_products_flag
  @copy_service_products_flag
end

#countryObject

Returns the value of attribute country.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def country
  @country
end

#credit_memo_invoiceObject

Returns the value of attribute credit_memo_invoice.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def credit_memo_invoice
  @credit_memo_invoice
end

#currencyObject

Returns the value of attribute currency.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def currency
  @currency
end

#custom_labelObject

Max length: 50;



58
59
60
# File 'lib/connect_wise/models/billing_setup.rb', line 58

def custom_label
  @custom_label
end

#custom_textObject

Max length: 500;



61
62
63
# File 'lib/connect_wise/models/billing_setup.rb', line 61

def custom_text
  @custom_text
end

#delivery_receipt_flagObject

Returns the value of attribute delivery_receipt_flag.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def delivery_receipt_flag
  @delivery_receipt_flag
end

#disable_routing_email_flagObject

Returns the value of attribute disable_routing_email_flag.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def disable_routing_email_flag
  @disable_routing_email_flag
end

#display_tax_flagObject

Returns the value of attribute display_tax_flag.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def display_tax_flag
  @display_tax_flag
end

#down_payment_invoiceObject

Returns the value of attribute down_payment_invoice.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def down_payment_invoice
  @down_payment_invoice
end

#email_templateObject

Returns the value of attribute email_template.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def email_template
  @email_template
end

#exclude_avalara_flagObject

Returns the value of attribute exclude_avalara_flag.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def exclude_avalara_flag
  @exclude_avalara_flag
end

#exclude_do_not_bill_expense_flagObject

Returns the value of attribute exclude_do_not_bill_expense_flag.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def exclude_do_not_bill_expense_flag
  @exclude_do_not_bill_expense_flag
end

#exclude_do_not_bill_product_flagObject

Returns the value of attribute exclude_do_not_bill_product_flag.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def exclude_do_not_bill_product_flag
  @exclude_do_not_bill_product_flag
end

#exclude_do_not_bill_time_flagObject

Returns the value of attribute exclude_do_not_bill_time_flag.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def exclude_do_not_bill_time_flag
  @exclude_do_not_bill_time_flag
end

#idObject

Returns the value of attribute id.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def id
  @id
end

Max length: 500;



46
47
48
# File 'lib/connect_wise/models/billing_setup.rb', line 46

def invoice_footer
  @invoice_footer
end

#invoice_titleObject

Max length: 50;



22
23
24
# File 'lib/connect_wise/models/billing_setup.rb', line 22

def invoice_title
  @invoice_title
end

#localized_countryObject

Returns the value of attribute localized_country.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def localized_country
  @localized_country
end

#locationObject

Returns the value of attribute location.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def location
  @location
end

#misc_invoiceObject

Returns the value of attribute misc_invoice.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def misc_invoice
  @misc_invoice
end

#no_watermark_flagObject

Returns the value of attribute no_watermark_flag.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def no_watermark_flag
  @no_watermark_flag
end

#overall_invoice_defaultObject

Returns the value of attribute overall_invoice_default.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def overall_invoice_default
  @overall_invoice_default
end

#payable_nameObject

Max length: 50;



25
26
27
# File 'lib/connect_wise/models/billing_setup.rb', line 25

def payable_name
  @payable_name
end

#phoneObject

Max length: 15;



40
41
42
# File 'lib/connect_wise/models/billing_setup.rb', line 40

def phone
  @phone
end

#prefix_suffix_flagObject

Returns the value of attribute prefix_suffix_flag.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def prefix_suffix_flag
  @prefix_suffix_flag
end

#prefix_suffix_textObject

Max length: 5;



52
53
54
# File 'lib/connect_wise/models/billing_setup.rb', line 52

def prefix_suffix_text
  @prefix_suffix_text
end

Returns the value of attribute print_logo_flag.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def print_logo_flag
  @print_logo_flag
end

#progress_invoiceObject

Returns the value of attribute progress_invoice.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def progress_invoice
  @progress_invoice
end

#progress_time_flagObject

Returns the value of attribute progress_time_flag.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def progress_time_flag
  @progress_time_flag
end

Max length: 1000;



49
50
51
# File 'lib/connect_wise/models/billing_setup.rb', line 49

def quote_footer
  @quote_footer
end

#read_receipt_flagObject

Returns the value of attribute read_receipt_flag.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def read_receipt_flag
  @read_receipt_flag
end

#remit_nameObject

Max length: 50;



17
18
19
# File 'lib/connect_wise/models/billing_setup.rb', line 17

def remit_name
  @remit_name
end

#restrict_downpayment_flagObject

Returns the value of attribute restrict_downpayment_flag.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def restrict_downpayment_flag
  @restrict_downpayment_flag
end

#restrict_project_downpayment_flagObject

Returns the value of attribute restrict_project_downpayment_flag.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def restrict_project_downpayment_flag
  @restrict_project_downpayment_flag
end

#sales_order_invoiceObject

Returns the value of attribute sales_order_invoice.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def sales_order_invoice
  @sales_order_invoice
end

#standard_invoice_actualObject

Returns the value of attribute standard_invoice_actual.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def standard_invoice_actual
  @standard_invoice_actual
end

#standard_invoice_fixedObject

Returns the value of attribute standard_invoice_fixed.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def standard_invoice_fixed
  @standard_invoice_fixed
end

#stateObject

Returns the value of attribute state.



19
20
21
# File 'lib/connect_wise/models/billing_setup.rb', line 19

def state
  @state
end

#topcommentObject

Max length: 4000;



43
44
45
# File 'lib/connect_wise/models/billing_setup.rb', line 43

def topcomment
  @topcomment
end

#zipObject

Max length: 12;



37
38
39
# File 'lib/connect_wise/models/billing_setup.rb', line 37

def zip
  @zip
end

Class Method Details

.acceptable_attributesObject

Returns all the JSON keys this model knows about



153
154
155
# File 'lib/connect_wise/models/billing_setup.rb', line 153

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# File 'lib/connect_wise/models/billing_setup.rb', line 88

def self.attribute_map
  {
    remit_name: :remitName,
    location: :location,
    invoice_title: :invoiceTitle,
    payable_name: :payableName,
    email_template: :emailTemplate,
    id: :id,
    address_one: :addressOne,
    address_two: :addressTwo,
    city: :city,
    state: :state,
    zip: :zip,
    country: :country,
    phone: :phone,
    topcomment: :topcomment,
    invoice_footer: :invoiceFooter,
    quote_footer: :quoteFooter,
    overall_invoice_default: :overallInvoiceDefault,
    standard_invoice_actual: :standardInvoiceActual,
    standard_invoice_fixed: :standardInvoiceFixed,
    progress_invoice: :progressInvoice,
    agreement_invoice: :agreementInvoice,
    credit_memo_invoice: :creditMemoInvoice,
    down_payment_invoice: :downPaymentInvoice,
    misc_invoice: :miscInvoice,
    sales_order_invoice: :salesOrderInvoice,
    exclude_do_not_bill_time_flag: :excludeDoNotBillTimeFlag,
    exclude_do_not_bill_expense_flag: :excludeDoNotBillExpenseFlag,
    exclude_do_not_bill_product_flag: :excludeDoNotBillProductFlag,
    prefix_suffix_flag: :prefixSuffixFlag,
    prefix_suffix_text: :prefixSuffixText,
    charge_adj_to_firm_flag: :chargeAdjToFirmFlag,
    no_watermark_flag: :noWatermarkFlag,
    display_tax_flag: :displayTaxFlag,
    allow_restricted_dept_on_routing_flag: :allowRestrictedDeptOnRoutingFlag,
    bill_ticket_separately_flag: :billTicketSeparatelyFlag,
    bill_ticket_complete_flag: :billTicketCompleteFlag,
    bill_ticket_unapproved_flag: :billTicketUnapprovedFlag,
    bill_project_complete_flag: :billProjectCompleteFlag,
    bill_project_unapproved_flag: :billProjectUnapprovedFlag,
    progress_time_flag: :progressTimeFlag,
    restrict_project_downpayment_flag: :restrictProjectDownpaymentFlag,
    bill_sales_order_complete_flag: :billSalesOrderCompleteFlag,
    bill_product_after_ship_flag: :billProductAfterShipFlag,
    restrict_downpayment_flag: :restrictDownpaymentFlag,
    copy_non_service_products_flag: :copyNonServiceProductsFlag,
    copy_service_products_flag: :copyServiceProductsFlag,
    copy_agreement_products_flag: :copyAgreementProductsFlag,
    print_logo_flag: :printLogoFlag,
    read_receipt_flag: :readReceiptFlag,
    delivery_receipt_flag: :deliveryReceiptFlag,
    disable_routing_email_flag: :disableRoutingEmailFlag,
    localized_country: :localizedCountry,
    business_number: :businessNumber,
    currency: :currency,
    custom_label: :customLabel,
    custom_text: :customText,
    company_code: :companyCode,
    exclude_avalara_flag: :excludeAvalaraFlag,
    _info: :_info
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



511
512
513
# File 'lib/connect_wise/models/billing_setup.rb', line 511

def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end

.openapi_nullableObject

List of attributes with nullable: true



223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
# File 'lib/connect_wise/models/billing_setup.rb', line 223

def self.openapi_nullable
  Set.new(i[
            exclude_do_not_bill_time_flag
            exclude_do_not_bill_expense_flag
            exclude_do_not_bill_product_flag
            prefix_suffix_flag
            charge_adj_to_firm_flag
            no_watermark_flag
            display_tax_flag
            allow_restricted_dept_on_routing_flag
            bill_ticket_separately_flag
            bill_ticket_complete_flag
            bill_ticket_unapproved_flag
            bill_project_complete_flag
            bill_project_unapproved_flag
            progress_time_flag
            restrict_project_downpayment_flag
            bill_sales_order_complete_flag
            bill_product_after_ship_flag
            restrict_downpayment_flag
            copy_non_service_products_flag
            copy_service_products_flag
            copy_agreement_products_flag
            print_logo_flag
            read_receipt_flag
            delivery_receipt_flag
            disable_routing_email_flag
            exclude_avalara_flag
          ])
end

.openapi_typesObject

Attribute type mapping.



158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
# File 'lib/connect_wise/models/billing_setup.rb', line 158

def self.openapi_types
  {
    remit_name: :String,
    location: :SystemLocationReference,
    invoice_title: :String,
    payable_name: :String,
    email_template: :EmailTemplateReference,
    id: :Integer,
    address_one: :String,
    address_two: :String,
    city: :String,
    state: :StateReference,
    zip: :String,
    country: :CountryReference,
    phone: :String,
    topcomment: :String,
    invoice_footer: :String,
    quote_footer: :String,
    overall_invoice_default: :InvoiceTemplateReference,
    standard_invoice_actual: :InvoiceTemplateReference,
    standard_invoice_fixed: :InvoiceTemplateReference,
    progress_invoice: :InvoiceTemplateReference,
    agreement_invoice: :InvoiceTemplateReference,
    credit_memo_invoice: :InvoiceTemplateReference,
    down_payment_invoice: :InvoiceTemplateReference,
    misc_invoice: :InvoiceTemplateReference,
    sales_order_invoice: :InvoiceTemplateReference,
    exclude_do_not_bill_time_flag: :Boolean,
    exclude_do_not_bill_expense_flag: :Boolean,
    exclude_do_not_bill_product_flag: :Boolean,
    prefix_suffix_flag: :String,
    prefix_suffix_text: :String,
    charge_adj_to_firm_flag: :Boolean,
    no_watermark_flag: :Boolean,
    display_tax_flag: :Boolean,
    allow_restricted_dept_on_routing_flag: :Boolean,
    bill_ticket_separately_flag: :Boolean,
    bill_ticket_complete_flag: :Boolean,
    bill_ticket_unapproved_flag: :Boolean,
    bill_project_complete_flag: :Boolean,
    bill_project_unapproved_flag: :Boolean,
    progress_time_flag: :Boolean,
    restrict_project_downpayment_flag: :Boolean,
    bill_sales_order_complete_flag: :Boolean,
    bill_product_after_ship_flag: :Boolean,
    restrict_downpayment_flag: :Boolean,
    copy_non_service_products_flag: :Boolean,
    copy_service_products_flag: :Boolean,
    copy_agreement_products_flag: :Boolean,
    print_logo_flag: :Boolean,
    read_receipt_flag: :Boolean,
    delivery_receipt_flag: :Boolean,
    disable_routing_email_flag: :Boolean,
    localized_country: :CountryReference,
    business_number: :String,
    currency: :CurrencyReference,
    custom_label: :String,
    custom_text: :String,
    company_code: :String,
    exclude_avalara_flag: :Boolean,
    _info: :'Hash<String, String>'
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
# File 'lib/connect_wise/models/billing_setup.rb', line 431

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    remit_name == other.remit_name &&
    location == other.location &&
    invoice_title == other.invoice_title &&
    payable_name == other.payable_name &&
    email_template == other.email_template &&
    id == other.id &&
    address_one == other.address_one &&
    address_two == other.address_two &&
    city == other.city &&
    state == other.state &&
    zip == other.zip &&
    country == other.country &&
    phone == other.phone &&
    topcomment == other.topcomment &&
    invoice_footer == other.invoice_footer &&
    quote_footer == other.quote_footer &&
    overall_invoice_default == other.overall_invoice_default &&
    standard_invoice_actual == other.standard_invoice_actual &&
    standard_invoice_fixed == other.standard_invoice_fixed &&
    progress_invoice == other.progress_invoice &&
    agreement_invoice == other.agreement_invoice &&
    credit_memo_invoice == other.credit_memo_invoice &&
    down_payment_invoice == other.down_payment_invoice &&
    misc_invoice == other.misc_invoice &&
    sales_order_invoice == other.sales_order_invoice &&
    exclude_do_not_bill_time_flag == other.exclude_do_not_bill_time_flag &&
    exclude_do_not_bill_expense_flag == other.exclude_do_not_bill_expense_flag &&
    exclude_do_not_bill_product_flag == other.exclude_do_not_bill_product_flag &&
    prefix_suffix_flag == other.prefix_suffix_flag &&
    prefix_suffix_text == other.prefix_suffix_text &&
    charge_adj_to_firm_flag == other.charge_adj_to_firm_flag &&
    no_watermark_flag == other.no_watermark_flag &&
    display_tax_flag == other.display_tax_flag &&
    allow_restricted_dept_on_routing_flag == other.allow_restricted_dept_on_routing_flag &&
    bill_ticket_separately_flag == other.bill_ticket_separately_flag &&
    bill_ticket_complete_flag == other.bill_ticket_complete_flag &&
    bill_ticket_unapproved_flag == other.bill_ticket_unapproved_flag &&
    bill_project_complete_flag == other.bill_project_complete_flag &&
    bill_project_unapproved_flag == other.bill_project_unapproved_flag &&
    progress_time_flag == other.progress_time_flag &&
    restrict_project_downpayment_flag == other.restrict_project_downpayment_flag &&
    bill_sales_order_complete_flag == other.bill_sales_order_complete_flag &&
    bill_product_after_ship_flag == other.bill_product_after_ship_flag &&
    restrict_downpayment_flag == other.restrict_downpayment_flag &&
    copy_non_service_products_flag == other.copy_non_service_products_flag &&
    copy_service_products_flag == other.copy_service_products_flag &&
    copy_agreement_products_flag == other.copy_agreement_products_flag &&
    print_logo_flag == other.print_logo_flag &&
    read_receipt_flag == other.read_receipt_flag &&
    delivery_receipt_flag == other.delivery_receipt_flag &&
    disable_routing_email_flag == other.disable_routing_email_flag &&
    localized_country == other.localized_country &&
    business_number == other.business_number &&
    currency == other.currency &&
    custom_label == other.custom_label &&
    custom_text == other.custom_text &&
    company_code == other.company_code &&
    exclude_avalara_flag == other.exclude_avalara_flag &&
    _info == other._info
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
# File 'lib/connect_wise/models/billing_setup.rb', line 541

def _deserialize(type, value)
  case type.to_sym
  when :Time
    Time.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :Boolean
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    # models (e.g. Pet) or oneOf
    klass = ConnectWise.const_get(type)
    klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



612
613
614
615
616
617
618
619
620
621
622
623
624
# File 'lib/connect_wise/models/billing_setup.rb', line 612

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
# File 'lib/connect_wise/models/billing_setup.rb', line 518

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)

  attributes = attributes.transform_keys(&:to_sym)
  self.class.openapi_types.each_pair do |key, type|
    if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
      send("#{key}=", nil)
    elsif type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize(::Regexp.last_match(1), v) }) if attributes[self.class.attribute_map[key]].is_a?(Array)
    elsif !attributes[self.class.attribute_map[key]].nil?
      send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end
  end

  self
end

#eql?(other) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


498
499
500
# File 'lib/connect_wise/models/billing_setup.rb', line 498

def eql?(other)
  self == other
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



504
505
506
# File 'lib/connect_wise/models/billing_setup.rb', line 504

def hash
  [remit_name, location, invoice_title, payable_name, email_template, id, address_one, address_two, city, state, zip, country, phone, topcomment, invoice_footer, quote_footer, overall_invoice_default, standard_invoice_actual, standard_invoice_fixed, progress_invoice, agreement_invoice, credit_memo_invoice, down_payment_invoice, misc_invoice, sales_order_invoice, exclude_do_not_bill_time_flag, exclude_do_not_bill_expense_flag, exclude_do_not_bill_product_flag, prefix_suffix_flag, prefix_suffix_text, charge_adj_to_firm_flag, no_watermark_flag, display_tax_flag, allow_restricted_dept_on_routing_flag, bill_ticket_separately_flag, bill_ticket_complete_flag, bill_ticket_unapproved_flag, bill_project_complete_flag, bill_project_unapproved_flag, progress_time_flag, restrict_project_downpayment_flag, bill_sales_order_complete_flag, bill_product_after_ship_flag, restrict_downpayment_flag, copy_non_service_products_flag, copy_service_products_flag, copy_agreement_products_flag, print_logo_flag, read_receipt_flag, delivery_receipt_flag, disable_routing_email_flag, localized_country, business_number, currency, custom_label, custom_text, company_code, exclude_avalara_flag, _info].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



390
391
392
393
394
395
396
397
398
399
400
401
402
403
# File 'lib/connect_wise/models/billing_setup.rb', line 390

def list_invalid_properties
  invalid_properties = []
  invalid_properties.push('invalid value for "remit_name", remit_name cannot be nil.') if @remit_name.nil?

  invalid_properties.push('invalid value for "location", location cannot be nil.') if @location.nil?

  invalid_properties.push('invalid value for "invoice_title", invoice_title cannot be nil.') if @invoice_title.nil?

  invalid_properties.push('invalid value for "payable_name", payable_name cannot be nil.') if @payable_name.nil?

  invalid_properties.push('invalid value for "email_template", email_template cannot be nil.') if @email_template.nil?

  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



588
589
590
# File 'lib/connect_wise/models/billing_setup.rb', line 588

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



594
595
596
597
598
599
600
601
602
603
604
605
606
# File 'lib/connect_wise/models/billing_setup.rb', line 594

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = send(attr)
    if value.nil?
      is_nullable = self.class.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



582
583
584
# File 'lib/connect_wise/models/billing_setup.rb', line 582

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



407
408
409
410
411
412
413
414
415
416
417
418
# File 'lib/connect_wise/models/billing_setup.rb', line 407

def valid?
  return false if @remit_name.nil?
  return false if @location.nil?
  return false if @invoice_title.nil?
  return false if @payable_name.nil?
  return false if @email_template.nil?

  prefix_suffix_flag_validator = EnumAttributeValidator.new('String', %w[Prefix Suffix])
  return false unless prefix_suffix_flag_validator.valid?(@prefix_suffix_flag)

  true
end