Class: DocuSign_eSign::BillingPlan

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

Overview

Contains information about a billing plan.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ BillingPlan

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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

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?(:'appStoreProducts')
    if (value = attributes[:'appStoreProducts']).is_a?(Array)
      self.app_store_products = value
    end
  end

  if attributes.has_key?(:'currencyPlanPrices')
    if (value = attributes[:'currencyPlanPrices']).is_a?(Array)
      self.currency_plan_prices = value
    end
  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?(:'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?(:'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

#app_store_productsObject

Reserved: TBD



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

def app_store_products
  @app_store_products
end

#currency_plan_pricesObject

Contains the currencyCode and currencySymbol for the alternate currency values for envelopeFee, fixedFee, and seatFee that are configured for this plan feature set.



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

def currency_plan_prices
  @currency_plan_prices
end

#enable_supportObject

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



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

def enable_support
  @enable_support
end

#included_seatsObject

The number of seats (users) included.



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

def included_seats
  @included_seats
end

#other_discount_percentObject

Returns the value of attribute other_discount_percent.



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

def other_discount_percent
  @other_discount_percent
end

#payment_cycleObject

The payment cycle associated with the plan. The possible values are: Monthly or Annually.



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

def payment_cycle
  @payment_cycle
end

#payment_methodObject

Returns the value of attribute payment_method.



36
37
38
# File 'lib/docusign_esign/models/billing_plan.rb', line 36

def payment_method
  @payment_method
end

#per_seat_priceObject

The per seat price for the plan.



39
40
41
# File 'lib/docusign_esign/models/billing_plan.rb', line 39

def per_seat_price
  @per_seat_price
end

#plan_classificationObject

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



42
43
44
# File 'lib/docusign_esign/models/billing_plan.rb', line 42

def plan_classification
  @plan_classification
end

#plan_feature_setsObject

Returns the value of attribute plan_feature_sets.



45
46
47
# File 'lib/docusign_esign/models/billing_plan.rb', line 45

def plan_feature_sets
  @plan_feature_sets
end

#plan_idObject

Returns the value of attribute plan_id.



48
49
50
# File 'lib/docusign_esign/models/billing_plan.rb', line 48

def plan_id
  @plan_id
end

#plan_nameObject

The name of the Billing Plan.



51
52
53
# File 'lib/docusign_esign/models/billing_plan.rb', line 51

def plan_name
  @plan_name
end

#seat_discountsObject

Returns the value of attribute seat_discounts.



54
55
56
# File 'lib/docusign_esign/models/billing_plan.rb', line 54

def seat_discounts
  @seat_discounts
end

#support_incident_feeObject

The support incident fee charged for each support incident.



57
58
59
# File 'lib/docusign_esign/models/billing_plan.rb', line 57

def support_incident_fee
  @support_incident_fee
end

#support_plan_feeObject

The support plan fee charged for this plan.



60
61
62
# File 'lib/docusign_esign/models/billing_plan.rb', line 60

def support_plan_fee
  @support_plan_fee
end

Class Method Details

.attribute_mapObject

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



63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/docusign_esign/models/billing_plan.rb', line 63

def self.attribute_map
  {
    :'app_store_products' => :'appStoreProducts',
    :'currency_plan_prices' => :'currencyPlanPrices',
    :'enable_support' => :'enableSupport',
    :'included_seats' => :'includedSeats',
    :'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',
    :'seat_discounts' => :'seatDiscounts',
    :'support_incident_fee' => :'supportIncidentFee',
    :'support_plan_fee' => :'supportPlanFee'
  }
end

.swagger_typesObject

Attribute type mapping.



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

def self.swagger_types
  {
    :'app_store_products' => :'Array<AppStoreProduct>',
    :'currency_plan_prices' => :'Array<CurrencyPlanPrice>',
    :'enable_support' => :'String',
    :'included_seats' => :'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',
    :'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



196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
# File 'lib/docusign_esign/models/billing_plan.rb', line 196

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      app_store_products == o.app_store_products &&
      currency_plan_prices == o.currency_plan_prices &&
      enable_support == o.enable_support &&
      included_seats == o.included_seats &&
      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 &&
      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



252
253
254
255
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
# File 'lib/docusign_esign/models/billing_plan.rb', line 252

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



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

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



231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
# File 'lib/docusign_esign/models/billing_plan.rb', line 231

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


218
219
220
# File 'lib/docusign_esign/models/billing_plan.rb', line 218

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



224
225
226
# File 'lib/docusign_esign/models/billing_plan.rb', line 224

def hash
  [app_store_products, currency_plan_prices, enable_support, included_seats, other_discount_percent, payment_cycle, payment_method, per_seat_price, plan_classification, plan_feature_sets, plan_id, plan_name, 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



183
184
185
186
# File 'lib/docusign_esign/models/billing_plan.rb', line 183

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



298
299
300
# File 'lib/docusign_esign/models/billing_plan.rb', line 298

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



304
305
306
307
308
309
310
311
312
# File 'lib/docusign_esign/models/billing_plan.rb', line 304

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



292
293
294
# File 'lib/docusign_esign/models/billing_plan.rb', line 292

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



190
191
192
# File 'lib/docusign_esign/models/billing_plan.rb', line 190

def valid?
  true
end