Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing sObject Collection api #786

Open
dscataglini opened this issue Jan 24, 2023 · 0 comments
Open

Implementing sObject Collection api #786

dscataglini opened this issue Jan 24, 2023 · 0 comments

Comments

@dscataglini
Copy link

dscataglini commented Jan 24, 2023

I'd like to implement the following api
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_composite_sobjects_collections.htm

How do we feel about the following interface

client.collection.get('sObject', id: [1,2,3], fields: %w[firstName, LastName])

client.collection_create(all_or_none = true) do |record|
    record.add("{sObjectType}", {attr: value})
  …
end

client.collection_update(all_or_none = true) do |record|
    record.add("{sObjectType}", "{Id}", {attr: value})
  …
end

client.collection_upsert("{sObjectType}", external_id, all_or_none = true) do |record|
  record.add("{external_id}", {attr: value})
  …
end

client.collection.delete(ids = [], all_or_none = true)
dscataglini added a commit to dscataglini/restforce that referenced this issue Jan 26, 2023
dscataglini added a commit to dscataglini/restforce that referenced this issue Feb 6, 2023
dscataglini added a commit to dscataglini/restforce that referenced this issue Feb 6, 2023
dscataglini added a commit to dscataglini/restforce that referenced this issue Feb 6, 2023
dscataglini added a commit to dscataglini/restforce that referenced this issue Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant