ZCRMSDK 2.0.0 → 3.0.0.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. checksums.yaml +4 -4
  2. data/src/ZCRMSDK.rb +84 -1
  3. data/src/com/zoho/api/authenticator/oauth_token.rb +87 -31
  4. data/src/com/zoho/api/authenticator/store/db_store.rb +48 -28
  5. data/src/com/zoho/api/authenticator/store/file_store.rb +69 -21
  6. data/src/com/zoho/api/authenticator/store/token_store.rb +7 -0
  7. data/src/com/zoho/api/logger/sdk_logger.rb +18 -9
  8. data/src/com/zoho/crm/api/assignment_rules/api_exception.rb +121 -0
  9. data/src/com/zoho/crm/api/assignment_rules/assignment_rule.rb +215 -0
  10. data/src/com/zoho/crm/api/assignment_rules/assignment_rules_operations.rb +61 -0
  11. data/src/com/zoho/crm/api/assignment_rules/default_user.rb +80 -0
  12. data/src/com/zoho/crm/api/assignment_rules/response_handler.rb +10 -0
  13. data/src/com/zoho/crm/api/assignment_rules/response_wrapper.rb +63 -0
  14. data/src/com/zoho/crm/api/attachments/attachment.rb +4 -4
  15. data/src/com/zoho/crm/api/attachments/attachments_operations.rb +6 -6
  16. data/src/com/zoho/crm/api/blue_print/blue_print_operations.rb +2 -2
  17. data/src/com/zoho/crm/api/blue_print/escalation.rb +80 -0
  18. data/src/com/zoho/crm/api/blue_print/field.rb +1107 -0
  19. data/src/com/zoho/crm/api/blue_print/next_transition.rb +38 -0
  20. data/src/com/zoho/crm/api/blue_print/process_info.rb +4 -4
  21. data/src/com/zoho/crm/api/blue_print/transition.rb +19 -1
  22. data/src/com/zoho/crm/api/blue_print/validation_error.rb +57 -0
  23. data/src/com/zoho/crm/api/bulk_read/bulk_read_operations.rb +3 -3
  24. data/src/com/zoho/crm/api/bulk_read/criteria.rb +20 -0
  25. data/src/com/zoho/crm/api/bulk_read/query.rb +5 -4
  26. data/src/com/zoho/crm/api/bulk_write/bulk_write_operations.rb +3 -3
  27. data/src/com/zoho/crm/api/bulk_write/resource.rb +24 -4
  28. data/src/com/zoho/crm/api/contact_roles/contact_roles_operations.rb +7 -7
  29. data/src/com/zoho/crm/api/currencies/currencies_operations.rb +7 -7
  30. data/src/com/zoho/crm/api/custom_views/criteria.rb +5 -4
  31. data/src/com/zoho/crm/api/custom_views/custom_view.rb +100 -41
  32. data/src/com/zoho/crm/api/custom_views/custom_views_operations.rb +2 -2
  33. data/src/com/zoho/crm/api/custom_views/{shared_details.rb → shared_to.rb} +2 -2
  34. data/src/com/zoho/crm/api/dc/au_datacenter.rb +3 -3
  35. data/src/com/zoho/crm/api/dc/cn_datacenter.rb +3 -3
  36. data/src/com/zoho/crm/api/dc/datacenter.rb +3 -2
  37. data/src/com/zoho/crm/api/dc/eu_datacenter.rb +3 -3
  38. data/src/com/zoho/crm/api/dc/in_datacenter.rb +3 -3
  39. data/src/com/zoho/crm/api/dc/us_datacenter.rb +3 -3
  40. data/src/com/zoho/crm/api/email_templates/api_exception.rb +121 -0
  41. data/src/com/zoho/crm/api/email_templates/attachment.rb +118 -0
  42. data/src/com/zoho/crm/api/email_templates/email_template.rb +390 -0
  43. data/src/com/zoho/crm/api/email_templates/email_templates_operations.rb +61 -0
  44. data/src/com/zoho/crm/api/email_templates/response_handler.rb +10 -0
  45. data/src/com/zoho/crm/api/email_templates/response_wrapper.rb +83 -0
  46. data/src/com/zoho/crm/api/field_attachments/api_exception.rb +121 -0
  47. data/src/com/zoho/crm/api/field_attachments/body_wrapper.rb +62 -0
  48. data/src/com/zoho/crm/api/field_attachments/field_attachments_operations.rb +52 -0
  49. data/src/com/zoho/crm/api/field_attachments/file_body_wrapper.rb +64 -0
  50. data/src/com/zoho/crm/api/field_attachments/response_handler.rb +10 -0
  51. data/src/com/zoho/crm/api/fields/external.rb +99 -0
  52. data/src/com/zoho/crm/api/fields/field.rb +192 -38
  53. data/src/com/zoho/crm/api/fields/fields_operations.rb +2 -2
  54. data/src/com/zoho/crm/api/fields/history_tracking.rb +80 -0
  55. data/src/com/zoho/crm/api/fields/maps.rb +80 -0
  56. data/src/com/zoho/crm/api/fields/multi_select_lookup.rb +19 -0
  57. data/src/com/zoho/crm/api/fields/multi_user_lookup.rb +175 -0
  58. data/src/com/zoho/crm/api/fields/pick_list_value.rb +19 -0
  59. data/src/com/zoho/crm/api/fields/related_details.rb +19 -0
  60. data/src/com/zoho/crm/api/files/file_operations.rb +2 -2
  61. data/src/com/zoho/crm/api/initializer.rb +41 -16
  62. data/src/com/zoho/crm/api/inventory_templates/api_exception.rb +121 -0
  63. data/src/com/zoho/crm/api/inventory_templates/inventory_template.rb +352 -0
  64. data/src/com/zoho/crm/api/inventory_templates/inventory_templates_operations.rb +82 -0
  65. data/src/com/zoho/crm/api/inventory_templates/response_handler.rb +10 -0
  66. data/src/com/zoho/crm/api/inventory_templates/response_wrapper.rb +83 -0
  67. data/src/com/zoho/crm/api/layouts/layout.rb +38 -0
  68. data/src/com/zoho/crm/api/layouts/layouts_operations.rb +2 -2
  69. data/src/com/zoho/crm/api/layouts/section.rb +19 -0
  70. data/src/com/zoho/crm/api/modules/module.rb +57 -0
  71. data/src/com/zoho/crm/api/modules/modules_operations.rb +4 -4
  72. data/src/com/zoho/crm/api/notes/notes_operations.rb +7 -7
  73. data/src/com/zoho/crm/api/notification/notification_operations.rb +6 -6
  74. data/src/com/zoho/crm/api/org/org_operations.rb +2 -2
  75. data/src/com/zoho/crm/api/pipeline/action_handler.rb +10 -0
  76. data/src/com/zoho/crm/api/pipeline/action_response.rb +10 -0
  77. data/src/com/zoho/crm/api/pipeline/action_wrapper.rb +63 -0
  78. data/src/com/zoho/crm/api/pipeline/api_exception.rb +129 -0
  79. data/src/com/zoho/crm/api/pipeline/body_wrapper.rb +61 -0
  80. data/src/com/zoho/crm/api/pipeline/forecast_category.rb +80 -0
  81. data/src/com/zoho/crm/api/pipeline/pick_list_value.rb +175 -0
  82. data/src/com/zoho/crm/api/pipeline/pipeline.rb +213 -0
  83. data/src/com/zoho/crm/api/pipeline/pipeline_operations.rb +165 -0
  84. data/src/com/zoho/crm/api/pipeline/response_handler.rb +10 -0
  85. data/src/com/zoho/crm/api/pipeline/response_wrapper.rb +63 -0
  86. data/src/com/zoho/crm/api/pipeline/stage.rb +80 -0
  87. data/src/com/zoho/crm/api/pipeline/success_response.rb +123 -0
  88. data/src/com/zoho/crm/api/pipeline/transfer_action_handler.rb +10 -0
  89. data/src/com/zoho/crm/api/pipeline/transfer_action_response.rb +10 -0
  90. data/src/com/zoho/crm/api/pipeline/transfer_action_wrapper.rb +63 -0
  91. data/src/com/zoho/crm/api/pipeline/transfer_and_delete_wrapper.rb +61 -0
  92. data/src/com/zoho/crm/api/pipeline/transfer_pipe_line.rb +80 -0
  93. data/src/com/zoho/crm/api/profiles/default_view.rb +99 -0
  94. data/src/com/zoho/crm/api/profiles/profile.rb +57 -0
  95. data/src/com/zoho/crm/api/profiles/profiles_operations.rb +2 -2
  96. data/src/com/zoho/crm/api/query/query_operations.rb +1 -1
  97. data/src/com/zoho/crm/api/record/api_exception.rb +2 -0
  98. data/src/com/zoho/crm/api/record/body_wrapper.rb +0 -19
  99. data/src/com/zoho/crm/api/record/count_handler.rb +10 -0
  100. data/src/com/zoho/crm/api/record/count_wrapper.rb +63 -0
  101. data/src/com/zoho/crm/api/record/field.rb +1 -0
  102. data/src/com/zoho/crm/api/record/image_upload.rb +213 -0
  103. data/src/com/zoho/crm/api/record/inventory_line_items.rb +56 -39
  104. data/src/com/zoho/crm/api/record/mass_update_body_wrapper.rb +4 -4
  105. data/src/com/zoho/crm/api/record/mass_update_territory.rb +80 -0
  106. data/src/com/zoho/crm/api/record/multi_select_lookup.rb +99 -0
  107. data/src/com/zoho/crm/api/record/multi_select_picklist.rb +80 -0
  108. data/src/com/zoho/crm/api/record/price_book.rb +31 -0
  109. data/src/com/zoho/crm/api/record/record_operations.rb +196 -26
  110. data/src/com/zoho/crm/api/record/tax.rb +80 -0
  111. data/src/com/zoho/crm/api/record/territory.rb +70 -12
  112. data/src/com/zoho/crm/api/record/widget.rb +80 -0
  113. data/src/com/zoho/crm/api/record/wizard.rb +80 -0
  114. data/src/com/zoho/crm/api/related_lists/related_lists_operations.rb +2 -2
  115. data/src/com/zoho/crm/api/related_records/related_records_operations.rb +6 -6
  116. data/src/com/zoho/crm/api/request_proxy.rb +3 -4
  117. data/src/com/zoho/crm/api/roles/roles_operations.rb +2 -2
  118. data/src/com/zoho/crm/api/sdk_config.rb +2 -68
  119. data/src/com/zoho/crm/api/send_mail/action_handler.rb +10 -0
  120. data/src/com/zoho/crm/api/send_mail/action_response.rb +10 -0
  121. data/src/com/zoho/crm/api/send_mail/action_wrapper.rb +63 -0
  122. data/src/com/zoho/crm/api/send_mail/api_exception.rb +125 -0
  123. data/src/com/zoho/crm/api/send_mail/body_wrapper.rb +61 -0
  124. data/src/com/zoho/crm/api/send_mail/data_subject_request.rb +80 -0
  125. data/src/com/zoho/crm/api/send_mail/inventory_details.rb +100 -0
  126. data/src/com/zoho/crm/api/send_mail/mail.rb +423 -0
  127. data/src/com/zoho/crm/api/send_mail/response_handler.rb +10 -0
  128. data/src/com/zoho/crm/api/send_mail/response_wrapper.rb +63 -0
  129. data/src/com/zoho/crm/api/send_mail/send_mail_operations.rb +61 -0
  130. data/src/com/zoho/crm/api/send_mail/success_response.rb +121 -0
  131. data/src/com/zoho/crm/api/send_mail/template.rb +10 -0
  132. data/src/com/zoho/crm/api/send_mail/user_address.rb +137 -0
  133. data/src/com/zoho/crm/api/share_records/share_records_operations.rb +4 -4
  134. data/src/com/zoho/crm/api/tags/tag.rb +19 -0
  135. data/src/com/zoho/crm/api/tags/tags_operations.rb +11 -11
  136. data/src/com/zoho/crm/api/taxes/taxes_operations.rb +6 -6
  137. data/src/com/zoho/crm/api/territories/response_wrapper.rb +20 -0
  138. data/src/com/zoho/crm/api/territories/territories_operations.rb +2 -2
  139. data/src/com/zoho/crm/api/territories/territory.rb +61 -23
  140. data/src/com/zoho/crm/api/users/users_operations.rb +6 -6
  141. data/src/com/zoho/crm/api/util/api_http_connector.rb +5 -4
  142. data/src/com/zoho/crm/api/util/constants.rb +140 -13
  143. data/src/com/zoho/crm/api/util/converter.rb +21 -4
  144. data/src/com/zoho/crm/api/util/form_data_converter.rb +3 -14
  145. data/src/com/zoho/crm/api/util/utility.rb +226 -70
  146. data/src/com/zoho/crm/api/variable_groups/variable_groups_operations.rb +3 -3
  147. data/src/com/zoho/crm/api/variables/variables_operations.rb +9 -9
  148. data/src/com/zoho/crm/api/wizards/api_exception.rb +121 -0
  149. data/src/com/zoho/crm/api/wizards/button.rb +214 -0
  150. data/src/com/zoho/crm/api/wizards/chart_data.rb +118 -0
  151. data/src/com/zoho/crm/api/wizards/connection.rb +80 -0
  152. data/src/com/zoho/crm/api/wizards/container.rb +119 -0
  153. data/src/com/zoho/crm/api/wizards/node.rb +118 -0
  154. data/src/com/zoho/crm/api/wizards/response_handler.rb +10 -0
  155. data/src/com/zoho/crm/api/wizards/response_wrapper.rb +63 -0
  156. data/src/com/zoho/crm/api/wizards/screen.rb +99 -0
  157. data/src/com/zoho/crm/api/wizards/segment.rb +176 -0
  158. data/src/com/zoho/crm/api/wizards/wizard.rb +273 -0
  159. data/src/com/zoho/crm/api/wizards/wizards_operations.rb +61 -0
  160. data/src/resources/JSONDetails.json +1 -1
  161. data/src/version.rb +1 -1
  162. metadata +88 -5
@@ -10,28 +10,45 @@ module Record
10
10
  super
11
11
  end
12
12
 
13
- # The method to get the product
13
+ # The method to get the product_name
14
14
  # @return An instance of LineItemProduct
15
15
 
16
- def product
17
- get_key_value('product')
16
+ def product_name
17
+ get_key_value('Product_Name')
18
18
  end
19
19
 
20
- # The method to set the value to product
21
- # @param product [LineItemProduct] An instance of LineItemProduct
20
+ # The method to set the value to product_name
21
+ # @param product_name [LineItemProduct] An instance of LineItemProduct
22
22
 
23
- def product=(product)
24
- if product!=nil and !product.is_a? LineItemProduct
25
- raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: product EXPECTED TYPE: LineItemProduct', nil, nil)
23
+ def product_name=(product_name)
24
+ if product_name!=nil and !product_name.is_a? LineItemProduct
25
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: product_name EXPECTED TYPE: LineItemProduct', nil, nil)
26
26
  end
27
- add_key_value('product', product)
27
+ add_key_value('Product_Name', product_name)
28
+ end
29
+
30
+ # The method to get the parent_id
31
+ # @return An instance of Record
32
+
33
+ def parent_id
34
+ get_key_value('parent_id')
35
+ end
36
+
37
+ # The method to set the value to parent_id
38
+ # @param parent_id [Record] An instance of Record
39
+
40
+ def parent_id=(parent_id)
41
+ if parent_id!=nil and !parent_id.is_a? Record
42
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: parent_id EXPECTED TYPE: Record', nil, nil)
43
+ end
44
+ add_key_value('parent_id', parent_id)
28
45
  end
29
46
 
30
47
  # The method to get the quantity
31
48
  # @return An instance of Float
32
49
 
33
50
  def quantity
34
- get_key_value('quantity')
51
+ get_key_value('Quantity')
35
52
  end
36
53
 
37
54
  # The method to set the value to quantity
@@ -41,7 +58,7 @@ module Record
41
58
  if quantity!=nil and !quantity.is_a? Float
42
59
  raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: quantity EXPECTED TYPE: Float', nil, nil)
43
60
  end
44
- add_key_value('quantity', quantity)
61
+ add_key_value('Quantity', quantity)
45
62
  end
46
63
 
47
64
  # The method to get the discount
@@ -65,7 +82,7 @@ module Record
65
82
  # @return An instance of Float
66
83
 
67
84
  def total_after_discount
68
- get_key_value('total_after_discount')
85
+ get_key_value('Total_After_Discount')
69
86
  end
70
87
 
71
88
  # The method to set the value to total_after_discount
@@ -75,14 +92,14 @@ module Record
75
92
  if total_after_discount!=nil and !total_after_discount.is_a? Float
76
93
  raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: total_after_discount EXPECTED TYPE: Float', nil, nil)
77
94
  end
78
- add_key_value('total_after_discount', total_after_discount)
95
+ add_key_value('Total_After_Discount', total_after_discount)
79
96
  end
80
97
 
81
98
  # The method to get the net_total
82
99
  # @return An instance of Float
83
100
 
84
101
  def net_total
85
- get_key_value('net_total')
102
+ get_key_value('Net_Total')
86
103
  end
87
104
 
88
105
  # The method to set the value to net_total
@@ -92,24 +109,24 @@ module Record
92
109
  if net_total!=nil and !net_total.is_a? Float
93
110
  raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: net_total EXPECTED TYPE: Float', nil, nil)
94
111
  end
95
- add_key_value('net_total', net_total)
112
+ add_key_value('Net_Total', net_total)
96
113
  end
97
114
 
98
- # The method to get the book
115
+ # The method to get the price_book_name
99
116
  # @return An instance of Float
100
117
 
101
- def book
102
- get_key_value('book')
118
+ def price_book_name
119
+ get_key_value('Price_Book_Name')
103
120
  end
104
121
 
105
- # The method to set the value to book
106
- # @param book [Float] An instance of Float
122
+ # The method to set the value to price_book_name
123
+ # @param price_book_name [Float] An instance of Float
107
124
 
108
- def book=(book)
109
- if book!=nil and !book.is_a? Float
110
- raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: book EXPECTED TYPE: Float', nil, nil)
125
+ def price_book_name=(price_book_name)
126
+ if price_book_name!=nil and !price_book_name.is_a? Float
127
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: price_book_name EXPECTED TYPE: Float', nil, nil)
111
128
  end
