Class: DocuSign_eSign::AccountBillingPlan

Inherits:
Object
  • Object
show all
Defined in:
lib/docusign_esign/models/account_billing_plan.rb

Overview

Contains information about an account billing plan.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ AccountBillingPlan

Initializes the object

Parameters:

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

    Model attributes in the form of hash



150
151
152
153
154
155
156
157
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
221
222
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
253
254
255
256
257
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 150

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  if attributes.has_key?(:'addOns')
    if (value = attributes[:'addOns']).is_a?(Array)
      self.add_ons = value
    end
  end

  if attributes.has_key?(:'appStoreReceiptExpirationDate')
    self.app_store_receipt_expiration_date = attributes[:'appStoreReceiptExpirationDate']
  end

  if attributes.has_key?(:'appStoreReceiptPurchaseDate')
    self.app_store_receipt_purchase_date = attributes[:'appStoreReceiptPurchaseDate']
  end

  if attributes.has_key?(:'canCancelRenewal')
    self.can_cancel_renewal = attributes[:'canCancelRenewal']
  end

  if attributes.has_key?(:'canUpgrade')
    self.can_upgrade = attributes[:'canUpgrade']
  end

  if attributes.has_key?(:'currencyCode')
    self.currency_code = attributes[:'currencyCode']
  end

  if attributes.has_key?(:'downgradePlanInformation')
    self.downgrade_plan_information = attributes[:'downgradePlanInformation']
  end

  if attributes.has_key?(:'enableSupport')
    self.enable_support = attributes[:'enableSupport']
  end

  if attributes.has_key?(:'includedSeats')
    self.included_seats = attributes[:'includedSeats']
  end

  if attributes.has_key?(:'incrementalSeats')
    self.incremental_seats = attributes[:'incrementalSeats']
  end

  if attributes.has_key?(:'isDowngrade')
    self.is_downgrade = attributes[:'isDowngrade']
  end

  if attributes.has_key?(:'notificationType')
    self.notification_type = attributes[:'notificationType']
  end

  if attributes.has_key?(:'otherDiscountPercent')
    self.other_discount_percent = attributes[:'otherDiscountPercent']
  end

  if attributes.has_key?(:'paymentCycle')
    self.payment_cycle = attributes[:'paymentCycle']
  end

  if attributes.has_key?(:'paymentMethod')
    self.payment_method = attributes[:'paymentMethod']
  end

  if attributes.has_key?(:'perSeatPrice')
    self.per_seat_price = attributes[:'perSeatPrice']
  end

  if attributes.has_key?(:'planClassification')
    self.plan_classification = attributes[:'planClassification']
  end

  if attributes.has_key?(:'planFeatureSets')
    if (value = attributes[:'planFeatureSets']).is_a?(Array)
      self.plan_feature_sets = value
    end
  end

  if attributes.has_key?(:'planId')
    self.plan_id = attributes[:'planId']
  end

  if attributes.has_key?(:'planName')
    self.plan_name = attributes[:'planName']
  end

  if attributes.has_key?(:'renewalStatus')
    self.renewal_status = attributes[:'renewalStatus']
  end

  if attributes.has_key?(:'seatDiscounts')
    if (value = attributes[:'seatDiscounts']).is_a?(Array)
      self.seat_discounts = value
    end
  end

  if attributes.has_key?(:'supportIncidentFee')
    self.support_incident_fee = attributes[:'supportIncidentFee']
  end

  if attributes.has_key?(:'supportPlanFee')
    self.support_plan_fee = attributes[:'supportPlanFee']
  end
end

Instance Attribute Details

#add_onsObject

Reserved:



18
19
20
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 18

def add_ons
  @add_ons
end

#app_store_receipt_expiration_dateObject

Returns the value of attribute app_store_receipt_expiration_date.



21
22
23
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 21

def app_store_receipt_expiration_date
  @app_store_receipt_expiration_date
end

#app_store_receipt_purchase_dateObject

Returns the value of attribute app_store_receipt_purchase_date.



24
25
26
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 24

def app_store_receipt_purchase_date
  @app_store_receipt_purchase_date
end

#can_cancel_renewalObject

Reserved: TBD



27
28
29
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 27

def can_cancel_renewal
  @can_cancel_renewal
end

#can_upgradeObject

