https://developer.zendesk.com/rest_api/docs/core/organizations#create-or-update-organization
772623
def organizations_create_or_update(self, data, **kwargs):
        ""
        api_path = "/api/v2/organizations/create_or_update.json"
        return self.call(api_path, method="POST", data=data, **kwargs)
464951
def update_team(self, slug):
        
        if self._org:
            if not self._org.has_team(slug):
                return self._org.update()
            return self._org.update_team(slug)
        # self._org is created during Trac startup, so there should never
        # be a case where we try to update an org before it's created; this
        # is a sanity check only.
        return False
1114459
def add_or_update(self, app_id):
        '''
        
        '''
        logger.info('Collect info: user-{0}, uid-{1}'.format(self.userinfo.uid, app_id))
        MCollect.add_or_update(self.userinfo.uid, app_id)
        out_dic = {'success': True}
        return json.dump(out_dic, self)
372145
public boolean createOrUpdateData(String indexName, String type, String id, Object obj) {
        IndexResponse response = getClient().prepareIndex(indexName, type).setId(id).setSource(Lang.obj2map(obj)).execute().actionGet();
        return response.getResult() == DocWriteResponse.Result.CREATED || response.getResult() == DocWriteResponse.Result.UPDATED;
    }
802867
def organization_membership_create(self, data, **kwargs):
        ""
        api_path = "/api/v2/organization_memberships.json"
        return self.call(api_path, method="POST", data=data, **kwargs)
810067
@POST
    @Path("{group}/{id}")
    @Consumes("application/x.json-create-role")
    public Response createRoleFromUpdateRequest(@PathParam("group") String group, @PathParam("id") String id,
                                                CreateEmoRoleRequest request,
                                                @Authenticated Subject subject) {
        _uac.createRole(subject, request.setRoleKey(new EmoRoleKey(group, id)));
        return Response.created(URI.create(""))
                .entity(SuccessResponse.instance())
                .build();
    }
1112101
def organization_subscription_create(self, data, **kwargs):
        ""
        api_path = "/api/v2/organization_subscriptions.json"
        return self.call(api_path, method="POST", data=data, **kwargs)
1033520
def _create_org(self, orch_id, name, desc):
        
        url = self._org_url
        payload = {
            "organizationName": name,
            "description": name if len(desc) == 0 else desc,
            "orchestrationSource": orch_id}

        return self._send_request('POST', url, payload, 'organization')
280612
static OrganizationSettings updateOrganizationSettings(OrganizationName organizationName) {
    try (SecurityCenterClient client = SecurityCenterClient.create()) {
      // Start setting up a request to update OrganizationSettings for.
      // OrganizationName organizationName = OrganizationName.of(/*organizationId=*/"123234324");
      OrganizationSettings organizationSettings =
          OrganizationSettings.newBuilder()
              .setName(organizationName.toString() + "/organizationSettings")
              .setEnableAssetDiscovery(true)
              .build();
      FieldMask updateMask = FieldMask.newBuilder().addPaths("enable_asset_discovery").build();

      UpdateOrganizationSettingsRequest.Builder request =
          UpdateOrganizationSettingsRequest.newBuilder()
              .setOrganizationSettings(organizationSettings)
              .setUpdateMask(updateMask);

      // Call the API.
      OrganizationSettings response = client.updateOrganizationSettings(request.build());

      System.out.println("Organization Settings have been updated:");
      System.out.println(response);
      return response;
    } catch (IOException e) {
      throw new RuntimeException("Couldn't create client.", e);
    }
  }
183977
def update_payload(self, fields=None):
        """"""
        org_payload = super(Organization, self).update_payload(fields)
        payload = {u'organization': org_payload}
        if 'redhat_repository_url' in org_payload:
            rh_repo_url = org_payload.pop('redhat_repository_url')
            payload['redhat_repository_url'] = rh_repo_url
        return payload
517066
def update(self, request, pk=None, parent_lookup_organization=None):
        ''''''
        user = get_object_or_404(User, pk=pk)
        org = get_object_or_404(
            SeedOrganization, pk=parent_lookup_organization)
        self.check_object_permissions(request, org)
        org.users.add(user)
        return Response(status=status.HTTP_204_NO_CONTENT)
385899
def create_new_organization(options = {})
      organization = Shelly::Organization.new
      organization.name = ask_for_organization_name
      organization.redeem_code = options["redeem-code"]
      organization.referral_code = options["referral-code"]
      organization.create
      say "Organization '#{organization.name}' created", :green
      organization.name
    end
452110
public CreateResponse create(CreateRequest request) {
    return call(
      new PostRequest(path("create"))
        .setParam("name", request.getName())
        .setParam("organization", request.getOrganization()),
      CreateResponse.parser());
  }
1248715
def create_or_update(cls, bucket, key, value):
        """"""
        obj = cls.get(bucket, key)
        if obj:
            obj.value = value
            db.session.merge(obj)
        else:
            obj = cls.create(bucket, key, value)
        return obj
1023652
def user_organization_membership_create(self, user_id, data, **kwargs):
        ""
        api_path = "/api/v2/users/{user_id}/organization_memberships.json"
        api_path = api_path.format(user_id=user_id)
        return self.call(api_path, method="POST", data=data, **kwargs)
1335715
def organization_users(self, id, permission_set=None, role=None, **kwargs):
        ""
        api_path = "/api/v2/organizations/{id}/users.json"
        api_path = api_path.format(id=id)
        api_query = {}
        if "query" in kwargs.keys():
            api_query.update(kwargs["query"])
            del kwargs["query"]
        if permission_set:
            api_query.update({
                "permission_set": permission_set,
            })
        if role:
            api_query.update({
                "role": role,
            })
        return self.call(api_path, query=api_query, **kwargs)
1250166
function updateOrCreate(val) {
        var res = _resources[val._id];
        if (!res) {
          res = new Resource(val, false, new Date().getTime());
        } else {
          res.$updateServer(val);
        }

        return res;
      }