112
- add_key_value('book', book)
129
+ add_key_value('Price_Book_Name', price_book_name)
113
130
  end
114
131
 
115
132
  # The method to get the tax
@@ -133,7 +150,7 @@ module Record
133
150
  # @return An instance of Float
134
151
 
135
152
  def list_price
136
- get_key_value('list_price')
153
+ get_key_value('List_Price')
137
154
  end
138
155
 
139
156
  # The method to set the value to list_price
@@ -143,7 +160,7 @@ module Record
143
160
  if list_price!=nil and !list_price.is_a? Float
144
161
  raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: list_price EXPECTED TYPE: Float', nil, nil)
145
162
  end
146
- add_key_value('list_price', list_price)
163
+ add_key_value('List_Price', list_price)
147
164
  end
148
165
 
149
166
  # The method to get the unit_price
@@ -184,7 +201,7 @@ module Record
184
201
  # @return An instance of Float
185
202
 
186
203
  def total
187
- get_key_value('total')
204
+ get_key_value('Total')
188
205
  end
189
206
 
190
207
  # The method to set the value to total
@@ -194,31 +211,31 @@ module Record
194
211
  if total!=nil and !total.is_a? Float
195
212
  raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: total EXPECTED TYPE: Float', nil, nil)
196
213
  end
197
- add_key_value('total', total)
214
+ add_key_value('Total', total)
198
215
  end
199
216
 
200
- # The method to get the product_description
217
+ # The method to get the description
201
218
  # @return A String value
202
219
 
203
- def product_description
204
- get_key_value('product_description')
220
+ def description
221
+ get_key_value('Description')
205
222
  end
206
223
 
207
- # The method to set the value to product_description
208
- # @param product_description [String] A String
224
+ # The method to set the value to description
225
+ # @param description [String] A String
209
226
 
210
- def product_description=(product_description)
211
- if product_description!=nil and !product_description.is_a? String
212
- raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: product_description EXPECTED TYPE: String', nil, nil)
227
+ def description=(description)
228
+ if description!=nil and !description.is_a? String
229
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: description EXPECTED TYPE: String', nil, nil)
213
230
  end
214
- add_key_value('product_description', product_description)
231
+ add_key_value('Description', description)
215
232
  end
216
233
 
217
234
  # The method to get the line_tax
218
235
  # @return An instance of Array
219
236
 
220
237
  def line_tax
221
- get_key_value('line_tax')
238
+ get_key_value('Line_Tax')
222
239
  end
223
240
 
224
241
  # The method to set the value to line_tax
@@ -228,7 +245,7 @@ module Record
228
245
  if line_tax!=nil and !line_tax.is_a? Array
229
246
  raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: line_tax EXPECTED TYPE: Array', nil, nil)