When set to true, specifies that you can upgrade the account through the API.



30
31
32
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 30

def can_upgrade
  @can_upgrade
end

#currency_codeObject

Specifies the ISO currency code for the account.



33
34
35
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 33

def currency_code
  @currency_code
end

#downgrade_plan_informationObject

Returns the value of attribute downgrade_plan_information.



35
36
37
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 35

def downgrade_plan_information
  @downgrade_plan_information
end

#enable_supportObject

When set to true, then customer support is provided as part of the account plan.



38
39
40
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 38

def enable_support
  @enable_support
end

#included_seatsObject

The number of seats (users) included.



41
42
43
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 41

def included_seats
  @included_seats
end

#incremental_seatsObject

Reserved: TBD



44
45
46
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 44

def incremental_seats
  @incremental_seats
end

#is_downgradeObject

Returns the value of attribute is_downgrade.



47
48
49
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 47

def is_downgrade
  @is_downgrade
end

#notification_typeObject

Returns the value of attribute notification_type.



50
51
52
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 50

def notification_type
  @notification_type
end

#other_discount_percentObject

Any other percentage discount for the plan.



53
54
55
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 53

def other_discount_percent
  @other_discount_percent
end

#payment_cycleObject

Returns the value of attribute payment_cycle.



56
57
58
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 56

def payment_cycle
  @payment_cycle
end

#payment_methodObject

The payment method used with the plan. The possible values are: CreditCard, PurchaseOrder, Premium, or Freemium.



59
60
61
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 59

def payment_method
  @payment_method
end

#per_seat_priceObject

Returns the value of attribute per_seat_price.



62
63
64
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 62

def per_seat_price
  @per_seat_price
end

#plan_classificationObject

Identifies the type of plan. Examples include Business, Corporate, Enterprise, Free.



65
66
67
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 65

def plan_classification
  @plan_classification
end

#plan_feature_setsObject

A complex type that sets the feature sets for the account. It contains the following information (all string content): * currencyFeatureSetPrices - Contains the currencyCode and currencySymbol for the alternate currency values for envelopeFee, fixedFee, seatFee that are configured for this plan feature set. * envelopeFee - An incremental envelope cost for plans with envelope overages (when isEnabled=true). * featureSetId - A unique ID for the feature set. * fixedFee - A one-time fee associated with the plan (when isEnabled=true). * isActive - Specifies whether the feature set is actively set as part of the plan. * isEnabled - Specifies whether the feature set is actively enabled as part of the plan. * name - The name of the feature set. * seatFee - An incremental seat cost for seat-based plans (when isEnabled=true).



68
69
70
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 68

def plan_feature_sets
  @plan_feature_sets
end

#plan_idObject

Returns the value of attribute plan_id.



71
72
73
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 71

def plan_id
  @plan_id
end

#plan_nameObject

The name of the Billing Plan.



74
75
76
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 74

def plan_name
  @plan_name
end

#renewal_statusObject

The renewal status for the account. The acceptable values are: * auto: The account automatically renews. * queued_for_close: Account will be closed at the billingPeriodEndDate. * queued_for_downgrade: Account will be downgraded at the billingPeriodEndDate.



77
78
79
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 77

def renewal_status
  @renewal_status
end

#seat_discountsObject

A complex type that contains any seat discount information. Values are: BeginSeatCount, EndSeatCount, and SeatDiscountPercent.



80
81
82
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 80

def seat_discounts
  @seat_discounts
end

#support_incident_feeObject

The support incident fee charged for each support incident.



83
84
85
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 83

def support_incident_fee
  @support_incident_fee
end

#support_plan_feeObject

The support plan fee charged for this plan.



86
87
88
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 86

def support_plan_fee
  @support_plan_fee
end

Class Method Details

.attribute_mapObject

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



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
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 89

