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



132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
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
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 132

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?(:'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?(:'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?(:'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:



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

def add_ons
  @add_ons
end

#can_cancel_renewalObject

Reserved: TBD



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

def can_cancel_renewal
  @can_cancel_renewal
end

#can_upgradeObject

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



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

def can_upgrade
  @can_upgrade
end

#currency_codeObject

Specifies the ISO currency code for the account.



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

def currency_code
  @currency_code
end

#enable_supportObject

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



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

def enable_support
  @enable_support
end

#included_seatsObject

The number of seats (users) included.



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

def included_seats
  @included_seats
end

#incremental_seatsObject

Reserved: TBD



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

def incremental_seats
  @incremental_seats
end

#is_downgradeObject

Returns the value of attribute is_downgrade.



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

def is_downgrade
  @is_downgrade
end

#other_discount_percentObject

Any other percentage discount for the plan.



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

def other_discount_percent
  @other_discount_percent
end

#payment_cycleObject

Returns the value of attribute payment_cycle.



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

def payment_cycle
  @payment_cycle
end

#payment_methodObject

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



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

def payment_method
  @payment_method
end

#per_seat_priceObject

Returns the value of attribute per_seat_price.



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

def per_seat_price
  @per_seat_price
end

#plan_classificationObject

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



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

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).



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

def plan_feature_sets
  @plan_feature_sets
end

#plan_idObject

Returns the value of attribute plan_id.



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

def plan_id
  @plan_id
end

#plan_nameObject

The name of the Billing Plan.



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

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.



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

def renewal_status
  @renewal_status
end

#seat_discountsObject

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



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

def seat_discounts
  @seat_discounts
end

#support_incident_feeObject

The support incident fee charged for each support incident.



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

def support_incident_fee
  @support_incident_fee
end

#support_plan_feeObject

The support plan fee charged for this plan.



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

def support_plan_fee
  @support_plan_fee
end

Class Method Details

.attribute_mapObject

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



79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 79

def self.attribute_map
  {
    :'add_ons' => :'addOns',
    :'can_cancel_renewal' => :'canCancelRenewal',
    :'can_upgrade' => :'canUpgrade',
    :'currency_code' => :'currencyCode',
    :'enable_support' => :'enableSupport',
    :'included_seats' => :'includedSeats',
    :'incremental_seats' => :'incrementalSeats',
    :'is_downgrade' => :'isDowngrade',
    :'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.



105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 105

def self.swagger_types
  {
    :'add_ons' => :'Array<AddOn>',
    :'can_cancel_renewal' => :'String',
    :'can_upgrade' => :'String',
    :'currency_code' => :'String',
    :'enable_support' => :'String',
    :'included_seats' => :'String',
    :'incremental_seats' => :'String',
    :'is_downgrade' => :'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



240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 240

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      add_ons == o.add_ons &&
      can_cancel_renewal == o.can_cancel_renewal &&
      can_upgrade == o.can_upgrade &&
      currency_code == o.currency_code &&
      enable_support == o.enable_support &&
      included_seats == o.included_seats &&
      incremental_seats == o.incremental_seats &&
      is_downgrade == o.is_downgrade &&
      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



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

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



367
368
369
370
371
372
373
374
375
376
377
378
379
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 367

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



280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 280

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


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

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



273
274
275
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 273

def hash
  [add_ons, can_cancel_renewal, can_upgrade, currency_code, enable_support, included_seats, incremental_seats, is_downgrade, 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



227
228
229
230
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 227

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



347
348
349
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 347

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



353
354
355
356
357
358
359
360
361
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 353

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



341
342
343
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 341

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



234
235
236
# File 'lib/docusign_esign/models/account_billing_plan.rb', line 234

def valid?
  true
end