Skip to content

Commit 3578dc5

Browse files
authored
Merge pull request #82 from AshishTI23/ashish/update-with-multiple-path-params
updating CustomFieldValue with nested path params added
2 parents 40467b0 + e656654 commit 3578dc5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+6834
-12500
lines changed

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
lockstep_rails (0.3.89)
4+
lockstep_rails (0.3.90)
55
rails
66

77
GEM

app/models/lockstep/custom_field_value.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,16 @@ class Lockstep::CustomFieldValue < Lockstep::ApiRecord
22
self.model_name_uri = 'v1/CustomFieldValues'
33
self.id_ref = 'custom_field_definition_id'
44
load_schema(Schema::CustomFieldValue)
5+
6+
def update(attributes = {})
7+
attributes = HashWithIndifferentAccess.new(attributes)
8+
9+
@unsaved_attributes.merge!(attributes)
10+
attrs = attributes_for_saving.transform_keys { |key| key.camelize(:lower) }
11+
12+
# Label with CustomerLocale to be updated from here
13+
resp = resource.patch("CustomerLocale/#{attributes[:record_key]}", body: attrs)
14+
post_result(resp)
15+
end
16+
517
end

app/platform_api/schema/api_key.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def self.id_ref
1010
# @format: uuid
1111
field :api_key_id
1212

13-
# The GroupKey uniquely identifies a single ADS Platform account. All records for this
13+
# The GroupKey uniquely identifies a single Accounting Data Service account. All records for this
1414
# account will share the same GroupKey value. GroupKey values cannot be changed once created.
1515
#
1616
# For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys).

app/platform_api/schema/app_enrollment.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def self.id_ref
66
end
77

88
# The unique ID of this record, automatically assigned by ADS when this record is
9-
# added to the ADS Platform.
9+
# added to the Accounting Data Service.
1010
# @type: string
1111
# @format: uuid
1212
field :app_enrollment_id
@@ -17,7 +17,7 @@ def self.id_ref
1717
# @format: uuid
1818
field :app_id
1919

20-
# The GroupKey uniquely identifies a single ADS Platform account. All records for this
20+
# The GroupKey uniquely identifies a single Accounting Data Service account. All records for this
2121
# account will share the same GroupKey value. GroupKey values cannot be changed once created.
2222
#
2323
# For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys).
@@ -58,7 +58,7 @@ def self.id_ref
5858
# @type: boolean
5959
field :sync_schedule_is_active
6060

61-
# Flag indicating if the App Enrollment is currently being deleted from the Platform.
61+
# Flag indicating if the App Enrollment is currently being deleted from the Network.
6262
# @type: boolean
6363
field :is_deleted
6464

app/platform_api/schema/app_enrollment_custom_field.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def self.id_ref
2323
# @type: string
2424
field :app_type
2525

26-
# The GroupKey uniquely identifies a single ADS Platform account. All records for this
26+
# The GroupKey uniquely identifies a single Accounting Data Service account. All records for this
2727
# account will share the same GroupKey value. GroupKey values cannot be changed once created.
2828
#
2929
# For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys).

app/platform_api/schema/app_enrollment_reconnect_info.rb

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ def self.id_ref
55
nil
66
end
77

8-
# The OAuth authentication code.
9-
# @type: string
10-
field :auth_code
11-
128
# The username for the web services account with access permissions.
139
# @type: string
1410
field :username
@@ -21,18 +17,6 @@ def self.id_ref
2117
# @type: string
2218
field :realm_id
2319

24-
# The access token id for the connector enrollment.
25-
# @type: string
26-
field :token_id
27-
28-
# The access token secret for the connector enrollment.
29-
# @type: string
30-
field :token_secret
31-
32-
# The OAuth redirect uri.
33-
# @type: string
34-
field :redirect_uri
35-
3620

3721

3822
end

app/platform_api/schema/application.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def self.id_ref
5959
# @type: boolean
6060
field :is_active
6161

62-
# The GroupKey uniquely identifies a single ADS Platform account. All records for this
62+
# The GroupKey uniquely identifies a single Accounting Data Service account. All records for this
6363
# account will share the same GroupKey value. GroupKey values cannot be changed once created.
6464
#
6565
# For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys).

app/platform_api/schema/attachment.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,48 +6,48 @@ def self.id_ref
66
end
77

88
# The unique ID of this record, automatically assigned by ADS when this record is
9-
# added to the ADS Platform.
9+
# added to the Accounting Data Service.
1010
# @type: string
1111
# @format: uuid
1212
field :attachment_id
1313

14-
# The GroupKey uniquely identifies a single ADS Platform account. All records for this
14+
# The GroupKey uniquely identifies a single Accounting Data Service account. All records for this
1515
# account will share the same GroupKey value. GroupKey values cannot be changed once created.
1616
#
1717
# For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys).
1818
# @type: string
1919
# @format: uuid
2020
field :group_key
2121