230
247
  end
231
- add_key_value('line_tax', line_tax)
248
+ add_key_value('Line_Tax', line_tax)
232
249
  end
233
250
 
234
251
  end
@@ -70,18 +70,18 @@ module Record
70
70
  end
71
71
 
72
72
  # The method to get the territory
73
- # @return An instance of Territory
73
+ # @return An instance of MassUpdateTerritory
74
74
 
75
75
  def territory
76
76
  @territory
77
77
  end
78
78
 
79
79
  # The method to set the value to territory
80
- # @param territory [Territory] An instance of Territory
80
+ # @param territory [MassUpdateTerritory] An instance of MassUpdateTerritory
81
81
 
82
82
  def territory=(territory)
83
- if territory!=nil and !territory.is_a? Territory
84
- raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: territory EXPECTED TYPE: Territory', nil, nil)
83
+ if territory!=nil and !territory.is_a? MassUpdateTerritory
84
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: territory EXPECTED TYPE: MassUpdateTerritory', nil, nil)
85
85
  end
86
86
  @territory = territory
87
87
  @key_modified['territory'] = 1
@@ -0,0 +1,80 @@
1
+ require_relative '../util/model'
2
+
3
+ module Record
4
+ class MassUpdateTerritory
5
+ include Util::Model
6
+
7
+ # Creates an instance of MassUpdateTerritory
8
+ def initialize
9
+ @id = nil
10
+ @include_child = nil
11
+ @key_modified = Hash.new
12
+ end
13
+
14
+ # The method to get the id
15
+ # @return A Integer value
16
+
17
+ def id
18
+ @id
19
+ end
20
+
21
+ # The method to set the value to id
22
+ # @param id [Integer] A Integer
23
+
24
+ def id=(id)
25
+ if id!=nil and !id.is_a? Integer
26
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: Integer', nil, nil)
27
+ end
28
+ @id = id
29
+ @key_modified['id'] = 1
30
+ end
31
+
32
+ # The method to get the include_child
33
+ # @return A Boolean value
34
+
35
+ def include_child
36
+ @include_child
37
+ end
38
+
39
+ # The method to set the value to include_child
40
+ # @param include_child [Boolean] A Boolean
41
+
42
+ def include_child=(include_child)
43
+ if include_child!=nil and ! [true, false].include?include_child
44
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: include_child EXPECTED TYPE: Boolean', nil, nil)
45
+ end
46
+ @include_child = include_child
47
+ @key_modified['include_child'] = 1
48
+ end
49
+
50
+ # The method to check if the user has modified the given key
51
+ # @param key [String] A String
52
+ # @return A Integer value
53
+
54
+ def is_key_modified(key)
55
+ if key!=nil and !key.is_a? String
56
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: String', nil, nil)
57
+ end
58
+ if @key_modified.key?(key)
59
+ return @key_modified[key]
60
+ end
61
+
62
+ nil
63
+ end
64
+
65
+ # The method to mark the given key as modified
66
+ # @param key [String] A String
67
+ # @param modification [Integer] A Integer
68
+
69
+ def set_key_modified(key, modification)
70
+ if key!=nil and !key.is_a? String
71
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: String', nil, nil)
72
+ end
73
+ if modification!=nil and !modification.is_a? Integer
74
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: Integer', nil, nil)
75
+ end
76
+ @key_modified[key] = modification
77
+ end
78
+
79
+ end
80
+ end
@@ -0,0 +1,99 @@
1
+ require_relative '../util/model'
2
+
3
+ module Record
4
+ class MultiSelectLookup
5
+ include Util::Model
6
+
7
+ # Creates an instance of MultiSelectLookup
8
+ def initialize
9
+ @id = nil
10
+ @fieldname = nil
11
+ @has_more = nil
12
+ @key_modified = Hash.new
13
+ end
14
+
15
+ # The method to get the id
16
+ # @return A Integer value
17
+
18
+ def id
19
+ @id
20
+ end
21
+
22
+ # The method to set the value to id
23
+ # @param id [Integer] A Integer
24
+
25
+ def id=(id)
26
+ if id!=nil and !id.is_a? Integer
27
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: Integer', nil, nil)
28
+ end
29
+ @id = id
30
+ @key_modified['id'] = 1
31
+ end
32
+
33
+ # The method to get the fieldname
34
+ # @return An instance of Hash
35
+
36
+ def fieldname
37
+ @fieldname
38
+ end
39
+
40
+ # The method to set the value to fieldname
41
+ # @param fieldname [Hash] An instance of Hash
42
+
43
+ def fieldname=(fieldname)
44
+ if fieldname!=nil and !fieldname.is_a? Hash
45
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: fieldname EXPECTED TYPE: Hash', nil, nil)
46
+ end
47
+ @fieldname = fieldname
48
+ @key_modified['fieldName'] = 1
49
+ end
50
+
51
+ # The method to get the has_more
52
+ # @return An instance of Hash
53
+
54
+ def has_more
55
+ @has_more
56
+ end
57
+
58
+ # The method to set the value to has_more
59
+ # @param has_more [Hash] An instance of Hash
60
+
61
+ def has_more=(has_more)
62
+ if has_more!=nil and !has_more.is_a? Hash
63
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: has_more EXPECTED TYPE: Hash', nil, nil)
64
+ end
65
+ @has_more = has_more
66
+ @key_modified['$has_more'] = 1
67
+ end
68
+
69
+ # The method to check if the user has modified the given key
70
+ # @param key [String] A String
71
+ # @return A Integer value
72
+
73
+ def is_key_modified(key)
74
+ if key!=nil and !key.is_a? String
75
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: String', nil, nil)
76
+ end
77
+ if @key_modified.key?(key)
78
+ return @key_modified[key]
79
+ end
80
+
81
+ nil
82
+ end
83
+
84
+ # The method to mark the given key as modified
85
+ # @param key [String] A String
86
+ # @param modification [Integer] A Integer
87
+
88
+ def set_key_modified(key, modification)
89
+ if key!=nil and !key.is_a? String
90
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: String', nil, nil)
91
+ end
92
+ if modification!=nil and !modification.is_a? Integer
93
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: Integer', nil, nil)
94
+ end
95
+ @key_modified[key] = modification
96
+ end
97
+
98
+ end
99
+ end
@@ -0,0 +1,80 @@
1
+ require_relative '../util/model'
2
+
3
+ module Record
4
+ class MultiSelectPicklist
5
+ include Util::Model
6
+
7
+ # Creates an instance of MultiSelectPicklist
8
+ def initialize
9
+ @id = nil
10
+ @fieldname = nil
11
+ @key_modified = Hash.new
12
+ end
13
+
14
+ # The method to get the id
15
+ # @return A Integer value
16
+
17
+ def id
18
+ @id
19
+ end
20
+
21
+ # The method to set the value to id
22
+ # @param id [Integer] A Integer
23
+
24
+ def id=(id)
25
+ if id!=nil and !id.is_a? Integer
26
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: Integer', nil, nil)
27
+ end
28
+ @id = id
29
+ @key_modified['id'] = 1
30
+ end
31
+
32
+ # The method to get the fieldname
33
+ # @return An instance of Hash
34
+
35
+ def fieldname
36
+ @fieldname
37
+ end
38
+
39
+ # The method to set the value to fieldname
40
+ # @param fieldname [Hash] An instance of Hash
41
+
42
+ def fieldname=(fieldname)
43
+ if fieldname!=nil and !fieldname.is_a? Hash
44
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: fieldname EXPECTED TYPE: Hash', nil, nil)
45
+ end
46
+ @fieldname = fieldname
47
+ @key_modified['fieldName'] = 1
48
+ end
49
+
50
+ # The method to check if the user has modified the given key
51
+ # @param key [String] A String
52
+ # @return A Integer value
53
+
54
+ def is_key_modified(key)
55
+ if key!=nil and !key.is_a? String
56
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: String', nil, nil)
57
+ end
58
+ if @key_modified.key?(key)
59
+ return @key_modified[key]
60
+ end
61
+
62
+ nil
63
+ end
64
+
65
+ # The method to mark the given key as modified
66
+ # @param key [String] A String
67
+ # @param modification [Integer] A Integer
68
+
69
+ def set_key_modified(key, modification)
70
+ if key!=nil and !key.is_a? String
71
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: String', nil, nil)
72
+ end
73
+ if modification!=nil and !modification.is_a? Integer
74
+ raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: Integer', nil, nil)
75
+ end
76
+ @key_modified[key] = modification
77
+ end
78
+
79
+ end
80
+ end