def self.attribute_map
  {
    :'add_ons' => :'addOns',
    :'app_store_receipt_expiration_date' => :'appStoreReceiptExpirationDate',
    :'app_store_receipt_purchase_date' => :'appStoreReceiptPurchaseDate',
    :'can_cancel_renewal' => :'canCancelRenewal',
    :'can_upgrade' => :'canUpgrade',
    :'currency_code' => :'currencyCode',
    :'downgrade_plan_information' => :'downgradePlanInformation',
    :'enable_support' => :'enableSupport',
    :'included_seats' => :'includedSeats',
    :'incremental_seats' => :'incrementalSeats',
    :'is_downgrade' => :'isDowngrade',
    :'notification_type' => :'notificationType',
    :'other_discount_percent' => :'otherDiscountPercent',
    :'payment_cycle' => :'paymentCycle',
    :'payment_method' => :'paymentMethod',
    :'per_seat_price' => :'perSeatPrice',
    :'plan_classification' => :'planClassification',
    :'plan_feature_sets' => :'planFeatureSets',
    :'plan_id' => :'planId',
    :'plan_name' => :'planName',
    :'renewal_status' => :'renewalStatus',
    :'seat_discounts' => :'seatDiscounts',
    :'support_incident_fee' => :'supportIncidentFee',
    :'support_plan_fee' => :'supportPlanFee'
  }
end

.swagger_typesObject

Attribute type mapping.



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
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 119

def self.swagger_types
  {
    :'add_ons' => :'Array<AddOn>',
    :'app_store_receipt_expiration_date' => :'String',
    :'app_store_receipt_purchase_date' => :'String',
    :'can_cancel_renewal' => :'String',
    :'can_upgrade' => :'String',
    :'currency_code' => :'String',
    :'downgrade_plan_information' => :'DowngradePlanUpdateResponse',
    :'enable_support' => :'String',
    :'included_seats' => :'String',
    :'incremental_seats' => :'String',
    :'is_downgrade' => :'String',
    :'notification_type' => :'String',
    :'other_discount_percent' => :'String',
    :'payment_cycle' => :'String',
    :'payment_method' => :'String',
    :'per_seat_price' => :'String',
    :'plan_classification' => :'String',
    :'plan_feature_sets' => :'Array<FeatureSet>',
    :'plan_id' => :'String',
    :'plan_name' => :'String',
    :'renewal_status' => :'String',
    :'seat_discounts' => :'Array<SeatDiscount>',
    :'support_incident_fee' => :'String',
    :'support_plan_fee' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 274

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      add_ons == o.add_ons &&
      app_store_receipt_expiration_date == o.app_store_receipt_expiration_date &&
      app_store_receipt_purchase_date == o.app_store_receipt_purchase_date &&
      can_cancel_renewal == o.can_cancel_renewal &&
      can_upgrade == o.can_upgrade &&
      currency_code == o.currency_code &&
      downgrade_plan_information == o.downgrade_plan_information &&
      enable_support == o.enable_support &&
      included_seats == o.included_seats &&
      incremental_seats == o.incremental_seats &&
      is_downgrade == o.is_downgrade &&
      notification_type == o.notification_type &&
      other_discount_percent == o.other_discount_percent &&
      payment_cycle == o.payment_cycle &&
      payment_method == o.payment_method &&
      per_seat_price == o.per_seat_price &&
      plan_classification == o.plan_classification &&
      plan_feature_sets == o.plan_feature_sets &&
      plan_id == o.plan_id &&
      plan_name == o.plan_name &&
      renewal_status == o.renewal_status &&
      seat_discounts == o.seat_discounts &&
      support_incident_fee == o.support_incident_fee &&
      support_plan_fee == o.support_plan_fee
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



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
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 339

def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.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
    temp_model = DocuSign_eSign.const_get(type).new
    temp_model.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



405
406
407
408
409
410
411
412
413
414
415
416
417
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 405

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



318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 318

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.swagger_types.each_pair do |key, type|
    if 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
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


305
306
307
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 305

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



311
312
313
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 311

def hash
  [add_ons, app_store_receipt_expiration_date, app_store_receipt_purchase_date, can_cancel_renewal, can_upgrade, currency_code, downgrade_plan_information, enable_support, included_seats, incremental_seats, is_downgrade, notification_type, other_discount_percent, payment_cycle, payment_method, per_seat_price, plan_classification, plan_feature_sets, plan_id, plan_name, renewal_status, seat_discounts, support_incident_fee, support_plan_fee].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



261
262
263
264
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 261

def list_invalid_properties
  invalid_properties = Array.new
  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



385
386
387
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 385

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



391
392
393
394
395
396
397
398
399
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 391

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    next if value.nil?
    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



379
380
381
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 379

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



268
269
270
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 268

def valid?
  true
end