22-
# An Attachment is connected to an existing item within the ADS Platform by the fields `TableKey` and
22+
# An Attachment is connected to an existing item within the Accounting Data Service by the fields `TableKey` and
2323
# `ObjectKey`. For example, an Attachment connected to Invoice 12345 would have a `TableKey` value of
2424
# `Invoice` and an `ObjectKey` value of `12345`.
2525
#
26-
# The `TableKey` value contains the name of the table within the ADS Platform to which this Attachment
26+
# The `TableKey` value contains the name of the table within the Accounting Data Service to which this Attachment
2727
# is connected.
2828
#
2929
# For more information, see [linking metadata to an object](https://developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
3030
# @type: string
3131
field :table_key
3232

33-
# An Attachment is connected to an existing item within the ADS Platform by the fields `TableKey` and
33+
# An Attachment is connected to an existing item within the Accounting Data Service by the fields `TableKey` and
3434
# `ObjectKey`. For example, an Attachment connected to Invoice 12345 would have a `TableKey` value of
3535
# `Invoice` and an `ObjectKey` value of `12345`.
3636
#
37-
# The `ObjectKey` value contains the primary key of the record within the ADS Platform to which this
37+
# The `ObjectKey` value contains the primary key of the record within the Accounting Data Service to which this
3838
# Attachment is connected.
3939
#
4040
# For more information, see [linking metadata to an object](https://developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
4141
# @type: string
4242
# @format: uuid
4343
field :object_key
4444

45-
# An Attachment represents a file that was uploaded to the ADS Platform. This field contains the original
45+
# An Attachment represents a file that was uploaded to the Accounting Data Service. This field contains the original
4646
# name of the file on disk, without its extension.
4747
# @type: string
4848
field :file_name
4949

50-
# An Attachment represents a file that was uploaded to the ADS Platform. This field contains the original
50+
# An Attachment represents a file that was uploaded to the Accounting Data Service. This field contains the original
5151
# extension name of the file on disk.
5252
# @type: string
5353
field :file_ext

app/platform_api/schema/attachment_link.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ def self.id_ref
55
nil
66
end
77

8-
# The GroupKey uniquely identifies a single ADS Platform account. All records for this
8+
# The GroupKey uniquely identifies a single Accounting Data Service account. All records for this
99
# account will share the same GroupKey value. GroupKey values cannot be changed once created.
1010
#
1111
# For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys).
@@ -14,28 +14,28 @@ def self.id_ref
1414
field :group_key
1515

1616
# The unique ID of an attachment record, automatically assigned by ADS when this record is
17-
# added to the ADS Platform.
17+
# added to the Accounting Data Service.
1818
# @type: string
1919
# @format: uuid
2020
field :attachment_id
2121

22-
# An Attachment is connected to an existing item within the ADS Platform by the fields `TableKey` and
22+
# An Attachment is connected to an existing item within the Accounting Data Service by the fields `TableKey` and
2323
# `ObjectKey`. For example, an Attachment connected to Invoice 12345 would have a `TableKey` value of
2424
# `Invoice` and an `ObjectKey` value of `12345`.
2525
#
26-
# The `ObjectKey` value contains the primary key of the record within the ADS Platform to which this
26+
# The `ObjectKey` value contains the primary key of the record within the Accounting Data Service to which this
2727
# Attachment is connected.
2828
#
2929
# For more information, see [linking metadata to an object](https://developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).
3030
# @type: string
3131
# @format: uuid
3232
field :object_key
3333

34-
# An Attachment is connected to an existing item within the ADS Platform by the fields `TableKey` and
34+
# An Attachment is connected to an existing item within the Accounting Data Service by the fields `TableKey` and
3535
# `ObjectKey`. For example, an Attachment connected to Invoice 12345 would have a `TableKey` value of
3636
# `Invoice` and an `ObjectKey` value of `12345`.
3737
#
38-
# The `TableKey` value contains the name of the table within the ADS Platform to which this Attachment
38+
# The `TableKey` value contains the name of the table within the Accounting Data Service to which this Attachment
3939
# is connected.
4040
#
4141
# For more information, see [linking metadata to an object](https://developer.lockstep.io/docs/custom-fields#linking-metadata-to-an-object).

app/platform_api/schema/code_definition.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ def self.id_ref
66
end
77

88
# The unique ID of this record, automatically assigned by ADS when this record is
9-
# added to the ADS Platform.
9+
# added to the Accounting Data Service.
1010
# @type: string
1111
# @format: uuid
1212
field :code_definition_id
1313

14-
# The GroupKey uniquely identifies a single ADS Platform account. All records for this
14+
# The GroupKey uniquely identifies a single Accounting Data Service account. All records for this
1515
# account will share the same GroupKey value. GroupKey values cannot be changed once created.
1616
#
1717
# For more information, see [Accounts and GroupKeys](https://developer.lockstep.io/docs/accounts-and-groupkeys).

0 commit comments

Comments
 (0)